plist <key><value> not matching
plist <key><value> not matching
- Subject: plist <key><value> not matching
- From: Erwin <email@hidden>
- Date: Wed, 22 Sep 2004 15:33:33 +0200
I have a plist file in my WO app with the following structure :
</key>
<array>
<dict>
</key>
</string>
</key>
</integer>
</dict>
<dict>
</key>
Twenty Five </string>
</key>
</integer>
</dict>
<dict>
</key>
Fifty </string>
</key>
</integer>
</dict>
<dict>
</key>
Hundred </string>
</key>
</integer>
</dict>
........
</array>
.....
I use the 'displayValue' to display string in a popup button.
Given an Integer variable (aValue) I tried to search for the displayValue with the following method :
public NSDictionary lowerLimitPrice(Integer aValue) {
NSDictionary _lowerLimitPrice = null;
java.util.Enumeration enumerator = lowerLimitPricesArray().objectEnumerator();
while (enumerator.hasMoreElements()) {
_lowerLimitPrice = (NSDictionary) enumerator.nextElement();
if (_lowerLimitPrice.valueForKey("value") == aValue) { return _lowerLimitPrice; }
}
return _lowerLimitPrice;
}
There is never a match as
_lowerLimitPrice.valueForKey("value") is always seen as a String (?) in the debugger.
Sure I could use only strings in the plist and use aValue.toString() to compare them (it runs..) but why is it possible to specify <integer> in the plist ?
_______________________________________________
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