How can I define an Objective C function in the @implementation of a class in such a way that the function has access to the ivars of the class ?
Thanks for any hint/help
Joan
Thanks for any hint/help
Joan
Hi Joan,
every Objective-C method has access to the ivars of the class.
My problem is not related to class methods, but to objective-C functions defined in the class. These functions are intended to be called by several of the methods of the class, but there is no way that they have access to the ivars of the class (independently that the function be defined inside the @implementation or outside it). Xcode compiler gives me an error and says that the corresponding IBoutlets are not defined when using them in the function.
objectPtr -> ivar
3. There is a difference between C functions. A C function in a .c file can not message an object using Objective C syntax. A C function in an Objective C implementation scope can.
My problem is not related to class methods, but to objective-C functions defined in the class. These functions are intended to be called by several of the methods of the class, but there is no way that they have access to the ivars of the class (independently that the function be defined inside the @implementation or outside it).