Currently we say that a component name "must start with a letter and
contain only letters and numbers"
As far as I know this is only checked in the resource editor, and was
only done to ensure that the component events could be identified
readily (e.g on_ followed by name followed by _eventtype )
Neither of those matter if you have an app which creates its components
dynamically, and doesn't depend on name-based event binding (i.e.it
doesn't use events at all, or uses commands, or catch-all events, or
wxPython events).
So,
1. is there anything else I've forgotten about that would break ?
2. do you think anyone is using this already ?
3. could (should) we reserve some such names ?
Specifically, I'm thinking about generalizing the sizing handles in the
resource editor. Currently it knows there is exactly one set of sizing
handles, and reserves component slots 0:7 for them (and simply reserves
the names of them). If we are to select multiple components, it's
probably easier to use a name convention for sizing handles than it is
to keep track of the number of selected components and manipulate the
component order accordingly. Therefore, I'd like to have a large number
of "reserved" names which couldn't clash with users' component names.
I was considering reserving all component names beginning with "_" for
system use - and specifically "_sh_" for the sizing handles. What do
you think ?
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 25/04/2005
|