| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 16 Oct 2008, at 11:31 am, James Trankelson wrote:
... and when I would call it ([inst foo:0.001], for example), the value inside the foo method would NOT be 0.001. At the time, I believed there to be an Objective C requirement that parameters to methods need to be pointers to objects, not primitive values. So, I achieved success by changing the above method declaration to
-(void) foo:(NSNumber*)val { }
... and passing in a NSNumber* with a float value worked.
Now, I'm having the same problem, but am not convinced there is any such requirement that parameters be pointers to object instances. (I could be wrong, though)
--Graham _______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
| References: | |
| >Objective-C parameter mutation (From: "James Trankelson" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.