Re: AW: a smaall question
Re: AW: a smaall question
- Subject: Re: AW: a smaall question
- From: David Teran <email@hidden>
- Date: Thu, 18 Aug 2005 13:00:25 +0200
... but this works only if your subclass is in the same framework /
app project as the session class you instanciate. If not then you
might end up with bi directional import requirements which are hard
to handle.
better is to use keyvaluecoding like : session().valueForKey but then
again you have to cast the result.
regards, David
On 18.08.2005, at 11:41, Helge Staedtler wrote:
You could let all your WOComponents inherit from a subclass you
create e.g.
from the following stuff...
public class WOMySubclass extends WOComponent {
public WOMySubclass (WOContext context) {
super(context);
}
public Session castedSession() {
return (Session)session();
}
}
Then you only have to call castedSession(). You have saved 4
brackets. ;-)
If only all problems could be solved that easy...
Regards,
Helge
Am 18.08.2005 11:23 Uhr schrieb "Amedeo Mantica" unter
<email@hidden>:
I have a variable declared in my Session.java
when I need to access it i need alway to prepend "((Session)session
())".... ok
But the is another method to do this.... some times some funcions
become log and confusive... only ((Session)session()) are six
brackets.... :=)
Thanks and best regards
Amedeo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Helge Städtler
- Expect and Respect.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40cluster9.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden