Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: Passing data in a program with GUI, HOW ?
|
Posted: Mar 18, 2002 12:06 AM
|
|
Since GUI programs are event-driven, they don't ever provide information back to the main() method. This is true in any GUI environment; for instance, in a traditional old-fashioned Windows application, you'd start out in WinMain(), which would launch the UI and never see any more action until the program exits (I'm overlooking the fact that it could do something silly in the middle of message dispatching, because that would be ...well, silly).
An event-driven system cannot logically interact with a sequential system. The only time a sequential system can use dialogs is when they are modal and it can pop one up, get some info and proceed based on that (for instance, a console app can pop up the occasional modal message box, but it cannot deal with modeless windows). Probably there is something wrong with the way you are going about things, if you think you need to be able to do this. Maybe you can post your code and we can help you to solve your problem in the context of an event-driven program.
|
|