I have been fooling around with EBasic as that's where most of the action is these days. It reminds me of the good old days of IBasic Pro. (Only better)
I do have one question, though. I would like to be able to put the handlers for windows and dialogs right after the window or dialog declarations to enhance readability of the code. When I try this I get compile errors because there are references to yet undeclared windows or routines.
Dialog d1
CreateDialog d1, ..., &d1_handler
...
Sub d1_handler
...
Window main
OpenWindow main, ..., &main_handler
...
Sub main_handler
Is there some way to "forward declare" (if that's the right term) to avoid this?
My only guess would be to put all your required declarations in an .inc file and put it at the top of your program.
Larry
There shouldn't be any problems with the handlers, I do that all the time. In fact most of the examples have the variable, followed by the OPENWINDOW statement, followed by all of the subroutines.
Do you have anything more specific?
The current code is too big. Let me put together an example later today.
Here is what I was attempting:
Autodefine "off"
DIALOG d1
CREATEDIALOG d1,0,0,300,202,0x80C80080,wMain,"Test Dialog",&d1_handler
SUB d1_handler
Return
ENDSUB
Window wMain
OpenWindow wMain, 0, 0, 900, 470, @MINBOX, null, "Test Window", &wMain_handler
WaitUntil wMain = 0
End
Sub wMain_Handler
Select @Message
Case @IDCLOSEWINDOW
CloseWindow wMain
EndSelect
EndSub
That's why DoModal and ShowDialog have an optional 'parent' parameter. So you don't have to specify it in the CREATEDIALOG statement.
Paul.
That does it.
Thanks.