Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 11
Registered: ‎01-17-2013
My Device: BlackBerry Z10
My Carrier: Bell

Is there a way to have an ActionSet attached to an object in QML and reference them for context menus?

The reason for this is simple, depending on a flag in my data model, a different ActionSet will be used.

 

ie, I have a data model with a flag (metric vs imperial) and the context menus for controls will be a list of preset values for either metric or imperial values.  Depending on the value of the flag, I'd like to dynamically pick the ActionSet for the context menu.

 

I supposed I could return the action sets from C++, but I love the depth of declarative programming in cascades and would prefer to keep this UI stuff in the UI part and out of my data model...

Andrew Forget
BlackBerry Z10
Highlighted
New Developer
Posts: 11
Registered: ‎01-17-2013
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is there a way to have an ActionSet attached to an object in QML and reference them for context menus?

This is made worse by the fact that ActionItem does not have visibility control, or I would simply show/hide based on the flag...
Andrew Forget
BlackBerry Z10