Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
#14159: wxMenuItem needs field for client data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
wxTrac  
View profile  
 More options Mar 30 2012, 10:27 am
From: "wxTrac" <nore...@wxsite.net>
Date: Fri, 30 Mar 2012 14:27:21 -0000
Local: Fri, Mar 30 2012 10:27 am
Subject: #14159: wxMenuItem needs field for client data
Ticket URL: <http://trac.wxwidgets.org/ticket/14159>

#14159: wxMenuItem needs field for client data
-------------------------+------------------------------------------------- -
 Reporter:  Peri         |       Owner:      
     Type:  enhancement  |      Status:  new  
 Priority:  normal       |   Milestone:      
Component:  GUI-all      |     Version:  2.9.3
 Keywords:               |   Blockedby:      
    Patch:  0            |    Blocking:      
-------------------------+------------------------------------------------- -
 When creating menu items, sometimes a menu item needs to refer to some
 client data, other than a control id. For example, if you are creating
 menu items that refer to rows from a database query, you may want to store
 primary keys or pointers to cached query results so that when a user
 selects the menu item, it's easy to get the associated data.

 Time and time again I end up caching an array of clent data in a higher
 level class instance (essentially in a global variable) and, upon menu
 item selection, search it for the associated data. This works fine, but is
 not something I like to do.

 You may have a good reason for not doing this; if so, please post.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14159>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "#14159: Allow associating client data with menu items (was: wxMenuItem needs field for client data)" by wxTrac
wxTrac  
View profile  
 More options Mar 30 2012, 11:33 am
From: "wxTrac" <nore...@wxsite.net>
Date: Fri, 30 Mar 2012 15:33:08 -0000
Local: Fri, Mar 30 2012 11:33 am
Subject: Re: #14159: Allow associating client data with menu items (was: wxMenuItem needs field for client data)
Ticket URL: <http://trac.wxwidgets.org/ticket/14159#comment:1>

#14159: Allow associating client data with menu items
-------------------------------+------------------------------------------- -
 Reporter:  Peri               |       Owner:          
     Type:  enhancement        |      Status:  confirmed
 Priority:  low                |   Milestone:          
Component:  GUI-all            |     Version:  2.9.3    
 Keywords:  wxMenuItem medium  |   Blockedby:          
    Patch:  0                  |    Blocking:          
-------------------------------+------------------------------------------- -
Changes (by vadz):

  * keywords:  => wxMenuItem medium
  * priority:  normal => low
  * status:  new => confirmed

Comment:

 It's relatively rare to have dynamically constructed menus (if only
 because it's a bad idea to have many items in a menu), unlike, say,
 dynamically filled list box (which is almost always the case). But, in
 principle, yes, I agree, this could be useful. It could be better to allow
 adding items of your custom `wxMenuItem`-derived class to the menu instead
 of just adding (untyped) client data pointer to the base class itself.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14159#comment:1>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »