Not quite. There is context to a name.
If you are talking about the number of dots in a reference, as in
a.b.c.d.e.f.g.h, then you are correct. That is the form you use, and
you need not identify namespaces along the way, just feature names.
However, the name of feature in a class is only meaningful in the
context of that class For example, in class A, there is a feature f_a,
and in class B there is a feature f_b.
In class C, you cannont refer to f_a simply as f_a becuase it the class
in which that feature's name exists has not been identified.
In class C, you might identify an object of class A as simply a. Then,
to access f_a, you would call a.f_a, not simply f_a.
In the a.b.c.d.e.f.g.h case, the 'a' is a feature in the Current class,
that is a handle to an object of another class that has a feature called
'b'. In the class corresponing to the type of the feature 'b', there is
a feature called 'c', and so forth.
R
==================================================
Roger F. Osmond
> -------- Original Message --------
> Subject: [eiffel_software] Re: Newbie Question - How to reference
> widgets in GUI Application.
> From: "dciphercomputing" <
[hidden email]>
> Date: Fri, September 11, 2009 9:54 pm
> To:
[hidden email]
> Does this mean that ever widget no matter how deep in the heirarchy can simply be referenced by its name? So if this is true I then I assume I can stop thinking in terms of an object heirarchy when trying to reference widgets.
> Simon
> --- In
[hidden email], Peter Gummer <p-gummer@...> wrote:
> >
> > Colin LeMahieu wrote:
> >
> > > Current is the Eiffel equivalent to "this"
> >
> > True, but you would not write 'Current.tools_menu' to reference the
> > window's Tools menu. You would simply write:
> >
> > tools_menu
> >
> > It is extremely rare in Eiffel to mention 'Current' explicitly as the
> > target of call. The same is true in many other languages, actually; in
> > C#, for example, I would never write 'this.ToolsMenu', except in the
> > very rare case where there might be ambiguity; I would simply write
> > 'ToolsMenu'. Because Eiffel's language rules prevent any such
> > ambiguity, you almost never see anyone write 'Current' followed by a
> > dot.
> >
> > - Peter Gummer
> >