Jean-Luc Arnaud
2017-03-23 17:29:33 UTC
Unless it's an issue, I don't definitely understand what happens with
Events when launching an App.
In a simple project, I code this:
App Open Event
Message=Message+"App Open event"+EndOfLine ' Message is a property
of App
App OpenDocument Event
Window1.TextArea1.appendtext "App OpenDocument event"+EndOfLine '
Window1 is the main window, implicitly opened by App, with a TextArea
Window1 Open Event
TextArea1.AppendText App.Message+"Window1 Open event"+EndOfLine
And I define a filetype in order to launch the App by double-clicking a
file with the same filetype/extension.
Now:
- Launching the app by double-click, I get what is expected, that is
"App Open event" and "Window1 Open event" in TextArea1
- Double-clicking the file while the app is opened, I get the expected
"App OpenDocument event" added to TextArea1
- But launching the app by double-clicking the file (the app is not
running), I only get "App Open event" and "App OpenDocument event" in
TextArea1. It seems like the Window1 Open event doesn't fire. I tried to
add a MsgBox message in the Window1 Open event, it's not displayed.
How is this possible?
Am I wrong somewhere (likely) or is this a known or unknown issue?
Thanks for any help.
Events when launching an App.
In a simple project, I code this:
App Open Event
Message=Message+"App Open event"+EndOfLine ' Message is a property
of App
App OpenDocument Event
Window1.TextArea1.appendtext "App OpenDocument event"+EndOfLine '
Window1 is the main window, implicitly opened by App, with a TextArea
Window1 Open Event
TextArea1.AppendText App.Message+"Window1 Open event"+EndOfLine
And I define a filetype in order to launch the App by double-clicking a
file with the same filetype/extension.
Now:
- Launching the app by double-click, I get what is expected, that is
"App Open event" and "Window1 Open event" in TextArea1
- Double-clicking the file while the app is opened, I get the expected
"App OpenDocument event" added to TextArea1
- But launching the app by double-clicking the file (the app is not
running), I only get "App Open event" and "App OpenDocument event" in
TextArea1. It seems like the Window1 Open event doesn't fire. I tried to
add a MsgBox message in the Window1 Open event, it's not displayed.
How is this possible?
Am I wrong somewhere (likely) or is this a known or unknown issue?
Thanks for any help.
--
Jean-Luc Arnaud
_______________________________________________
Xojo forum:
https://forum.xojo.com/
Jean-Luc Arnaud
_______________________________________________
Xojo forum:
https://forum.xojo.com/