• 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
plist <key><value> not matching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: plist <key><value> not matching
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: Re: App level function to happen every X minutes 24-7
  • Next by Date: Re: plist <key><value> not matching
  • Previous by thread: Re: Catching Bounced emails with WebObjects
  • Next by thread: Re: plist <key><value> not matching
  • Index(es):
    • Date
    • Thread