Subwindow Widgets in Omnis Studio (was: Displaying icons in a complex grid)
Vik Shah
Vik at Keys2Solutions.com.au
Mon Mar 2 22:53:12 EST 2015
Mischa,
Thanks for this article, its quite a read. I really like the moon phase example.
In the article you noted that sub windows are constructed prior to the $construct of the main window. This is quite true and if you note the order of construction will be in the $order of the sub window fields on the main window, though not always...
To achieve consistency and control of execution of $constructs you can create a $init method, leave the $construct of your sub windows empty, or maybe have an instance var called iparentRef that points to $cwind, quite handy when you have to call methods in the parent window for post-event processes.
Once you have $init implemented, its only a matter of doing $cinst.$objs.$sendall($ref.$init, $ref.$objtype=kSubWindow). This technique will give you control of execution and its construction.
hope that helps.
Regards,
Vik Shah
Director
Keys2Solutions
> On 3 Mar 2015, at 12:56, Mischa <mischa at omnislab.com> wrote:
>
> Dear all,
>
> I've placed an article and a demo library about creating your own window components on my website:
>
> http://www.omnislab.com/omnis-studio/technical-notes-for-omnis-studio/subwindow-widgets-create-your-own-window-components
>
> I'm using the trick I learned from Bas (also outlined in TNGI0018) to set a variable as dataname in a subwindow object, and access it within the subwindow. With a few tricks you can have a full implementation of the $dataname property, this means reading its contents and also changing it within the subwindow. These 'widgets' act like native Studio components, and are as easy to handle as an entry field - you drag it into your window, assign a variable and optionally parameters - that's all you need to do.
>
> The possibilities are terrific - whatever window component you are missing - go and build it on your own.
>
> The only limitation at the moment - subwindow widgets don't work in complex grids. The reason why is very complicated; the paradigms of complex grids and subwindows bite each other in some aspects. Anyway, with the help of TL Germany, I issued an enhancement request to fix this problem - hopefully it finds an opened ear ;)
>
> Best greetings and thanks for your replies!
> Mischa
>
> PS @ Sam - the idea of creating an icon font is very creative ;) - however creating a font is a hell of work (I did it already) and requires sophisticated and expensive software. Colored fonts are possible, but not really supported on any platform, but this might change in the future.
>
> ---------------------------------------------------
> T H E O M N I S L /\ B www.omnislab.com
> ---------------------------------------------------
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list