Gary Miyakawa Active Member Licensed User Longtime User Feb 21, 2014 #1 Is there anyway to trap/catch the close/exit of a b4j application ? I'd like to clean a few things up before terminating. Thanks, Gary M
Is there anyway to trap/catch the close/exit of a b4j application ? I'd like to clean a few things up before terminating. Thanks, Gary M
stevel05 Expert Licensed User Longtime User Feb 21, 2014 #2 You can use a callback on the MainForm: Code: Copy Sub MainForm_CloseRequest (EventData As Event) End Sub I'm not sure if there are any limitations as to what you can do in there, as there are in B4a Activity_pause, but i don't think so. Upvote 0
You can use a callback on the MainForm: Code: Copy Sub MainForm_CloseRequest (EventData As Event) End Sub I'm not sure if there are any limitations as to what you can do in there, as there are in B4a Activity_pause, but i don't think so.
Gary Miyakawa Active Member Licensed User Longtime User Feb 21, 2014 #3 stevel05 said: You can use a callback on the MainForm: Code: Copy Sub MainForm_CloseRequest (EventData As Event) End Sub I'm not sure if there are any limitations as to what you can do in there, as there are in B4a Activity_pause, but i don't think so. Click to expand... Thank you so much... BTW, how would I have found this sort of thing ? are the callbacks for mainform documented somewhere (or is that a Java thing) ?? Upvote 0
stevel05 said: You can use a callback on the MainForm: Code: Copy Sub MainForm_CloseRequest (EventData As Event) End Sub I'm not sure if there are any limitations as to what you can do in there, as there are in B4a Activity_pause, but i don't think so. Click to expand... Thank you so much... BTW, how would I have found this sort of thing ? are the callbacks for mainform documented somewhere (or is that a Java thing) ??
stevel05 Expert Licensed User Longtime User Feb 21, 2014 #4 It'll be documented somewhere in the JavaFX docs on the oracle web site, but it's probably easier to ask on the forum. I think I originally saw it on here somewhere. If you're curious about whats available for an Object in B4j, in the IDE you can type Sub then the space bar, then Tab and you'll get a list of Objects, select one and you'll get a list of methods that are exposed for that Object. Same for B4a. Upvote 0
It'll be documented somewhere in the JavaFX docs on the oracle web site, but it's probably easier to ask on the forum. I think I originally saw it on here somewhere. If you're curious about whats available for an Object in B4j, in the IDE you can type Sub then the space bar, then Tab and you'll get a list of Objects, select one and you'll get a list of methods that are exposed for that Object. Same for B4a.
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2014 #6 See the documentation: http://www.b4x.com/b4j/documentation.html Specifically: http://www.b4x.com/b4j/help/jfx.html#form You can also see events in the IDE as explained here: IDE Tips Upvote 0
See the documentation: http://www.b4x.com/b4j/documentation.html Specifically: http://www.b4x.com/b4j/help/jfx.html#form You can also see events in the IDE as explained here: IDE Tips
M myriaddev Active Member Licensed User Longtime User Apr 22, 2014 #7 How do I prevent an exit in B4J like in B4A until user is asked if to leave program? Thanks, Jerry Answer: Sub MainForm_CloseRequest (EventData As Event) EventData.Consume End Sub Upvote 0
How do I prevent an exit in B4J like in B4A until user is asked if to leave program? Thanks, Jerry Answer: Sub MainForm_CloseRequest (EventData As Event) EventData.Consume End Sub