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

2010-05-06 Thread russell muetzelfeldt
On 07/05/2010, at 4:01 PM, Thibault Martin-Lagardette wrote: > The reason #new currently behaves this way is to work for every object, > wether it's Ruby or Cocoa. > For #new to work like you expect (which I agree totally makes sense), instead > of having #new aliasing [[obj alloc] init], we cou

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

2010-05-06 Thread Thibault Martin-Lagardette
Hi! I totally agree that it is a little confusing. But #new an #new(owner) are two different methods, especially in Obj-C. Calling A.new(arg) cannot call -init, since -init doesn't take any argument, so it will call any initializer method that takes one argument :-). This is why: class A; def i

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

2010-05-06 Thread Thibault Martin-Lagardette
The reason #new currently behaves this way is to work for every object, wether it's Ruby or Cocoa. For #new to work like you expect (which I agree totally makes sense), instead of having #new aliasing [[obj alloc] init], we could alias it to [[obj alloc] initialize], and have -initialize redirec

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

2010-05-06 Thread russell muetzelfeldt
On 07/05/2010, at 2:17 PM, Thibault Martin-Lagardette wrote: > Glad it works :-) > > The reason why your example doesn't work is because in MacRuby, String > descends from NSString, which is a Foundation object. Foundation objects use > "init" and not "initalize", and for syntaxic sugar reasons

Re: [MacRuby-devel] [MacRuby] #612: RegexpError: U_REGEX_BAD_ESCAPE_SEQUENCE

2010-05-06 Thread MacRuby
#612: RegexpError: U_REGEX_BAD_ESCAPE_SEQUENCE -+-- Reporter: cehoff...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker

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

2010-05-06 Thread Terry Moore
This is only true if you follow objc init I think... for example... I came across this problem with NSWindowController and it took me a while to figure out. class PasswordController < NSWindowController def initialize initWithWindowNibName("Password") ##FAIL Never called! init called inste

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

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

Re: [MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Paul Howson
On 07/05/2010, at 1:03 PM, Laurent Sansonetti wrote: > Hi Paul, > > You're right, the Pointer class must be used. Sorry about the lack of > documentation. Here is a snippet that might work: > > # n must be defined > origins = Pointer.new(CGPoint.type, n) # this builds a pointer to n times > CG

Re: [MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Paul Howson
On 07/05/2010, at 1:08 PM, Matt Aimonetti wrote: > Duly noted ;) Actually Matt, could you perhaps consider a chapter on the subject of interfacing MacRuby to the various "Core xxx" C-language frameworks, which is not quite as straightforward as the seamless integration of MacRuby with Cocoa cl

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

2010-05-06 Thread Thibault Martin-Lagardette
Glad it works :-) The reason why your example doesn't work is because in MacRuby, String descends from NSString, which is a Foundation object. Foundation objects use "init" and not "initalize", and for syntaxic sugar reasons, #new is aliased to [[obj alloc] init] on Foundation objects :-). $>

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

2010-05-06 Thread russell muetzelfeldt
> From: Thibault Martin-Lagardette > > What you can do is a "factory" just like this: > ... > You can also do a more Cocoa-ish way: > ... > Hope that helps! yep, that all works... I'd rather be doing it in a more Ruby-ish way though... :) Is the fact that the Ruby-standard initialize meth

Re: [MacRuby-devel] [MacRuby] #697: potential regex bug

2010-05-06 Thread MacRuby
#697: potential regex bug ---+ Reporter: daniel.fonta...@… |Owner: lsansone...@… Type: defect | Status: closed Priority: blocker|

Re: [MacRuby-devel] [MacRuby] #679: U_REGEX_BAD_ESCAPE_SEQUENCE while requiring nokogiri

2010-05-06 Thread MacRuby
#679: U_REGEX_BAD_ESCAPE_SEQUENCE while requiring nokogiri --+- Reporter: dml...@… |Owner: lsansone...@… Type: defect| Status: closed Priority: major

Re: [MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Matt Aimonetti
Duly noted ;) Sent from my iPhone On May 6, 2010, at 20:06, "Jordan K. Hubbard" wrote: On May 6, 2010, at 8:03 PM, Laurent Sansonetti wrote: You're right, the Pointer class must be used. Sorry about the lack of documentation. Here is a snippet that might work: # n must be defined origin

Re: [MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Jordan K. Hubbard
On May 6, 2010, at 8:03 PM, Laurent Sansonetti wrote: > You're right, the Pointer class must be used. Sorry about the lack of > documentation. Here is a snippet that might work: > > # n must be defined > origins = Pointer.new(CGPoint.type, n) # this builds a pointer to n times > CGPoint > CTFr

Re: [MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Laurent Sansonetti
Hi Paul, On May 6, 2010, at 7:59 PM, Paul Howson wrote: > I need some help with this example which arises at the boundary between > MacRuby and the C Core Text framework. > > Consider the following Core Text function definition: > > void CTFrameGetLineOrigins( CTFrameRef frame, CFRange ran

[MacRuby-devel] How to set up and retrieve returned buffer from CTFrameGetLineOrigins?

2010-05-06 Thread Paul Howson
I need some help with this example which arises at the boundary between MacRuby and the C Core Text framework. Consider the following Core Text function definition: void CTFrameGetLineOrigins( CTFrameRef frame, CFRange range, CGPoint origins[] ) The third argument is defined as: "origins

[MacRuby-devel] [MacRuby] #697: potential regex bug

2010-05-06 Thread MacRuby
#697: potential regex bug ---+ Reporter: daniel.fonta...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker|

[MacRuby-devel] [MacRuby] #696: net/ftp doesn't work

2010-05-06 Thread MacRuby
#696: net/ftp doesn't work ---+ Reporter: daniel.fonta...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker|

Re: [MacRuby-devel] [MacRuby] #695: Bitwise operations on Float results in Seg fault

2010-05-06 Thread MacRuby
#695: Bitwise operations on Float results in Seg fault ---+ Reporter: nik...@… |Owner: lsansone...@… Type: defect | Status: closed Priority: major

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

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

Re: [MacRuby-devel] FTP in MacRuby

2010-05-06 Thread Laurent Sansonetti
Hi Daniel, This looks like a bug in MacRuby, could you report this to the tracker? We will continue the investigation there. Thanks, Laurent On May 5, 2010, at 5:07 PM, Daniel Fontaine wrote: > Does Net::FTP not work on MacRuby 0.6? I am trying a simple > Net::FTP.new(server, user, password)

Re: [MacRuby-devel] Accessing objc methods aliased by ruby methods

2010-05-06 Thread Laurent Sansonetti
Hi Dave, #class is really a corner case here, we force the Ruby version when calling it from Ruby because it's slightly different than the Cocoa version. (+[NSObject class] returns self, while Ruby expects Module or Class to be returned). If you want to use the Cocoa version, you can use -perfo

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

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

Re: [MacRuby-devel] [MacRuby] #669: Unable to find QTKit constant within a MacRuby app

2010-05-06 Thread MacRuby
#669: Unable to find QTKit constant within a MacRuby app +--- Reporter: martinlagarde...@… |Owner: lsansone...@… Type: defect | Status: closed Priori

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

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

Re: [MacRuby-devel] [MacRuby] #685: inject doesn't work with Procs

2010-05-06 Thread MacRuby
#685: inject doesn't work with Procs -+-- Reporter: hghoe...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

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

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

Re: [MacRuby-devel] [MacRuby] #684: MacRuby cannot run tests using the Shoulda gem

2010-05-06 Thread MacRuby
#684: MacRuby cannot run tests using the Shoulda gem +--- Reporter: m...@… |Owner: lsansone...@… Type: defect | Status: closed Priority: major

Re: [MacRuby-devel] [MacRuby] #695: Bitwise operations on Float results in Seg fault

2010-05-06 Thread MacRuby
#695: Bitwise operations on Float results in Seg fault ---+ Reporter: nik...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

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

2010-05-06 Thread Thibault Martin-Lagardette
Hi! I cannot really reproduce this unfortunately, but I would have a couple of questions: - That might be stupid, but did you try rebooting? - What language are you using on your system? - Did you ever try to "shrink" applications by getting rid of different languages? Thanks :-) -- Thibault

Re: [MacRuby-devel] [MacRuby] #695: Bitwise operations on Float results in Seg fault

2010-05-06 Thread MacRuby
#695: Bitwise operations on Float results in Seg fault ---+ Reporter: nik...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

Re: [MacRuby-devel] [MacRuby] #680: String.crypt crashes when called with no arguments

2010-05-06 Thread MacRuby
#680: String.crypt crashes when called with no arguments ---+ Reporter: nik...@… |Owner: lsansone...@… Type: defect | Status: closed Priority: minor

Re: [MacRuby-devel] [MacRuby] #694: framework 'Cocoa' in macirb crashes 0.6, 0.7

2010-05-06 Thread MacRuby
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7 -+-- Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

[MacRuby-devel] Accessing objc methods aliased by ruby methods

2010-05-06 Thread Dave Baldwin
For example, the method 'class' is present in objective C as well as in Ruby but invoking obj.class will use the Ruby version How do I force the objc version to be used instead? Obviously if the two version do the same thing then this is a moot issue but if they do different things you may nee

[MacRuby-devel] [MacRuby] #695: Bitwise operations on Float results in Seg fault

2010-05-06 Thread MacRuby
#695: Bitwise operations on Float results in Seg fault ---+ Reporter: nik...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

Re: [MacRuby-devel] [MacRuby] #694: framework 'Cocoa' in macirb crashes 0.6, 0.7

2010-05-06 Thread MacRuby
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7 -+-- Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

Re: [MacRuby-devel] [MacRuby] #694: framework 'Cocoa' in macirb crashes 0.6, 0.7

2010-05-06 Thread MacRuby
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7 -+-- Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

[MacRuby-devel] [MacRuby] #694: framework 'Cocoa' in macirb crashes 0.6, 0.7

2010-05-06 Thread MacRuby
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7 -+-- Reporter: mar...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major

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

2010-05-06 Thread Paul Howson
On 06/05/2010, at 1:18 PM, Laurent Sansonetti wrote: > Hi Paul, > > On May 5, 2010, at 7:57 PM, Paul Howson wrote: > >> On 26/04/2010, at 1:33 PM, MacRuby wrote: >> >> Hi Laurent, >> >> What would be a feasible workaround for this problem, given than I'm using >> MacRuby 0.5 ? >> >> i.e. I'm