Hello,
In TM 2, the Build Target... command in the Ant bundle is failing with the following error message:
tm_dialog: [NOTE: this exception originated in the server.] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x7f86bff03020 /Users/rob/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:198:in `load': Cannot parse a NULL or zero-length data (OSX::PropertyListError) from /Users/rob/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:198:in `menu' from /Users/rob/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:193:in `popen' from /Users/rob/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/ui.rb:193:in `menu' from Build Target…:63
Looking at the Bundles section of Preferences, it appears that I have the latest updates of both the Ant and the Bundle Support bundles. I'm not a Ruby guy, so I'm not entirely sure what's up with this. Line 63 in the bundle command is:
res = TextMate::UI.menu(ant_targets)
Lines 193-198 in ui.rb are:
193 res = ::IO.popen("#{TM_DIALOG} -u", "r+") do |io| 194 Thread.new do 195 plist = { 'menuItems' => options }.to_plist 196 io.write plist; io.close_write 197 end 198 OSX::PropertyList::load(io)
Any ideas how how to solve that problem? I actually hasn't worked since TM 2 came out, but I'm just now getting around to trying to figure it out.
Thanks, Rob
On 15 Jul 2013, at 16:26, Rob Cope wrote:
[…] Support.tmbundle/Support/shared/lib/ui.rb:198:in `load': Cannot parse a NULL or zero-length data (OSX::PropertyListError) […] res = TextMate::UI.menu(ant_targets) […] Any ideas how how to solve that problem? I actually hasn't worked since TM 2 came out, but I'm just now getting around to trying to figure it out.
The issue here seems to be with the property list that gets constructed from the ‘ant_targets’ variable.
You can dump the variable with:
pp ant_targets
You should do that before calling TextMate::UI.menu, and in the top of the source, add:
require "pp"
This should give us an idea of wether the variable is indeed a “bad” data structure (e.g. containing ‘nil’ values) or if the issue is with the library code being used (i.e. the code implicitly invoked by TextMate::UI.menu).
If you provide an ant.xml file I can test if I see the same problem (and possibly find the cause).