• 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: Walking an Object's Relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Walking an Object's Relationships


  • Subject: Re: Walking an Object's Relationships
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Wed, 24 Aug 2005 12:57:15 +0200

Sorry, this was a bit sloppy... :

Simple example:
public int countOfSubtree(MyEO eo)
{
	int count;
	NSArray objects = eo.relationship();
count = objects.count(); //otherwise we always get 0 as the result
for(int i = 0 ; i < objects.count() ; i++)
count += countOfSubtree( (MyEO)objects.objectAtIndex(i) ); //recursion
return count;
}

_______________________________________________ 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
References: 
 >Walking an Object's Relationships (From: email@hidden)
 >Re: Walking an Object's Relationships (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: String Encodings
  • Next by Date: Re: String Encodings
  • Previous by thread: Re: Walking an Object's Relationships
  • Next by thread: [SOLVED] Re- getting values from WOCookie
  • Index(es):
    • Date
    • Thread