Re: value transformer for structs?
Re: value transformer for structs?
- Subject: Re: value transformer for structs?
- From: Ryan Britton <email@hidden>
- Date: Wed, 22 Mar 2006 21:36:53 -0800
NSValue can be used to wrap a struct. Take a look at the
documentation for NSValue, + (NSValue *)valueWithBytes:(const void *)
value objCType:(const char *)type in particular.
http://www.devworld.apple.com/documentation/Cocoa/Reference/
Foundation/ObjC_classic/Classes/NSValue.html#//apple_ref/occ/clm/
NSValue/valueWithBytes:objCType:
There are convenience methods if you use the standard foundation
structs.
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?
--> Michael B. Johnson, PhD
--> http://homepage.mac.com/drwave (new & improved!)
--> http://xenia.media.mit.edu/~wave (alum)
--> MPG Lead
--> Pixar Animation Studios
_______________________________________________
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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