Thanks Mobeus,
Yea, I finally figured that part out
my sloppy coding
I think I have it working now, however, I need the program to wait, halt, or stop until the MSGDIALOG decision is made (ie. wait until either the 'yes' or the 'no' button are pushed; or the window is closed indicating not to delete the record)
At present, it continues execution while the MSGDIALOG is present, continuing on to the 'END SUB'. Here is what I have atm (kmv is now being returned
):
Code: Select all
killmsg$=CONCAT$(Are yo usure you want to delete ",kilme$," ?")
kilme_dlg=MSGDIALOG(killmsg$,300,110,1,4)
SHOW(kilme_dlg)
CALLBACK(kilme_dlg,killme_btn)
IF kmv = 1 THEN
GOTO findrec
END IF
GOTO nokill
LABEL findrec
PRINT "at finding record"
LABEL nokill
PRINT "ending"
END SUB
'ending' is being printed while the MSGDIALOG is being shown. I click the 'yes' button,GUI hides, then nothing happens. I re-click the button on the gui to go into the delete SUB and then the 'at finding record' prints followed by the 'ending' message while the new MSGDIALOG is being shown.
I'm familiar with the 'WAIT' command, but how and where do you set it up to pause the program until the MSGDIALOG buttons are pressed?
I am thinking of trying this:
Code: Select all
dmv = 3
REPEAT
SHOW(kilme_dlg)
CALLBACK(kilme_dlg,killme_btn)
dmv=WAIT(killme_btn, 30)
UNTIL dmv < 3
OR
Code: Select all
dmv = 3
WHILE dmv >= 3
SHOW(kilme_dlg)
CALLBACK(kilme_dlg,killme_btn)
WEND
It is late here, so I will try them and post what happens in the next few minutes or so. Then Ima going to bed!
Thanks!
E
.
[UPDATE]
Both failed
Using the WHILE/WEND method caused the MSGDIALOG window to pop up with nothing inside it and locked the system up. Strike one
Using the REPEAT/UNTIL with 'dmv=WAIT(kilme_dlg,30)' would not compile due to a segmentation fault. Strike Two
Using REPEAT/UNTIL with 'dmv=WAIT(killme_btn,30)' would not compile due to an integer from pointer error. Strike three- I'm out!
Well, off to bed...I'll see what happens with it tomorrow. Meanwhile, any solutions , feel free to post them for me
Thanks all!
E
.