#582: Segmentation fault using ScriptingBridge
---------------------------------+------------------------------------------
Reporter: mar...@… | Owner: lsansone...@…
Type: defect | Status: closed
Priority: major | Milestone:
Component: MacRuby | Resolution: fixed
Keywords: |
---------------------------------+------------------------------------------
Changes (by martinlagarde...@…):
* status: new => closed
* resolution: => fixed
Comment:
Hi!
Thanks for the report.
Apparently, the bug is fixed, since with MacRuby SVN HEAD, the following
code works:
{{{
framework 'Foundation'
framework 'ScriptingBridge'
mail_app = SBApplication.applicationWithBundleIdentifier("com.apple.mail")
properties = NSDictionary.dictionaryWithObjectsAndKeys("Hello", "subject",
"Hello world!", "content", nil)
mail_msg = mail_app.classForScriptingClass("outgoing
message").alloc.initWithProperties(properties)
properties = NSDictionary.dictionaryWithObject("[email protected]",
forKey:"address")
mail_to = mail_app.classForScriptingClass("to
recipient").alloc.initWithProperties(properties)
mail_app.outgoingMessages.addObject(mail_msg)
mail_msg.toRecipients.addObject(mail_to)
mail_msg.send
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/582#comment:2>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel