EOs and NSData?

Ricardo Strausz <[email protected]> Mon, 9 Jun 2003 13:00:18 -0500
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <[email protected]>
Hola a tod@s!

Does someone had use NSDocument and EOF succesfully?

>>
>>> Is there a simple way to encapsulate all instance variables of an eo 
>>> into a single nsdata object?
>>
>> 	By default, EO classes derive from EOGenericRecord whose instance 
>> variables are private, including the dictionary that stores property 
>> values.  EOGenericRecord's snapshot() method will return a dictionary 
>> of EO property values which could be serialized into an NSData object 
>> by NSPropertyListSerialization.dataFromPropertyList().  Is this what 
>> you mean?
>
> I am not sure yet... I want to use NSDocument inside Cocoa/EO. The 
> natural way to "load" an nsdoc, is by passing to it an nsdata and a 
> type. So I want to init the doc with an eo, but I have to be able to 
> "read-back" the variables of the eo from the nsdata.
>
> The hint sounds good to me, ...then I will have to "deserialize" right?
>
> Other cuestion (i'd never used snapshot); does this dictionary 
> includes ALL variables? I mean, do I nead to mark the atribute with 
> the "dimond" in EOModeler in order to see it?
>
> Thanks in advance!
>


Dino
http://homepage.mac.com/strausz