List Info

Thread: my defined class help




my defined class help
user name
2006-03-01 17:39:53
In message <du4her+bho8eGroups.com>, "Alan F. Larimer, Jr."
<alarimerverizon.net> writes
&gt;--- In anthemion-devtools@yahoogroups.com, Alec Ross <alec...> wrote:
&gt;>
>;> I'm not certain of what you mean here: but is it simply a case of
>&gt; including the class header in the code for the window and other files
>;> concerned, linking in the implementation file, and wherever you create
&gt;> the objects, making sure that they are available by:
>&gt; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  - ensuring that their lifetimes are long enough
&gt;> ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; (e.g. they are local to the main frame)
&gt;> ;  and &nbsp;   ; &nbsp;  - passing them around by pointer, or retrieving them from
>> the
>&gt; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; frame?
&gt;>
>;> (It's also not clear to me what tools are involved.&nbsp; DB?)
>>
>&gt; HTH
>
>I have the class defined in the application class files.&nbsp; Do I need to
>use the scope resolution operator ( :: ) to associate my class with
>the appilication class?&nbsp; I can handle dealing with the objects once my
>main frame can see the class.&nbsp; Thanx.
&gt;
>--Alan
>
Alan, this looks like a C++ or wxWidgets-related question, rather than
an Anthemion one.  Do you not think so?

If it a wxWidgets one the wxWidgets one, then the wx-users list is more
appropriate.

If it is C++, perhaps you could try asking on comp.lang.c++, or
alt.comp.lang.learn.c-c++.

In the meantime ...

If your class is defined "freestanding&quot; in the app class files, but not
as part of the app class itself, then there is indeed an issue about the
association.
If your class is nested within the app class, then it can indeed be
accessed using the scope resolution operator.&nbsp; But did you perhaps mean
also that you were using object of your class within a wxApp object. If
so, you might like to look up ::wxGetApp().  This would allow access to
members of the your application class.

HTH
--
Alec Ross
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )