On Tue, 28 Mar 2006 15:14:35 -0600, "Mark
Volkmann"
<r.mark.volkmann gmail.com> wrote :
> Eeek! This doesn't work. I'm so confused.
>
> Is visibleRows an instance variable of FXTable?
> If so, why can't I access it directly from a subclass
with " visibleRows"?
No, visibleRows is not a real instance variable for
FXTable. That value is
buried way down deep in the C++ object.
> Does it have accessor methods?
Yes, but they are more along the lines of what Dave and Andy
called "virtual
attributes". See the "Classes, Objects and
Variables" chapter of Programming
Ruby (http://www.ruby-doc.org/docs/ProgrammingRuby/h
tml/tut_classes.html),
and look at the section called "Virtual
Attributes".
> If so, why can't I invoke them directly from a
subclass
> without using "self."?
As I've noted in other replies, this is just how Ruby
works. There is some
discussion of this in Programming Ruby as well; see the
sidebar titled
"Using Accessors Within a Class" in the
"Expressions" chapter
(http://www.ruby-doc.org/docs/ProgrammingRu
by/html/tut_expressions.html).
_______________________________________________
fxruby-users mailing list
fxruby-users rubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
|