Assigning method text to lines of menu instances

Gavin Foster omnislist at dataweaver.com
Wed Jul 30 05:06:58 EDT 2014


Hi Mischa,

I don’t know how dynamic you want this menu building to be.

If you have a number of functions which you want to give to the user depending on their access rights, here is a way of dynamically setting up menus:

- you can put all your application functions into a single code or object class, each with a unique method name (‘method1’,’method2’,’method3’, etc)
- build a list for each menu that you want to install for the user (data driven according to their access rights)
- put the text to display on each menu line, and the method name that is to be called into that list
- On startup, build your menus dynamically, adding a line for each one in the list, getting the menu line $text from the list and adding a single method line
- every menu line will contain the same method text (Do {code class and method name name contained in list})

Sorry this is not precise but I hope it gives the idea. Contact me if you need a better explanation.

Rgds
Gav


On 30 Jul 2014, at 09:29, Mischa <mischa at omnislab.com> wrote:

> Hi Nate and Bas,
> 
> thanks for your replies! I've already tried all variations of item references, but no joy. Seems that removing/adding is the only option. I also found a $modify method but it appears to be intended for debugging the method with the method editor. Thanks for the hint with locked menu classes Bas, I have not thought of that. Are you sure this also applies to instances?
> 
> Best greetings
> Mischa
> 
> ---------------------------------------------------
>  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