Re: Passing numbers through userdata
Re: Passing numbers through userdata
- Subject: Re: Passing numbers through userdata
- From: Larry Fransson <email@hidden>
- Date: Wed, 15 Dec 2004 07:31:56 -0800
On Dec 15, 2004, at 06:54, Fritz Anderson wrote:
If I pass an int directly through the userdata property, I get the
problem "warning: passing arg 3 of
`addTrackingRect:owner:userData:assumeInside:' makes pointer from
integer without a cast" However, it does work, even though when I
retrieve the int I get the warning, "assignment makes integer from
pointer without a cast"
You could cast the integer to void * (as in userData: (void *) myInt),
but it is bad karma to use pointer storage for integers (and vice
versa, as when you do the reverse cast at the other end).
Why not pass &myInt? Wouldn't that work?
Larry Fransson
Seattle, WA
_______________________________________________
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