-
Referencing a containg class instance from a nested class?
In a normal class you would reference the current instance with the 'this'
keyword. How would I refrence the same (outer class) from a nested class.
In Java, you use the syntax <Outer Class>.this.
Thanks in advance,
Calvin...
-
Re: Referencing a containg class instance from a nested class?
You can't, nested classes are not inherently owned by the outer class.
One option would be to pass a pointer to the outer class to the inner =
class's constructor.
--=20
Jonathan Allen
"Calvin" <DigitalQuark@msn.com> wrote in message =
news:3bd1ad8b$1@news.devx.com...
>=20
> In a normal class you would reference the current instance with the =
'this'
> keyword. How would I refrence the same (outer class) from a nested =
class.
> In Java, you use the syntax <Outer Class>.this.
>=20
> Thanks in advance,
> Calvin...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks