How do I do KVC/KVO for struct properties
How do I do KVC/KVO for struct properties
- Subject: How do I do KVC/KVO for struct properties
- From: Derrick Bass <email@hidden>
- Date: Thu, 16 Mar 2006 16:32:59 -0800
I'd like to support KVC for a struct (QTTime, to be specific)
property of a class. I added a valueForKey: and setValueForKey: pair
of methods. When they get the "time" key, they pack/unpack the QTTime
from an NSValue; otherwise they call super's implementation. I also
made value transformer so the table in my view can convert between
strings and NSValue's containing QTTimes. That all seems to work
wonderfully.
The problem is that now I'm trying to do some KVO stuff and I've
discovered that notifications are not sent for changes the "time"
key. Do I have to manually send these notifications in my overridden
valueForKey: method? Or is overriding valueForKey: not the right way
to support structs in the first place?
Thanks in advance for any help.
Derrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden