Discussion:
[Ozone-users] Replace "this" in *Impl-classes by "self()"?
Ronny Priv
2006-03-17 20:29:05 UTC
Permalink
Hello,

the userguide says every "this"-keyword in the *Impl-classes needs to be
replaced by the "self()"-method.

I tried that but javac complains because it doesn't know a self-method.
Is it a wrong or old information in the userguide?

thanks
ronny
--
Echte DSL-Flatrate dauerhaft f�r 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
Aidan Slingsby
2006-03-20 13:15:06 UTC
Permalink
I *think* this is only required if the method returns an ozone object, which
you'll have to typecast to the return type (which will be the interface). So
instead of


public MyOzoneObjectInterface returnItself(){
return this;
}

...it should be

public MyOzoneObjectInterface returnItself(){
return (MyOzoneObjectInterface)this.self();
}

-----Original Message-----
From: ozone-users-***@lists.sourceforge.net
[mailto:ozone-users-***@lists.sourceforge.net] On Behalf Of Ronny Priv
Sent: 17 March 2006 22:29
To: ozone-***@lists.sourceforge.net
Subject: [Ozone-users] Replace "this" in *Impl-classes by "self()"?


Hello,

the userguide says every "this"-keyword in the *Impl-classes needs to be
replaced by the "self()"-method.

I tried that but javac complains because it doesn't know a self-method.
Is it a wrong or old information in the userguide?

thanks
ronny
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Loading...