Questions tagged [macruby]

MacRuby is an implementation of the Ruby 1.9 programming language in ObjC for Mac OSX

MacRuby is an implementation of Ruby 1.9 directly on top of Mac OS X core technologies such as the Objective-C runtime and garbage collector, the LLVM compiler infrastructure and the Foundation and ICU frameworks. It is the goal of MacRuby to enable the creation of full-fledged Mac OS X applications which do not sacrifice performance in order to enjoy the benefits of using Ruby.

http://macruby.org/

221 questions
0
votes
2 answers

How do I execute a command, feed data to its stdin, and read from its stdout in MacRuby?

I'm attempting to execute a command, feed data to its stdin, and read from its stdout. I've tried using Ruby's Open3#popen3 as well as NSTask, exposed via MacRuby. The source for the program I'm writing is available here. I'm doing this in Xcode and…
Colin Dean
  • 1,429
  • 1
  • 15
  • 26
0
votes
1 answer

hotcocoa button background colour

I'm working on project which based on macruby and hotcocoa framework. I don't know objective c. In my project I would like to change color of button (NSButton). Do you know how to achieve this using hotcocoa mappers or macruby?
cotampanie
  • 65
  • 1
  • 3
0
votes
1 answer

Persist the content and order of an array controller in cocoa

I have a Mac OS application that uses core data to persist its objects to disk, backed by sqlite. I have a tableView where all the NSManagedObject subclasses can be inspected. This is bound to an arrayController that is bound to an entity in a…
ryecroft
  • 352
  • 2
  • 9
0
votes
1 answer

How to compile a simple ruby script with macruby?

I'm trying to compile a simple "Hello World" ruby script to a Mac OS binary using macrubyc. This is the command I'm using: macrubyc -C hello_world.rb This is the output of the file command: file hello_world.rbo hello_world.rbo: Mach-O 64-bit bundle…
ddario
  • 1,015
  • 3
  • 12
  • 25
0
votes
0 answers

Macruby can not load dispatch gem in application

I want to use Dispatch gem in MacRuby to use concurrency in my app. But I got into a tricky problem with this. I tried to install Dispatch gem via 'gem install dispatch', via 'macgem install dispatch', via sudo both previous variants. But if I try…
DarkDeny
  • 1,750
  • 2
  • 21
  • 31
0
votes
1 answer

Should I try to implement MVVM pattern in MacRuby, or there is another pattern which suits better?

I am creating a small GUI application with MacRuby, and since I am from .NET world (WPF) I want to use MVVM pattern in my app. But I am not sure if it is OK ti walk MVVM way with Ruby, because probably there can be another more suitable way in…
DarkDeny
  • 1,750
  • 2
  • 21
  • 31
0
votes
2 answers

MacRuby pointers and Obj-C function returning a value by reference

I am trying to implement the following method of NSAttributedString in Macruby: (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange As by definition, it Returns the value for an attribute with a…
kwicher
  • 2,092
  • 1
  • 19
  • 28
0
votes
0 answers

MacRuby (StopWatch tutorial) and Xcode: how to play with your app in Xcode

super new to MacRuby and Xcode. I just went through the StopWatch tutorial (https://github.com/MacRuby/MacRuby/wiki/Creating-a-simple-application) and all went well. Was able to deploy it successfully...or the build went successfully. How exactly do…
Nubtacular
  • 1,367
  • 2
  • 18
  • 38
0
votes
1 answer

NSBezierPath / Line Intersection / flatten

I'm currently porting my jruby/java2d Graph Drawing/Layouting application to macruby/cocoa. Therefore I need to get the intersection point of an open NSBezierPath with an closed NSBezierPath. In java2d I used the following trick. I flattened both…
thestoneage
  • 132
  • 1
  • 10
0
votes
1 answer

Is it possible to use MacRuby on XCode 3

Is it possible to run MacRuby with XCode 3? It is not possible for me to upgrade to XCode 4.2 because I am running Snow Leopard and have a machine that will not upgrade to Mountain Lion and Apple has pulled Lion from the App Store. I know you can…
JAMESSTONEco
  • 2,051
  • 15
  • 21
0
votes
1 answer

MacRuby release app missing libmacruby.dylib

Using XCode 4.5.2 and MacRuby 0.12, my app works fine on my computer but the release version won't work on others computers : Dyld Error Message: Library not loaded: /Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/libmacruby.dylib …
scandella
  • 21
  • 3
0
votes
1 answer

MacRuby: open popUpContextMenu

I am trying to open a context menu on the mouseDown event of my NSView but the menu never appears. I think the could is good but I must be missing something. Here i my view: class MyCustomView < NSView attr_accessor :menu def…
Gregory
  • 557
  • 6
  • 17
0
votes
1 answer

Macruby: plug an attr_accessor to a controller

I am starting macruby and I am following this tutorial: http://blog.phusion.nl/2010/03/12/creating-our-very-first-mac-application-with-ruby-how-exciting/ I am stuck at the "Hooking our MyWindowController up to our window" section where I have to…
Gregory
  • 557
  • 6
  • 17
0
votes
1 answer

Accessing an outlet in Interface Builder in Document-Based Application

With MacRuby 0.12 and XCode 4.4.1 (Mountain Lion), I created a Document-Based Application. In my document window nib, I have two objects: A NSTextView (in a NSScrollView), which has a custom class MyView A NSTextField In my Ruby code, I have in…
0
votes
1 answer

can't load gem in macruby

I just started using MacRuby for a simple Mac Application, and I now have a problem. For my project I use the rmagick gem. I installed it as described with the command sudo macgem install rmagick Everything worked well, but the problem is that if…
evotopid
  • 5,288
  • 2
  • 26
  • 41
1 2 3
14
15