Questions tagged [ruby-cocoa]
24 questions
16
votes
3 answers
Should I learn MacRuby or RubyCocoa
I am wanting to learn mac development with ruby but I'm not sure which one to go at. RubyCocoa has been around longer but I think MacRuby will beat it out in the long run..
Any suggestions??

user73481
- 901
- 2
- 9
- 15
8
votes
5 answers
PyObjc vs RubyCocoa for Mac development: Which is more mature?
I've been wanting to have a play with either Ruby or Python while at the same time I've been wanting to do a bit of Cocoa programming.
So I thought the best way to achieve both these goals is to develop something using either a Ruby or Python to…

hhafez
- 38,949
- 39
- 113
- 143
4
votes
4 answers
PyObjC / Ruby bridge. Is it worthwhile ?
Years ago wanting to write Mac software and having loads of experience with Java WebObjects I tried the java bridge but decided to bite the bullet and learn Objective-C (fortunately since I would have hated having my software deprecated with the…

team-rf
- 241
- 1
- 7
4
votes
1 answer
How do I make Interface Builder recognize IBOutlet/IBAction for new languages?
it's a theoretical question: suppose I come up with an outstanding new scripting language and want to make a Cocoa bridge for that.
Is it possible to make Interface Builder recognize the new language and parse the source code automatically so that…

Yuji
- 34,103
- 3
- 70
- 88
3
votes
2 answers
Using RSpec for iPhone Controllers
I'm finally getting the hang of RSpec after spending a couple of hours over the weekend. Now I'm stuck trying to figure out how to assert that parameters are indeed passed into the controller. I'm following the Bowled over by Ruby/Cocoa example and…

Cliff
- 10,586
- 7
- 61
- 102
2
votes
1 answer
Using Ruby on Mac OS X, how to programmatically click on the screen -- and mouse move, mouse down, and mouse up?
What are the best way(s) to do it? Can ffi, RubyCocoa, or MacRuby do it?
It seems like CGEventCreateMouseEvent or CGPostMouseEvent (deprecated) can be used.
Please give a working example. thanks.
Update: the title of this question updated...

nonopolarity
- 146,324
- 131
- 460
- 740
2
votes
9 answers
Which is easier for beginners: RubyCocoa or ObjC/Cocoa
I've heard a few debates in the past over which is more mature: RubyCocoa or Obj-C/Cocoa... but I have felt that the answers jet right over the "newbie" that would truly appreciate an answer.
So the question is: for a total beginner, with…

DarthNerdus
- 1,340
- 1
- 13
- 14
2
votes
1 answer
Xcode: How-to create a Terminal window inside my application?
While I am playing with Rubycocoa, I created a small application that works like a charm. However, the only thing missing is like a Terminal inside my application. In Coda, there is a similar kind of view that allows you to open up a terminal…

Shyam
- 2,357
- 8
- 32
- 44
2
votes
3 answers
Ruby threads cannot be used in RubyCocoa without patches to the Ruby interpreter
I found this error in Ruby console while I am testing a Rails application.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib /mongrel.rb:285:
in `run': Ruby threads cannot be used in RubyCocoa…

Teerasej
- 1,486
- 4
- 21
- 31
2
votes
4 answers
Build same RubyCocoa application version for Leopard and Snow Leopard
I have RubyCocoa 0.13.2 based application. It works on 10.5.8 and earlier versions. When i try to run it on 10.6 it crashes on infinite loop. 10.6 has 0.13.2 built in, but it's not same binary as for 10.5. When i tried to build my application's…

Nava Carmon
- 4,523
- 3
- 40
- 74
2
votes
1 answer
cannot load such file -- osx/cocoa error on 1.9.3
I am encountering the following error with osx-trash.
I am on ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-darwin12.2.0]
$ gem install osx-trash
Successfully installed osx-trash-1.0.0
1 gem installed
Installing ri documentation for…

xjq233p_1
- 7,810
- 11
- 61
- 107
2
votes
1 answer
Installing wkpdf in rbenv environment
I have a clean install of mountain lion 10.8.2 and have installed rbenv and gem installed wkpdf. When I try and run wkpdf, I get the following message:
xxxx-MacBook-Pro:~ xxx$ wkpdf --help
Cannot load RubyCocoa library
wkpdf requires that…

pdoak
- 721
- 8
- 21
2
votes
1 answer
Error drawing text on NSImage in PyObjC
I'm trying to overlay an image with some text using PyObjC, while striving to answer my question, "Annotate images using tools built into OS X". By referencing CocoaMagic, a RubyObjC replacement for RMagick, I've come up with this:
#!/usr/bin/env…

Clinton Blackmore
- 2,427
- 2
- 24
- 31
1
vote
4 answers
Segmentation fault on Lion creating NSData from RubyCocoa with any bytes > 127
The following RubyCocoa is fine on Max OS X 10.6, but segfaults on 10.7
require 'osx/cocoa'
include OSX
bytes = [128].pack('i1')
NSData.alloc.initWithBytes_length(bytes, bytes.length)
In all cases it works when the top bit is not set. In fact…

Duncan McGregor
- 17,665
- 12
- 64
- 118
1
vote
2 answers
Read system information using macruby or ruby cocoa
Could someone tell me please how to read system information, such as OS version, versions of installed applications, and hardware details, using MacRuby or RubyCocoa?

Alexey Poimtsev
- 2,845
- 3
- 35
- 63