Re: value transformer for structs?
Re: value transformer for structs?
- Subject: Re: value transformer for structs?
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 22 Mar 2006 23:19:58 -0800
On Mar 22, 2006, at 9:07 PM, Michael B Johnson wrote:
I'm assuming I'm missing something obvious, but let's say I have an
object that returns a struct (like an NSRect, or better yet, a
QTTime) that I want to use bindings to show in the UI.
Looking at the doc it seems (understandably) expecting objects.
Can I do this, or should I have my class return that thing as an
NSString or somesuch?
Value transformers do have to take and return objects. For an
NSRect, I've used NSRectFromString() and NSStringFromRect() to go
back and forth with string representation. There are equivalent also
point, range, and size functions. As it happens, there's also a
QQTimeFromString() function.
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
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