wxruby-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wxruby-dev] Naming problem


From: Richard Kilmer
Subject: Re: [Wxruby-dev] Naming problem
Date: Thu, 26 Jun 2003 00:59:37 -0400


On Thursday, June 26, 2003, at 12:33  AM, Kevin Smith wrote:

Doh!

I have done the "big rename" in the library itself, and am now starting
to fix all the samples.

Unfortunately, we have a conflict between wxLeft and wxLEFT.

wxLeft is an enumeration specifying the edge for a
wxIndividualLayoutConstraint.

wxLEFT is an enumeration specifying the label alignment in a wxGrid.

ARGH!!!

Gosh...that just sucks in general...to have to know to use WxLeft vs. WxLEFT (in the C++ code).


I guess my vote would be to make these constants local within their
respective classes: Wx::Grid::LEFT vs.
Wx::IndividualLayoutConstraint::LEFT

Well, Ruby will allow you to have Left and LEFT and it treats them as different constants...but man...ug.


Otherwise, it would probably be best to rename both of them, so we would
have: Wx::LAYOUT_LEFT and Wx::ALIGN_LEFT (and right, bottom, and
center/centre too).

This makes them more descriptive...which is nice...and it leaves all the constants in the Wx namespace. If just these are "one level deeper" its kind of weird. The documentation would have to capture this, but I like these names better.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]