Re: Snapshot problems
Re: Snapshot problems
- Subject: Re: Snapshot problems
- From: Chuck Hill <email@hidden>
- Date: Fri, 20 Apr 2007 15:10:48 -0700
On Apr 20, 2007, at 2:55 PM, Steven Mark McCraw wrote:
On Apr 20, 2007, at 5:41 PM, Chuck Hill wrote:
On Apr 20, 2007, at 2:28 PM, Steven Mark McCraw wrote:
Another explanation occurred to me. Do you have any custom
attributes in any of the objects? Are any of them mutable (e.g.
NSMutableDictionary, NSMutableArray, a custom class that you
wrote)?
Yes, many of my classes have custom attributes. CatalogItem has
an NSMutableDictionary and an NSMutableArray as custom attributes.
DING DING DING! We have a winner!
I believe some of my EOs also have attributes that are
references to custom classes that I have written. Could this be
problematic?
Mutable attributes are death to EOF. That is your problem. Or at
least one of them. If you really, really work at it you can
probably get it to work, but it is really not worth the effort
IMO. Make them immutable. Add cover methods to modify these
values: make a mutable clone of the attribute, modify it, make an
immutable clone and replace the attribute value. See page 43 of
PWO if you have it. If you don't have it, can pretty much assure
that you want it!
Chuck
Wow! Ok, I had no idea.
Neither did I the first time I did that. It was a nice, sunny
weekend too.
I'll go through and strip all of those out in whatever way is
necessary. I have PWO, but I loaned it to another developer at my
company for something. Sounds like I need to re-read it, and I
figure buying another copy is the least I can do, so I'm buying the
eBook. I'll check it out and let you know how it goes.
I have issued :-P another commandment in honor of your pain:
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/
The_EOF_Commandments
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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