Re: [MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

2010-05-05 Thread Thibault Martin-Lagardette
Hi! I believe the problem is that you were overriding the wrong init method. Here is what I changed to your code to make it work: class MyNode < ODNode def initWithSession(session, name:name, error:err) if super @session = session self end end end

Re: [MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

2010-05-05 Thread Thibault Martin-Lagardette
Oh and by the way, you can generate BridgeSupport for CFOpenDirectory yourself if you need: $> gen_bridge_metadata -f /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework -o CFOpenDirectory.bridgesupport Then all you need to do is place `CFOpenDire

Re: [MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

2010-05-05 Thread Matt Aimonetti
> > And you should have access to `kODMatchEqualTo' etc. > Which should be available as KODMatchEqualTo and not kODMatchEqualTo (Ruby's constants start by an upper case letter) - Matt On Wed, May 5, 2010 at 12:26 AM, Thibault Martin-Lagardette wrote: > Oh and by the way, you can generate Bri

Re: [MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

2010-05-05 Thread russell muetzelfeldt
> From: Thibault Martin-Lagardette > > Hi! > > I believe the problem is that you were overriding the wrong init method. Here > is what I changed to your code to make it work: > > class MyNode < ODNode >def initWithSession(session, name:name, error:err) >if super >@sessi

[MacRuby-devel] [MacRuby] #687: Build of MacRuby 0.6 on OSX 10.5.8 fails

2010-05-05 Thread MacRuby
#687: Build of MacRuby 0.6 on OSX 10.5.8 fails -+-- Reporter: d...@…| Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Miles

[MacRuby-devel] Comparison between String and nil fails.

2010-05-05 Thread Michel Steuwer
Hi everyone, yesterday i migrated my little MacRuby project to 0.6 and i found a kind of strange behavior in a comparison between a string and nil. In MacRuby 0.5 the line worked as expected. I get the following error message in a comparison between a string on the left and nil on the right: can

Re: [MacRuby-devel] Aaron answer about convert the code of the Book to MacRuby

2010-05-05 Thread Christian Bryan
Daniel, I have the RandomApp example from chapter 2, which I will add to the fork. Chapter 4 was about manual memory management using the retain/release mechanism and is not really applicable to a MacRubyist. Chapter 3 I skipped, probably due to realising that converting the LotteryEnt

Re: [MacRuby-devel] Aaron answer about convert the code of the Book to MacRuby

2010-05-05 Thread Daniel Lopes
You're right I back in the book and conclude the same. Sent from my iPhone On 05/05/2010, at 07:01, Christian Bryan wrote: Daniel, I have the RandomApp example from chapter 2, which I will add to the fork. Chapter 4 was about manual memory management using the retain/release mechanism a

Re: [MacRuby-devel] Aaron answer about convert the code of the Book to MacRuby

2010-05-05 Thread Matthew Ratzloff
Nice! Good work. -Matt On Mon, May 3, 2010 at 11:48 AM, Daniel Lopes wrote: > Hello folks, Some days ago I sent a message here with the idea to convert > the Cocoa Programming For Mac OSX to MacRuby. Definitely MacRuby is a > fantastical project but we need more examples and places where people

Re: [MacRuby-devel] Aaron answer about convert the code of the Book to MacRuby

2010-05-05 Thread Daniel Lopes
Hi Christian, I did the merge. I also change the organization of folders... I'm currently working on chapter 12. http://github.com/danielvlopes/HillegassMacRuby Thanks, On Wed, May 5, 2010 at 12:22 PM, Matthew Ratzloff wrote: > Nice! Good work. > > -Matt > > On Mon, May 3, 2010 at 11:48 AM, D

[MacRuby-devel] Passing a string buffer to a C function

2010-05-05 Thread Mike Taylor
Hi all, I'm trying to do some GLSL shaders with MacRuby. However, I'm a bit stumped as to how to call glGetShaderInfoLog if the shader compilation fails. The C function's prototype is: void glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei * length, GLchar * infoLog); I couldn't

Re: [MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

2010-05-05 Thread Thibault Martin-Lagardette
Hi! What you can do is a "factory" just like this: module OpenDirectory class Node < ODNode def self.create(config = { :node_name => "/Local/Default" }) if config[:node_name].eql? "/Local/Default" session = ODSession.defaultSession else

Re: [MacRuby-devel] [MacRuby] #687: Build of MacRuby 0.6 on OSX 10.5.8 fails

2010-05-05 Thread MacRuby
#687: Build of MacRuby 0.6 on OSX 10.5.8 fails --+- Reporter: d...@… |Owner: lsansone...@… Type: defect| Status: closed Priority:

Re: [MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2010-05-05 Thread MacRuby
#336: NoMethodError with shoulda tests +--- Reporter: macr...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

[MacRuby-devel] [MacRuby] #688: IB fails to read classfile in Ruby Cocoa project

2010-05-05 Thread MacRuby
#688: IB fails to read classfile in Ruby Cocoa project --+- Reporter: tmow...@… | Owner: lsansone...@… Type: defect| Status: new Priority: major

Re: [MacRuby-devel] [MacRuby] #688: IB fails to read classfile in Ruby Cocoa project

2010-05-05 Thread MacRuby
#688: IB fails to read classfile in Ruby Cocoa project --+- Reporter: tmow...@… | Owner: lsansone...@… Type: defect| Status: new Priority: major

Re: [MacRuby-devel] [MacRuby] #688: IB fails to read classfile in Ruby Cocoa project

2010-05-05 Thread MacRuby
#688: IB fails to read classfile in Ruby Cocoa project --+- Reporter: tmow...@… | Owner: lsansone...@… Type: defect| Status: new Priority: major

[MacRuby-devel] [MacRuby] #689: Net::HTTP.post_form() is broken.

2010-05-05 Thread MacRuby
#689: Net::HTTP.post_form() is broken. -+-- Reporter: r...@…| Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Milestone:

Re: [MacRuby-devel] [MacRuby] #689: Net::HTTP.post_form() is broken.

2010-05-05 Thread MacRuby
#689: Net::HTTP.post_form() is broken. -+-- Reporter: r...@…| Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Milestone:

Re: [MacRuby-devel] MacRuby-devel Digest, Vol 27, Issue 13

2010-05-05 Thread Tiago Ribeiro
Thanks a lot for the information Thibault, very useful!! Take care >Date: Tue, 4 May 2010 15:13:13 -0700 >From: Thibault Martin-Lagardette >To: "MacRuby development discussions." > >Subject: Re: [MacRuby-devel] [ANN] MacRuby 0.6 >Message-ID: > >Content-Type: text/plain; charset="is

[MacRuby-devel] NSObject.to_s question

2010-05-05 Thread Jordan Breeding
Right now for custom objects on the Objective-C side even if you provide a -[Object description] call to_s will fall through and hit to_s from NSObject which right now just has the class name and pointer. Is it already planned for the future to use the description method in to_s on the MacRuby

[MacRuby-devel] [MacRuby] #690: calling `!= nil' on an NSString raises a TypeError exception

2010-05-05 Thread MacRuby
#690: calling `!= nil' on an NSString raises a TypeError exception ---+ Reporter: lsansone...@… | Owner: lsansone...@… Type: defect | Status: new Priority

Re: [MacRuby-devel] Comparison between String and nil fails.

2010-05-05 Thread Laurent Sansonetti
Hi Michel, Thanks for the report. Thibault reduced the problem, we will track it here: https://www.macruby.org/trac/ticket/690 Laurent On May 5, 2010, at 2:11 AM, Michel Steuwer wrote: > Hi everyone, > yesterday i migrated my little MacRuby project to 0.6 and i found a kind of > strange behav

Re: [MacRuby-devel] Passing a string buffer to a C function

2010-05-05 Thread Laurent Sansonetti
Hi Mike, Thanks for the report. I think this is because GLchar* is typed in the runtime as a C-style string. The compiler should allow Pointer objects for this runtime type. Currently, it only allows nil, symbols and strings. Could you file a bug? We will track this... Thanks, Laurent On May

[MacRuby-devel] [MacRuby] #691: Runtime should allow pointer types for C-string arguments

2010-05-05 Thread MacRuby
#691: Runtime should allow pointer types for C-string arguments +--- Reporter: m...@… | Owner: lsansone...@… Type: enhancement | Status: new Priority: major

[MacRuby-devel] [MacRuby] #692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks

2010-05-05 Thread MacRuby
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks +--- Reporter: m...@… | Owner: lsansone...@… Type: defect | Status: new P

[MacRuby-devel] [MacRuby] #693: 0.6 Abort traps caused by 'require' and 'framework' in that order

2010-05-05 Thread MacRuby
#693: 0.6 Abort traps caused by 'require' and 'framework' in that order -+-- Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priorit

[MacRuby-devel] FTP in MacRuby

2010-05-05 Thread Daniel Fontaine
Does Net::FTP not work on MacRuby 0.6? I am trying a simple Net::FTP.new(server, user, password) and receive EOFError: end of file reached from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/1.9.0/monitor.rb:188:in `synchronize' from /Library/Frameworks/MacRuby

Re: [MacRuby-devel] NSObject.to_s question

2010-05-05 Thread B. Ohr
Jordan, you can do something like that: class Object alias :old_inspect :inspect def inspect i = old_inspect if i.start_with?('#<') d = description d.start_with?('<') ? i : d else i end end end But you’re right, a better integration of „description“ woul

Re: [MacRuby-devel] NSObject.to_s question

2010-05-05 Thread Jordan Breeding
Yeah, I was doing something similar right now, just hoping for a better long term solution in MacRuby. On May 05, 2010, at 20:11, B. Ohr wrote: > Jordan, > > you can do something like that: > > class Object > alias :old_inspect :inspect > > def inspect >i = old_inspect >if i.start_w

Re: [MacRuby-devel] [MacRuby] #628: CTFramesetterCreateFrame doesn't like the CFRange type

2010-05-05 Thread Paul Howson
On 26/04/2010, at 1:33 PM, MacRuby wrote: > #628: CTFramesetterCreateFrame doesn't like the CFRange type > ---+ > Reporter: ea...@…|Owner: lsansone...@… > Type: defect | Status: cl

Re: [MacRuby-devel] [MacRuby] #628: CTFramesetterCreateFrame doesn't like the CFRange type

2010-05-05 Thread Laurent Sansonetti
Hi Paul, On May 5, 2010, at 7:57 PM, Paul Howson wrote: > On 26/04/2010, at 1:33 PM, MacRuby wrote: > >> #628: CTFramesetterCreateFrame doesn't like the CFRange type >> ---+ >> Reporter: ea...@…|Owner: lsan

[MacRuby-devel] v0.7 and v0.6 timeout problem

2010-05-05 Thread B. Ohr
Hi, I have strange timeout problems with 0.6 and 0.7 $ time macruby_select 0.7 -e 'framework "Cocoa"' 2010-05-06 07:03:55.018 macruby[1922:607] __CFServiceControllerBeginPBSLoadForLocalizations timed out while talking to pbs real0m1.588s user0m0.699s sys 0m0.096s 0.6 takes even longe