New topic: On the fly Contextual Menus
<http://forums.realsoftware.com/viewtopic.php?t=46265> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message neonash7777 Post subject: On the fly Contextual MenusPosted: Mon Dec 17, 2012 11:22 am Joined: Mon Nov 29, 2010 7:01 pm Posts: 343 I have a problem with contextual menus. I can't create them on the fly and have them appear. This creates an error because even though the menu exists on the app it doesn't exist on the client side. For example I put this in the action event of a button dim m as new WebMenuItem("test") m.Append(new WebMenuItem("a")) m.Append(new WebMenuItem("b")) me.ContextualMenu = m me.PresentContextualMenu I primarily don't want to generate the contextual menu ahead of time because it is generated from a database query. This means I always want the information up to date and I dont want to query the information if I don't need it. Is there something I can do to overcome this? Top Paul Lefebvre Post subject: Re: On the fly Contextual MenusPosted: Mon Dec 17, 2012 4:39 pm Site Admin Joined: Fri Sep 30, 2005 9:35 am Posts: 870 Location: South Portland, Maine As you've seen, the contextual menu needs to be in place on the client before you can display it. Perhaps you can have some other process populate the contextual menu for the button (perhaps a WebTimer or whatever kicked off the DB query)? Then when PresentContextual Menu is called on the button, it ought to work fine. _________________ Paul Lefebvre Developer Evangelist Real Software, Inc. The Real Studio Developer Conference is back: April 23rd-26th, 2013 in Orlando, FL. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
