• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble referring to an item in a WORepetition in Java code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Trouble referring to an item in a WORepetition in Java code
      • From: Lachlan Deck <email@hidden>
References: 
 >Trouble referring to an item in a WORepetition in Java code (From: David Holt <email@hidden>)
 >Re: Trouble referring to an item in a WORepetition in Java code (From: David Holt <email@hidden>)

  • Prev by Date: Downgrading or upgrading java (and searching list archive)
  • Next by Date: Re: Trouble referring to an item in a WORepetition in Java code
  • Previous by thread: Re: Trouble referring to an item in a WORepetition in Java code
  • Next by thread: Re: Trouble referring to an item in a WORepetition in Java code
  • Index(es):
    • Date
    • Thread