Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bleer

macrumors newbie
Original poster
Jul 16, 2008
18
0
Hey,

So i have defined a class to extend some other class and i added custom properties for it, say

@interface class:uiclass{

int a;
}

@property(nonatomic,assign) a;

then I synthesize in the implementation....using the accessor and getter methods in the actual class work fine, but now im trying to define an instance of this class in some other class and when i try to use the getter or setter methods for the class the application crashes...what am i doing wrong?

Thanks
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
When you say "use the getter or setter methods for the class the application crashes" you mean on an instance of the class right? The property along with it's accessor methods are instance, not class level.
 

bleer

macrumors newbie
Original poster
Jul 16, 2008
18
0
When you say "use the getter or setter methods for the class the application crashes" you mean on an instance of the class right? The property along with it's accessor methods are instance, not class level.
Yes after it has been initialized
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Can you post the code that is causing the crash (including the object creation and initialisation). There is no reason that this should crash!
 

bleer

macrumors newbie
Original poster
Jul 16, 2008
18
0
I think I know what's happening I'll post back ifmy issue isn't resolved..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.