ruby-cocoa

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 adapting it for the iPhone SDK. I've done a more detailed writeup of my progress on my blo...

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 Objective-C bridge (PyObjc or RubyCocoa). I know that ideally to get the best learning exp...

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 little-to-no programming experience, is it easier to learn Ruby and explore Cocoa via the bridge (t...

RubyCocoa, what's the point?

I was wondering what's the point of using Ruby (or even Python) in Cocoa application development other that not learning Objective-C (which is pretty simple language and will not take to more than few days to learn). I'm new to this and I'm interested why people do this? What are Pros and Cons. ...

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?? ...

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 python from AppKit import * source_image = "/Library/Desktop Pictures/Nature/Aurora.jpg"...

Asynchronous methods in RubyCocoa

I understand that it isn't possible/sensible to use threads in RubyCocoa. However it is possible to use asynchronous Cocoa methods to avoid blocking user interface events. I've successfully used a method on NSURLConnection to send an HTTP request and receive the response without blocking the user interface. But I'm wondering what other ...

rubycocoa 0.13.2, snow leopard & ruby 1.8.7

Hi, I have a rubyCocoa project, that was written for ruby 1.8.6, RubyCocoa version 0.13.2. The class tree is built from a xcdatamodel. I'm trying to migrate it to Snow Leopard. When trying to run, the program enters the endless loop, because it fails on method/property lookup. Seems, it has a problem to initialize a data model. It worke...

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 Xcode 3.1.3 project with 0.13.2 framework from 10.6, it gave a link error - malformed object o...

autorelease pool causes crash in RubyCocoa application

Hi, I'm having crash in my application, which says trying to pop an unknown autorelease pool: 10/19/09 11:40:11 AM MyApp[89480] *** attempt to pop an unknown autorelease pool (0x11bc800) How to trace it down? Since it's RubyCocoa application it's almost impossible to trace it with gdb in Xcode environment. So mostly it's about loggin...

RubyCocoa on PowerPC G5 processor (Leopard 10.5.7)

Does anybody know which version of RubyCocoa runs on this processor (if at all)? ...

Freezing Ruby version - is it possible? (Linker flags question)

Hi, I have a problem with RubyCocoa, which has a weak link to a libruby.dylib and not always can find this dylib on user's computer, which resulting a crash on the launch of my application (RubyCocoa based). I wonder whether it's possible to copy Ruby.framework to the bundle of my application and tell somehow to RubyCocoa to look for ru...

mysql gem for snow leopard

I had trouble with the gem at first but got it to work when I installed the 64-bit MySQL and reinsatlled the gem with arch flags. So it work in rails. The error I used to get was uninitialized constant MysqlCompat::MysqlRes but that is now gone :) However in Xcode when I run a RubyCocoa project I still get the old error of uninit...

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 without patches to the Ruby interpreter So I guess I have to patch or re-install RubyCocoa....

Casting void* pointer in RubyCocoa

In my RubyCocoa project I am passing a block as a callback function, one of whose parameters is declared as type void *. I know that that the actual type is char *[]. My block is receiving an instance of ObjcPtr but I have been unable to access all elements within the array. The array's size is known, and passed in via another parameter....

No memory available to program now: unsafe to call malloc

Hi, I'm new to rubycocoa and i'm implementing an nstableView. I have saved all data to a plist file. Now when i tried to reload my data to the tableView my program becomes unresponsive and when quit it, it gives the message: No memory available to program now: unsafe to call malloc. My program stops somewhere in this method: def tableV...

For reopening the autosaved documents the method - (id)initForURL: withContentsOfURL: ofType: error:, gets not call for me

Hi, I have saved my document using autosave functionality at default path (~/Library/Autosave Information/). but while launching the application the autosaved documents are not opening. Even the control does not go this method: - (id)initForURL:(NSURL *)absoluteDocumentURL withContentsOfURL:(NSURL *)absoluteDocumentContentsURL ofType:(...