NSWorkspace.sharedWorkspace.recycleURLs:completionHandler: fails for
me when run via normal macruby, yet works in macirb.
Sample code:
#!/usr/bin/env macruby
framework 'Cocoa'
path = "#{ENV['HOME']}/Desktop/Y-U-NO-TRASH-ME-MACRUBY.txt"
system "touch #{path}"
url = NSURL.fileURLWithPath(path)
urls = [url]
NSWorkspace.sharedWorkspace.recycleURLs(urls, completionHandler:nil)
puts "Should be false: #{File.exists?(path)}"
(or: https://gist.github.com/960048c72a9b55db40b3)
Output from running it:
$ macirb foo.rb
# … irb output elided
Should be false: false
$ macruby foo.rb
Should be false: true
Running on public release of Lion, clean install, with latest macruby
nightly, bridgesupport preview 3.
The equivalent code works fine in Nu.
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel