Re: Using Do Code Method to make static method calls: safe practice?
Why would you want to do that?
If you use it like this, you cannot use instance vars of the object you are calling, so in effect the object acts as a code class.
Why than not use the code class? Just to be saf for the future…
> On 23 jun. 2017, at 11:40, Andrea Zen <email@example.com> wrote:
> Hello, in Omnis Studio there is no possibility to declare a static method, but it is known that using:
> Do code method myClass/myMethod
> we can simulate a static method call, regardless of the type of “myClass”.
> I’d like to know if this is a call that can be used safely.
> I mean, is it an “official” feature intentionally implemented by Omnis?
> Or is it a workaround that works by chance and could be removed/changed in future versions? Has anyone ever talked with Omnis about this?
> After all, “Do code method” is meant to be used with code classes, there’s no mention in the manuals about this particular use with every type of class to call methods as static ones.
> Andrea Zen
> Manage your list subscriptions at lists.omnis-dev.com
Manage your list subscriptions at lists.omnis-dev.com