simongregory / actionscript3-tmbundle

ActionScript 3 TextMate Bundle
http://blog.simongregory.com
MIT License
118 stars 46 forks source link

Auto Complete Exception #10

Open mokkun opened 14 years ago

mokkun commented 14 years ago

I'm getting the following exception when using auto complete:

Exception "can't convert Array into String"

Location /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:518:in directory?' /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:518:inadd_src_dir' /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:508:in create_src_list' /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:98:ininitialize' /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/bin/complete.rb:16:in `new' /Users/$USER/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/bin/complete.rb:16

I'm using the version 1.5.9 (1589) of TextMate, the last version of the Actionscript3 bundle and I've already upgraded the Support folder.

Thanks in advance

simongregory commented 14 years ago

Looking at the stack trace I'm slight confused as to why your paths have '$USER' in them. ie:

/Users/$USER/Library/Application Support/

if I add an artificial problem on the same line I see:

/Users/simon/Library/Application Support/

Do you really have a username of $USER ?

artdevgame commented 14 years ago

Same problem here dude. It's working fine on my home computer, work computer I get the following:

/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:565:in `directory?'
/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:565:in `add_src_dir'
/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:555:in `create_src_list'
/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:76:in `initialize'
/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/bin/complete.rb:16:in `new'
/Users/turtle/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/bin/complete.rb:16
mattarau commented 13 years ago

Same here and my username is ok: /Users/maraujo/Library/Application Support/

AS3 bundle and Textmate were just installed (Support folder updated via svn). Thanks

simongregory commented 13 years ago

Looking at flyingbuddha's stack trace this may be because the bundle cannot find the Flex SDK. It parses the src included in the SDK to provide the completions list. So setting the env variable TM_FLEX_PATH may help. From within TextMate run Bundles > ActionScript 3 > Help for details on how to do this.

In the meantime I'll test this theory, and if it's right catch the error and warn the user in a more elegant manner.

simongregory commented 13 years ago

Ok, I've hidden the SDK's from the bundle on my machine and run the autocomplete command and it still works as expected.

Anyone have more details about their set up?

mattarau commented 13 years ago

In my case, adding the TM_FLEX_PATH to the shell variables solved the problem. Thanks a lot!!!