Re: NSDictionary Within An NSDictionary - Getting Values
Re: NSDictionary Within An NSDictionary - Getting Values
- Subject: Re: NSDictionary Within An NSDictionary - Getting Values
- From: Chuck Hill <email@hidden>
- Date: Mon, 19 Jan 2004 17:24:00 -0800
- Organization: Global Village Consulting, Inc.
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?
Spelling counts in KVC as in many aspects of life. :-P
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>
_______________________________________________
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.