Re: Trouble referring to an item in a WORepetition in Java code
Re: Trouble referring to an item in a WORepetition in Java code
- Subject: Re: Trouble referring to an item in a WORepetition in Java code
- From: wojingo <email@hidden>
- Date: Fri, 25 Nov 2005 10:47:00 +1030
Hi,
David Holt wrote:
Got it. I just had to refer to the item object that is being iterated
(in this case aSurvey).
aSurvey.takeValueForKey(new NSTimestamp(),"dateOfLastChange");
mySession().setASurvey(aSurvey);
I'm curious. Why would you call takeValueForKey rather than a set
method? If you have no set method then why not just set the variable
directly? ie) aSurvey.dateOfLastChange = new NSTimestamp();
Your implementation above is not providing any compile-time checking on
setting of dateOfLastChange. If you accidently typed dateOfLastChage you
won't know about it until the code executes.
regards,
- shaun
_______________________________________________
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