[MacRuby-devel] Scripting OmniGraffle
mattaimonetti at gmail.com
Tue Nov 15 11:57:36 PST 2011
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
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 ScriptingBrige interfaces, here is a screenshot:
>From what I'm seeing the code you pasted missed a way to fetch the "canvas"
But "canvas" is an instance of Omnicanvas which has a #shapes method
returning an array to which Kam adds the shape previously created.
I hope that helps.
On Tue, Nov 15, 2011 at 4:43 PM, Sophie <itsme213 at hotmail.com> wrote:
> 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 things there. Is there something in these files that would lead me
> shape = OmniGraffleShape.alloc.init
> canvas.shapes.addObject shape
> ? I don't see either alloc or init, or addObject in the 2 files.
> Also, is there some reason why there is no corresponding "make ..." method
> in either file? Applescript gladly seems to call "make" (so does Ruby
> Appscript) on doc, canvas, or layer ... but I'm no Applescript guru :-(
> Thanks !!
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MacRuby-devel