• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cannot declare variables on the fly anymore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: NSOpenPanel limited to the Home folder ?
  • Next by Date: Re: Cannot declare variables in the middle anymore
  • Previous by thread: Re: NSOpenPanel limited to the Home folder ?
  • Next by thread: Re: Cannot declare variables in the middle anymore
  • Index(es):
    • Date
    • Thread