views:

90

answers:

1

Hi all,

I am trying to call the method "foo" which is in the class called "fooClass". In another class i have my appDelegate and I want to execute the method foo in applicationdidfinishlaunching. I have imported the class "fooClass" into the appDelegate header file and I did initiate it in applicationdidfinishlaunching with this:

"fooClass *blah = [[fooClass alloc]init];"

Then running the method by doing this:

"[blah foo];"

However when I debug and launch the program the stuff in foo method is not being executed. Can anyone help me out on this issue?

A: 

Check blah variable right before you call foo method. Is it initialized?

sha
Yes I believe it is because I have "fooClass *blah = [[fooClass alloc] init];"
Kevin
Can you post whole code including alloc and foo method call?
sha
There's not really much to it because I'm just trying to test this out. In the foo method there is only "NSlog(@"working"$;" to see I'd the method is being called. Other than that there's just the standard code for a window based app.
Kevin
Sorry I meant "Nslog(@"working);"
Kevin
The question is: what is between alloc and foo. Are they in the same function? Is *blah just internal variable or property? If you're trying to get help - please provide more information.
sha
Sorry I'm a noob at this objective c. Here is the source code if that will help solve the problem. http://www.mediafire.com/?5cs439r4cj2jrc2
Kevin