I have some menu items given ids with wxNewId(). Later, I build a
number of buttons to control specific functions and actually assign
them ids starting at 1000 (1010, 2101, 2102, etc). I do this so that I
can assign the id of the button, use event.GetId() and subtract--- say
2100--- to reveal the number of the motor that the button controls.
My question is regarding the way wxNewId() assigns numbers. Does
compilation go through the interpretation, then assign the number
(ie. does it say "okay, down here there's an id of 2101, so I can't
use that for that menu up top")? I want to make sure my latter
assignment of ids is not going to conflict with the earlier ones.
-J
···
--
Jonathan__________________________Pennington_____________________
CoastalGeology.Org (CGO) | EGg0 Educational Robotics |
http://coastalgeology.org | http://eggo.sourceforge.net |
john@coastalgeology.org | eggo_robotics@bellsouth.net |
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users
My question is regarding the way wxNewId() assigns numbers.
It just incemrents an internal counter and returns it.
Does
compilation go through the interpretation, then assign the number
(ie. does it say "okay, down here there's an id of 2101, so I can't
use that for that menu up top")?
Now that would be a good trick... Anything else up your sleeve? <wink>
I want to make sure my latter
assignment of ids is not going to conflict with the earlier ones.
You can use wxRegisterId(N) to specify that an ID N shouldn't be used. It
simply sets the internal counter to N so the next time wxNewId is called it
will start at N+1.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users
* Robin Dunn <robind@earthling.net> [010303 13:21]:
> compilation go through the interpretation, then assign the number
> (ie. does it say "okay, down here there's an id of 2101, so I can't
> use that for that menu up top")?
Now that would be a good trick... Anything else up your sleeve? <wink>
Hey, it was worth a shot
You can use wxRegisterId(N) to specify that an ID N shouldn't be used. It
simply sets the internal counter to N so the next time wxNewId is called it
will start at N+1.
That's what I needed. I *think* there's enough counter space between
what wxNewId() will start at and where my ids start, but I want to
make sure. Thanks.
···
--
Jonathan__________________________Pennington_____________________
CoastalGeology.Org (CGO) | EGg0 Educational Robotics |
http://coastalgeology.org | http://eggo.sourceforge.net |
john@coastalgeology.org | eggo_robotics@bellsouth.net |
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users