Re: WOComponent quesion
Re: WOComponent quesion
- Subject: Re: WOComponent quesion
- From: "Jerry W. Walker" <email@hidden>
- Date: Thu, 8 Mar 2007 19:57:10 -0500
Hi, Peter,
It's so seldom that I can ding Chuck, I just couldn't let the
opportunity pass. :-)
Actually, this method exists for situations in which component B has
a reference to component A (where A is probably the page that passed
control to B, but not necessarily). If B renders its page on the
browser and the user activates one of B's action methods in which B
returns context().page() or null or some such, so that control
returns once again to the B component, but in the next R-R loop, then
we've got a situation where component B is awake, component A is
asleep and B is still hanging on to that reference to A. If at this
point, B wants to set some iVar in A or something of that nature,
this method should be called first to do exactly what it says, ensure
(that A is)AwakeInContext.
If all you intend to do in B with the reference to A is to return to
A, then you don't really need the ensureAwakeInContext(context())
method. A will be awakedened for its appendToResponse.
Regards,
Jerry
On Mar 8, 2007, at 6:34 PM, Peter Vandoros wrote:
Does this method need to be called if the component does not do any
initialisation in awake() ? Or does WO do some things that are
required?
Why exactly we need to call this method?
I have not been using this method anywhere and i have not
encountered any issues that i am aware of.
Regards
Peter
Chuck Hill wrote:
You are correct. Strictly speaking, it is only needed in that
case. I tend to engage in a bit of PBP (Paranoia Based
Programming) when I am not sure who is going to use the code.
Better safe than hunting bugs.
Chuck
On Mar 8, 2007, at 3:08 AM, Jerry W. Walker wrote:
Hi, Timo & Chuck,
My understanding was that ensureAwakeInContext(context()) is only
needed if you are going to invoke methods on the previous page,
not if you are just going to return it, as in this example.
Regards,
Jerry
On Mar 8, 2007, at 3:44 AM, Timo Hoepfner wrote:
Am 07.03.2007 um 18:52 schrieb Chuck Hill:
previousPage.ensureAwakeInContext(context());
return previousPage;
You learn something new every day... I've never noticed the
ensureAwakeInContext mehod and have been returning pages stored
in a variable for years now without a problem. I guess it was
pure luck it was working, wasn't it?
Timo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance
Industrial Strength Internet Enabled Systems
email@hidden
203 278-4085 office
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40etechgroup.com.au
This email sent to email@hidden
--This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
Peter Vandoros
Software Engineer
Etech Group Pty Ltd
Level 3/21 Victoria St
Melbourne VIC 3000
Australia
Ph: +61 3 9639 9677
Fax: +61 3 9639 9577
----------------------------------
IMPORTANT: This e-mail message and any attachments are confidential
and may be privileged. If received in error, please reply to this
message and destroy all copies and any attachments. You should
check this message and any attachments for viruses or defects. Our
liability is limited to resupplying any affected message or
attachments. For more information about Etech Group, please visit
us at http://www.etechgroup.com.au.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
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