From: John L. <jla...@gm...> - 2006-02-03 16:19:34
|
On 2/3/06, k. holwerda <kla...@nl...> wrote: > John Labenski wrote: > > >are in wxLua as just "wx.enum1". I propose that it be changed to > >"wx.MyClass_enum1" where we throw away the enum name, but keep the > >class name. This way we unclutter the global wx namespace with > >seemingly arbitrary enum values which should logically tie them more > >closely to the class that they actually belong to and are used with. I > >think that to go as far as calling the enums > >"wx.MyClass_SomeEnumType_enum1" is probably too much and I don't think > >we'll run into to problems by not bothering to implement that since > >C/C++ doesn't enforce you to use the enum name anyway. > > > >Anyone have any concerns about this change? > > > Even in C++ one gets the enum value with > > MyClass::enum1 > > like e.g. : > > a2dFill* clone =3D m_fill->TClone( MyClass::enum1 ); > > That is without the SomeEnumType in it.. > So why not do: > > wx.MyClass.enum1 > > or > > wx.MyClass:enum1 > > I don't understand the _ there. Of is it impossible to do it like that?? Because we'd have to make a table of the enum values for each class name requiring far more complicated code. I thought that just using an underscore would be a happy medium. Regards, John Labenski |