Re: nil in NSArray

2008-12-13 Thread Clark Mueller
Well, there might not be any technical limitation against having nulls in the list, but as far as a design decision in the API, I can think of reasons why you wouldn't want them. The most obvious is that by making the guarantee that it has no null pointers, you don't have to check for nulls

Re: nil in NSArray

2008-12-13 Thread Mike Schrag
For example, in WO, if you're using an NSDictionary "bindings" for query bindings, you might want to query for some attribute "myAttribute" that equals NULL in your database, so you would do something like bindings.setObjectForKey(NSKeyValueCoding.NullValue, "myAttribute"). So when EOF is c

Re: nil in NSArray

2008-12-13 Thread Clark Mueller
And yeah... I guess that example is specific to NSDictionary. In NSArray's case... something to do with NSKeyValueCoding conformance maybe? Clark On 13-Dec-08, at 6:39 PM, Clark Mueller wrote: Oh, I see. You wanted explanation. :-) I suppose that if nothing else it would be for historical

Re: nil in NSArray

2008-12-13 Thread Clark Mueller
Oh, I see. You wanted explanation. :-) I suppose that if nothing else it would be for historical reasons, but I was under the impression there was a point to NSNull. Specifically, aren't there scenarios where you might want to distinguish a null pointer from querying for the "presence" of a

Re: nil in NSArray

2008-12-13 Thread Chuck Hill
On Dec 13, 2008, at 4:40 PM, Mike Schrag wrote: OK -- So what's the official reason why you aren't allowed to put a nil into an Objective-C NSArray? It seems like a pretty silly restriction to me ... Tradition? That is all that I can think of. Chuck -- Chuck Hill Senior Co

Re: nil in NSArray

2008-12-13 Thread Mike Schrag
Cocoa Foundation has NSNull as JavaFoundation does, why not use that? The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values). ... because it's a lame hack :) ? I know there are workarounds, but in 2008, I don't expect jun

Re: nil in NSArray

2008-12-13 Thread Clark Mueller
Cocoa Foundation has NSNull as JavaFoundation does, why not use that? The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values). Clark On 13-Dec-08, at 4:40 PM, Mike Schrag wrote: OK -- So what's the official reason why y

nil in NSArray

2008-12-13 Thread Mike Schrag
OK -- So what's the official reason why you aren't allowed to put a nil into an Objective-C NSArray? It seems like a pretty silly restriction to me ... ms ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing lis

java.lang.IllegalStateException: Cannot fire array fault with a null handler

2008-12-13 Thread Dov Rosenberg
Our application tends to get this error under load ­ i.e. Not while a single user is just clicking away. We have been looking into this trying to figure it out but we are somewhat baffled. Here is what we know so far: * When the exception happens we see stack traces that look like the following ja

Re: WO way to SELECT MAX(FOO) FROM BAR

2008-12-13 Thread Houdah - ML Pierre Bernard
Use SepcialityFetches from the HoudahEOAccess framework. On 11 Dec 2008, at 21:44, David Avendasora wrote: Hi all, I've googled this, but can't seem to find any answers even though I'm guessing it's a pretty common thing. I have a table that has nearly 2 million rows and I want to retrieve