xcode - Calling an external Class Method is causing Crash objective-c -
I have two squares using Box 2D, cocos 2D.
Construct.mm and Level1.mm are all included in the construction box. 2D Physics is the information on how to create different objects in the engine engine - plotting objects in level 1
I have in the implementation of the implementation:
Construct.mm
- Some zero (infant) method (level 1 * level 1 = [[Level1 alloc] init]; [level 1 mapping ];} - (zero) SomeCertrectMath: (Logic) ments {// create rect} I have a level1 implementation:
Level1.mm - (zero ) Mapping {Construction * Constr; if (Constr == null) Constr = [[Alloc building] init]; [some Knwrekt Rektmthः (argument)) MMS []; } Now, I know that the level1 * level1 allocation is working fine. It jumps - (zero) mapping {}.
Build my problem * Creating constr objects and if it is in the beginning without (constr == zero) statement simulator will die directly, before posting any error report.
If I put (constr == zero) and then try calling [constr something CreateRectMethod: arguement];
Console report: * * Exclude the application 'NSInvalidArgumentException' due to exception exceptions, reason: '- [Level1 someCreateRectMethod :]: Unrecognized selector example sent to 0x5557fc0 ' I think this is not because it is not allocated, so trying to send itself (Level 1) instead of creation is.
Why not my creation * Not to allocate the constr class object? Like I said, no error reporting is going to happen .. I have imported the construct.h file. I have tried to do this work in the last four hours.
Edit I have just created Layer 1 and instead of calling [constr something CreateRectMethod]; I just call [super someCreateRectMethod];
It should work theoretically, but the simulator crashes and there is no error reporting log.
Once again, thank you for your time.
Oliver.
You probably do not end up making constr - the initial value is undefined and therefore is not likely to be zero. If your code otherwise ends on [[constr alloc] init) it seems that you have failed in the NSObject subclass (which you should do) and did not implement init (which you want to do often).
Comments
Post a Comment