• 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: NSArray.iterator and NSArray.listIterator bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray.iterator and NSArray.listIterator bug


  • Subject: Re: NSArray.iterator and NSArray.listIterator bug
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 14 Jun 2006 20:45:13 -0700

I can't confirm it, but I would not be surprised. Sounds like whoever added this method neglected to fire the fault before creating the iterator. I'll suggest using objectEnumerator() instead of calling count().

Chuck

On Jun 14, 2006, at 7:35 PM, John Larson wrote:

Hello all,

can anyone please confirm this as a bug in WebObjects 5.3.1. When using an NSArray that is a to-many relationship from an entity, the listIterator() method returns an empty list if the NSArray has not had at least count() executed against it. The same happens when using the iterator() method.

Specifically, my code:

...
	scToCopy.toBOM().count();

	bom = scToCopy.toBOM().listIterator();

	while (bom.hasNext()) {
		BOM component = (BOM) bom.next();

...

works, but

...
	// scToCopy.toBOM().count();

	bom = scToCopy.toBOM().listIterator();

	while (bom.hasNext()) {
		BOM component = (BOM) bom.next();

...

does not loop at all. In the bug list there is issue 4169582 which applied to the iterator() method returning null values. It still doesn't seem to work for me. I've doubly confirmed that my install of XCode 2.3 went right and I have 5.3.1 installed.

It appears that whenever the fault is resolved, things go right. If the object (array) is still a fault, then the method doesn't work. Calling willReadRelationship doesn't seem to do it either ?? I really don't want to have count() in front of every iterator() call.

Thanks,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


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: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSArray.iterator and NSArray.listIterator bug
      • From: John Larson <email@hidden>
References: 
 >NSArray.iterator and NSArray.listIterator bug (From: John Larson <email@hidden>)

  • Prev by Date: Re: Anybody know what this exception means on startup?
  • Next by Date: Re: NSArray.iterator and NSArray.listIterator bug
  • Previous by thread: NSArray.iterator and NSArray.listIterator bug
  • Next by thread: Re: NSArray.iterator and NSArray.listIterator bug
  • Index(es):
    • Date
    • Thread