Cannot declare variables on the fly anymore
Cannot declare variables on the fly anymore
- Subject: Cannot declare variables on the fly anymore
- From: Lorenzo <email@hidden>
- Date: Tue, 08 Jul 2003 14:27:50 +0200
Hi,
Since I tried once only XCode, now using again Project Builder 2.1,
when I declare a variable in the middle of the method like "destName" here
below
...
exist = [manager fileExistsAtPath:myPath isDirectory:&isDir];
NSString *destName = [newPath stringByAppendingPathComponent:kFolder];
the compiler tells me: MYClass.m:436: parse error before `*'
meaning before "*destName"
To avoid the error message I have to declare the variables at the begin of
the method, and this means a ton of work...
I have to do
- (void)myMethod
{
BOOL exist ;
NSString *destName;
exist = [manager fileExistsAtPath:myPath isDirectory:&isDir];
destName = [newPath stringByAppendingPathComponent:kFolder];
...
What did happen to the compiler?
How could I fix this? Help!
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.