[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wxruby-dev] Summary of naming problems
From: |
Richard Kilmer |
Subject: |
Re: [Wxruby-dev] Summary of naming problems |
Date: |
Tue, 24 Jun 2003 18:56:54 -0400 |
On Tuesday, June 24, 2003, at 03:06 PM, repeater wrote:
For sure it is a matter of taste, but we must just make sure we can
stomach
'::' in bulk.
-the cultural reorientation of people like me, who through experience
with
other gui libs would 'include' the first thing that they see.
You can include if you want. You just have to know that by doing so
you are bringing in the whole constant pool of Wx...this is no
different for Fox. You can still access constants that existed before
the inclusion of the namespace like for Object it would be ::Object
(accessing the Object constant in the 'root' namespace). What is nice
is by giving you a choice, your example could become:
include Wx
@calendar = CalendarCtrl.new(self, ID_CALENDAR, DefaultDateTime,
DEFAULT_POSITION, DEFAULT_SIZE,
CAL_MONDAY_FIRST |
CAL_SHOW_HOLIDAYS |
RAISED_BORDER)
dlgSizer = BoxSizer.new(HORIZONTAL)
calendarSizer = BoxSizer.new(VERTICAL)
calendarSizer.Add(@calendar, 1, GROW)
dlgSizer.Add(calendarSizer, 1, GROW)
And of course if you just do this in a class:
class MyClass
include Wx
...
end
It keeps the the inclusion isolated.
-rich
- Re: [Wxruby-dev] Summary of naming problems, (continued)
Re: [Wxruby-dev] Summary of naming problems, Kevin Smith, 2003/06/24
RE: [Wxruby-dev] Summary of naming problems, repeater, 2003/06/24