Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Strange behaviour of my modal dialog
Strange behaviour of my modal dialog [message #2804] |
Tue, 25 April 2006 22:57 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
I didn't know where to post this thread because I'm sure it is not a bug. Nevertheless i'm observing strange things, very strange, at least for me.
I've declared and defined a class, say Tournament. Then I've an instance TD of Tournament the which constructor set, for example
...
NAMETORNEO = "my Tournament";
...
Now I load a file and update NAMETORNEO with the value read from file, for example
...
TD.NAMETORNEO = "international";
...
I tested that TD.NAMETORNEO has been adjourned and now it is "international", no doubt about it please.
Now comes the strange things. I run a modal dialog to set a new tournament. The dialog is run by:
void VegaMain::NewTournament()
{ NewTournamentDlg newt;
//PromptOK( TD.NAMETORNEO + "1" ); // show "international"
newt.Run();
//PromptOK( TD.NAMETORNEO + "2" ); // show "international"
}
Here is some lines of the constructor of NewTournamentDlg :
NewTournamentDlg::NewTournamentDlg()
{ int i, j;
CtrlLayout(*this, "New Tournament");
editTourn <<= TD.NAMETORNEO;
PromptOK( TD.NAMETORNEO ); // TD.NAMETORNEO is again "my Tournament" !!!
...
I believed to set in editTourn the new value of TD.NAMETORNEO, i.e. "international", instead there is again the very old one, "my Tournament"! Why? After all newt born after I changed the value of TD.NAMETORNEO.
Perhaps it is normal but I need to synchronize NewTournamentDlg with the rest of the world. How to do?
I hope you have understood what I meant.
Luigi
[Updated on: Tue, 25 April 2006 22:58] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 16 23:19:50 CEST 2024
Total time taken to generate the page: 0.02382 seconds
|