NSSearchField Predicate Failure: Unable to use '<attribute name> == $value' for scalers
NSSearchField Predicate Failure: Unable to use '<attribute name> == $value' for scalers
- Subject: NSSearchField Predicate Failure: Unable to use '<attribute name> == $value' for scalers
- From: Ron Lue-Sang <email@hidden>
- Date: Fri, 20 Jan 2006 14:14:02 -0800
You can fix this in the searchfield binding's predicate format in one
of two ways.
1) Instead of $value, use ($value).intValue (or floatValue, or
doubleValue)
or
2) Instead of variableName, use variableName.description
The problem with option 2 is that you'll really be doing string
comparison instead of int value comparison, which could give you
incorrect results for things like 00007.
The problem with option 1 is that if you type something into the
searchfield that's not a number value, the searchfield resets itself
(chooses the first menu item in the searchfield popup menu). That
might be a bug.
Date: Fri, 20 Jan 2006 12:03:56 -0800
From: "Frederick C. Lee" <email@hidden>
Subject: NSSearchField Predicate Failure: Unable to use '<attribute
name> == $value' for scalers
To: Cocoa Developers <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
I can't do searches of simple integers within a NSTableColumn/
NSArrayController.
The following predicate works with String values but not with simple
scaler values:
<variable> == $value -- only appears to work with strings, not scaler.
However,
<variable == <constant> --- does work.
So the problem appears to be '$value'. Is there a numeric equivalent
to the string pattern search?
... or do I have to convert $value to a string for the comparison to
work?
Ric.
-----------------------------
Ronzilla
Core Bindings/Cocoa Data
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden