Subwindow Widgets in Omnis Studio (was: Displaying icons in a complex grid)

Mischa mischa at
Tue Mar 3 12:18:03 EST 2015

Hi Vik,

thank you for your kind comment on the article!

>> Once you have $init implemented, its only a matter of doing
$cinst.$objs.$sendall($ref.$init, $ref.$objtype=kSubWindow)

I finished the article today at 5 AM and I was a bit tired already ;) - so
maybe the purpose of the introduced widget framework was not stated clear
enough in the end (I will add a summary and some revisions later this
evening), however what the framework does is reducing the contribution of
the main window to a single $cinst.$redraw() in its $construct method. This
is all what is needed to get the widgets working. No callback methods(!), no
$sendall (that needs to take care in which container the widget might be
located - this is why I wanted to get rid of $sendall). So in this aspect,
the widgets are as Studio-native as an entry field.

But what I want to induce is a common enhancement request to TL ;) - as also
Bas points out very true in his reply - we don't need another 100 window
components. What we really would need is a generic widget component, that is
subwindow only, has customizable properties that show up in the property
manager and can be inherited from superclasses. It also works within complex
grids, and its dataname property is available already in the $construct
method, and linked dynamically to the assigned variable. I know this is a
lot, and maybe not doable in Studio - however it would reduce the need of
new window components to a minimum.

However, the introduced widget framework already comes close to this, with
the only really painful exception that it does not work in complex grids
Best greetings

  T H E   O M N I S   L /\ B

-----Ursprüngliche Nachricht-----
Von: omnisdev-en-bounces at
[mailto:omnisdev-en-bounces at] Im Auftrag von Vik Shah
Gesendet: Dienstag, 03. März 2015 04:53
An: OmnisDev List - English
Betreff: Re: Subwindow Widgets in Omnis Studio (was: Displaying icons in a
complex grid)


Thanks for this article, its quite a read. I really like the moon phase

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

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.


Vik Shah

> On 3 Mar 2015, at 12:56, Mischa <mischa at> wrote:
> Dear all,
> I've placed an article and a demo library about creating your own window
components on my website:
> 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
> ---------------------------------------------------
> _____________________________________________________________
> Manage your list subscriptions at

Manage your list subscriptions at

More information about the omnisdev-en mailing list