void-safe arg parsing

10 views
Skip to first unread message

r...@amalasoft.com

unread,
Jun 10, 2019, 6:16:08 PM6/10/19
to Eiffel Users Group
Hi All
It could be just another brain cramp on my part, but ...
It seems impossible, in a vision2 app, to do any argument parsing before instantiating the main UI parts (e.g. the main window).
Is this just my peculiar circumstance (in which case I'll dig into a way to get around it), or is it the norm?
Feeble minds want to know.
Thanks
R

Alexander Kogtenkov

unread,
Jun 11, 2019, 8:10:43 AM6/11/19
to eiffel...@googlegroups.com
Code based on Vision classes needs to follow a certain pattern of initialization in void-safe mode as described at

   https://www.eiffel.org/doc/solutions/Converting_EiffelVision_2_Systems_to_Void-Safety 

Therefore, if argument parsing happens in a class based on a Vision class, most likely, it can be done only after instantiating all UI parts as you observed.

Alternatively, argument parsing could be done earlier, before launching the UI. Or, it could be done when some UI is completely setup, before adding some more UI elements. In other words, it should be OK to have this parsing as soon as UI is in a "stable" point of execution: no UI yet or completely set-up UI.

Hope this helps,
Alexander Kogtenkov


r...@amalasoft.com:

r...@amalasoft.com

unread,
Jun 11, 2019, 8:15:19 AM6/11/19
to eiffel...@googlegroups.com
Well stated; very clear.
I'll play around a little to see if there's a handy (and safe) seam to exploit, and maybe suggest a generalization (assuming I actually find one).
Thanks Alexander.
R

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/1560255040.563564811%40f475.i.mail.ru.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages