ScriptingBridge offers a couple of ways of creating objects. One is to use the
generated classes and then just alloc/-init or -initWithProperties to create an
object of that class type.
The other is to use -classForScriptingClass on SBApplication to get the
scripting class you want to create an
You could try generating the Skype Scripting Bridge header. That will at least
give you better documentation on what Skype's SB API looks like.
Take a look here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/UsingScriptingBridge/UsingScriptingBri
If you didn't want to use a category, you could do:
orderedSet = NSOrderedSet.orderedSetWithArray(["1", "2", "3"])
orderedSet.class.send(:define_method, :each) do
self.array.each do |item|
yield item
end
end
orderedSet.each do |item|
puts item
end
This method also has the advant
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",
:
You will need to create a shape object and then add it to the correct container.
something like:
shape = OmniGraffleShape.alloc.init
canvas.shapes.addObject shape
The different shape classes can be views by generating the OmniGraffle
scriptingbridge header with:
sdef /Path/To/OmniGraffle.app |
t;> Thomas,
>>
>> Are you still getting an undefined method error, or something new? Do you
>> have a "framework 'Cocoa'" line somewhere in your app?
>>
>> - Josh
>>
>> On Wed, Apr 27, 2011 at 12:10 PM, Thomas R. Koll wrote:
&g
Hi,
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTrackingArea_class/Reference/Reference.html
Looks like the initializer is:
– initWithRect:options:owner:userInfo:
Try something like:
tc = NSTrackingArea.alloc.initWithRect(self.bounds,
options:(NSTrackingMouseEntered