Re: X-Code not formatting my code
Re: X-Code not formatting my code
- Subject: Re: X-Code not formatting my code
- From: Harald E Brandt <email@hidden>
- Date: Wed, 02 Mar 2011 21:07:11 +0100
On 14 jan 2011, at 18.38, Dave Higgins wrote: On Jan 14, 2011, at 10:32 AM, Dave wrote: This brings up another bug I often see in XCode's Applescript editor. Often the editor window menus which list the properties and handlers inside a file often lose track of proper nesting. It will start indenting handlers and properties that are actually at outermost scope and fail to show anything past a certain point in the file.
I see this all the time. I still can't figure out just where it goes awry. Been a while since I looked into it. I have a feeling that it has to do with a particular way of using if/then/else, but that's just a hunch.
Late answer, but perhaps better late than never...
It's all because the indenting in Xcode is strictly based on the assumption that all "if" statements should be terminated by an "end if". This is not necessarily the case with Applescript. I.e, whenever you have a handler that includes something like "if theVariable is 0 then return", then the handler following this handler will be indented. This has been the problem with AppleScript Studio for many years, and I personally find it very annoying, and extremely surprising that Apple, in all these years, hasn't bothered to adapt the editor to the AppleScript syntax.
--heb |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden