Re: [MacRuby-devel] Scripting OmniGraffle

2011-11-19 Thread Sophie
Thanks, Kam. Thanks, Matt. That was very helpful. Sophie > From: Kam Dahlin > To: "MacRuby development discussions." > > Subject: Re: [MacRuby-devel] Scripting OmniGraffle > Message-ID: <8a0549a1-912c-42d2-8a33-4a4a1950d...@me.com> > Content-Type: te

Re: [MacRuby-devel] Scripting OmniGraffle

2011-11-16 Thread Jordan K. Hubbard
This and many other great examples of "how to do FOO in MacRuby" lead me to wonder whether the wiki (or any wiki) is really being used to its fullest? Some real gems (no pun intended) have gone by, and it would be awesome for newcomers to have a place to go where they can explore a variety of

Re: [MacRuby-devel] Scripting OmniGraffle

2011-11-15 Thread Kam Dahlin
Hi Sophie, Here is a little example, that I hope makes things more clear. graffle = SBApplication.applicationWithBundleIdentifier("com.omnigroup.OmniGrafflePro") win = graffle.windows.first canvas = win.canvas circle = OmniGraffleProfessionalShape.alloc.initWithProperties({:name=>"Circle", :

Re: [MacRuby-devel] Scripting OmniGraffle

2011-11-15 Thread Matt Aimonetti
Sophie, alloc.init is the same as new in Ruby and probably make in applescript. Basically, alloc allocate an object of a given type and initialize it. All instances of a class can be initiated using alloc.init. If you look at my previous post, I started working on an application that document the

[MacRuby-devel] Scripting OmniGraffle

2011-11-15 Thread Sophie
Sorry for the sloppy subject line in my earlier question. Thanks, Kam, Matt for your very helpful replies. Kam, any idea how I would initialize the alloc'd shape to be e.g. a Circle of some size at some position? I generated the files with sdef & gen_bridge_metadata, found lots of useful thin