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",
:
This is great Jean-Denis, thanks a lot.
A few notes, if you look at:
https://github.com/jdmuys/MacRubyReload/blob/master/MacRubyReload/AppDelegate.rb#L17-18
You don't need to end your lines of code by a semi colon and when using
puts, a return carriage is automatically used (use print if you don't
ScriptingBrige interfaces, here is a screenshot:
https://img.skitch.com/2015-dy4wrh9ppbybhxm4j4xn33ip9h.jpg
>From what I'm seeing the code you pasted missed a way to fetch the "canvas"
object.
But "canvas" is an instance of Omnicanvas which has a #shapes method
ret
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
Following up on my Friday suggestion, I am happy to announce that I implemented
a first version a Xcode MacRuby projects that dynamically reloads Ruby source
code into a running application, allowing for a very dynamic incremental
programming style.
go to https://github.com/jdmuys/MacRubyReload
o far:
https://img.skitch.com/2015-dy4wrh9ppbybhxm4j4xn33ip9h.jpg
Source code: https://github.com/mattetti/MacRuby-ScriptingBridge-Browser
At the moment, the header file is hardcoded instead of being generated on
the fly using sdef/sdp, the methods/properties documentation doesn't show
yet, t
Nice, Florian's version is much more complete, mine is merely an example to get
people started.
-m
Sent from my iPhone
On Nov 15, 2011, at 7:14, Eloy Duran wrote:
> There’s also James by Florian Hanke: https://github.com/floere/james
>
> On Mon, Nov 14, 2011 at 5:57 PM, Matt Aimonetti
> wro
There’s also James by Florian Hanke: https://github.com/floere/james
On Mon, Nov 14, 2011 at 5:57 PM, Matt Aimonetti wrote:
> I extracted an old demo I had made for RubyConf which shows how to use the
> voice recognizer feature of OS X to implement an app which could be the Siri
> equivalent for