• 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: NSDictionary Within An NSDictionary - Getting Values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary Within An NSDictionary - Getting Values


  • Subject: Re: NSDictionary Within An NSDictionary - Getting Values
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Tue, 20 Jan 2004 01:36:24 +0000

From: Chuck Hill <email@hidden>
Reply-To: email@hidden
To: Jonathan Fleming <email@hidden>
CC: email@hidden
Subject: Re: NSDictionary Within An NSDictionary - Getting Values
Date: Mon, 19 Jan 2004 17:24:00 -0800

Well, let's take a look at it:

{item =

{values =
values is internal dictionary in an EOGenericRecord. It is good that you can't get this.



{attr1 = "Adult Male";
I'm reasonably certain that selling people is not legal in most countries. AFAIK, the practice has been largely abandoned.



attr2 = <com.webobjects.foundation.NSKeyValueCoding$Null>;
attr3 = <com.webobjects.foundation.NSKeyValueCoding$Null>;
attr4 = <com.webobjects.foundation.NSKeyValueCoding$Null>;
attr5 = <com.webobjects.foundation.NSKeyValueCoding$Null>;
productid = "AV-SB-02";
listPrice = 15.000000000000000000000000000000;
supplier = "<com.webobjects.eocontrol.EOGenericRecord 50988> (com.webobjects.eoaccess.EOAccessFaultHandler
_EOIntegralKeyGlobalID[Supplier (java.lang.Integer)1])>";


itemid = "EST-19";
product = "<com.webobjectsexamples.petstore.Product 941f7
_EOVectorKeyGlobalID[Product (java.lang.String)AV-SB-02]>";
unitCost = 2.000000000000000000000000000000;
status = "P";
inventory = "<com.webobjectsexamples.petstore.Inventory 34e29b _EOVectorKeyGlobalID[Inventory (java.lang.String)EST-19]>"; };


this = "<com.webobjectsexamples.petstore.Item 7a1576 _EOVectorKeyGlobalID[Item (java.lang.String)EST-19]>"; };
So item is an object of type Item.


total = 30.0;
qty = 3; }

I see no itemPrice. Do you? Did you perhaps mean listPrice?

Yes sorry, I was writting before thinking

Spelling counts in KVC as in many aspects of life. :-P

Yes I know and I did write the correct key in the path and still could not get the value... wait just did it again and got the value... I can't believe that, I must have been writting in the wrong key all along. Dah


Thank for your time Chuck
Jonathan :^)



Chuck


Jonathan Fleming wrote:

I want to be able to get the itemPrice value out of this dictionary so I'm using valueForKeyPath("item.itemPrice") and I've even used valueForKeyPath("item.values.itemPrice") but I just get the exception saying:
error1
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: valueForKey(): lookup of unknown key: 'itemPrice'. This class does not have an instance variable of the name values or _values, nor a method of the name values, _values, getValues, or _getValues
error2
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: valueForKey(): lookup of unknown key: 'values'. This class does not have an instance variable of the name values or _values, nor a method of the name values, _values, getValues, or _getValues



{item = {values = {attr1 = "Adult Male"; attr2 = <com.webobjects.foundation.NSKeyValueCoding$Null>; attr3 = <com.webobjects.foundation.NSKeyValueCoding$Null>; attr4 = <com.webobjects.foundation.NSKeyValueCoding$Null>; attr5 = <com.webobjects.foundation.NSKeyValueCoding$Null>; productid = "AV-SB-02"; listPrice = 15.000000000000000000000000000000; supplier = "<com.webobjects.eocontrol.EOGenericRecord 50988 (com.webobjects.eoaccess.EOAccessFaultHandler _EOIntegralKeyGlobalID[Supplier (java.lang.Integer)1])>"; itemid = "EST-19"; product = "<com.webobjectsexamples.petstore.Product 941f7 _EOVectorKeyGlobalID[Product (java.lang.String)AV-SB-02]>"; unitCost = 2.000000000000000000000000000000; status = "P"; inventory = "<com.webobjectsexamples.petstore.Inventory 34e29b _EOVectorKeyGlobalID[Inventory (java.lang.String)EST-19]>"; }; this = "<com.webobjectsexamples.petstore.Item 7a1576 _EOVectorKeyGlobalID[Item (java.lang.String)EST-19]>"; }; total = 30.0; qty = 3; }



Kind regards Jonathan

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

It is a funny thing about life; if you refuse to accept
anything but the best, you very often get it."
  --  W. Somerset Maugham

<shamelessPlug>
  Practical WebObjects
  http://www.amazon.com/exec/obidos/tg/detail/-/1590592964
</shamelessPlug>



_________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSDictionary Within An NSDictionary - Getting Values
  • Next by Date: Re: How-To Create WO application Portal
  • Previous by thread: Re: NSDictionary Within An NSDictionary - Getting Values
  • Next by thread: Re: NSDictionary Within An NSDictionary - Getting Values
  • Index(es):
    • Date
    • Thread