Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
Brian-- Thanks for the great explanation. I'm going to have to rethink how my object achieves a known initial state. Steve On Jan 21, 2010, at 6:41 PM, Brian Chapados wrote: > > Hi Steve (et al), > > So, there are a couple things going on here. Cocoa classes use the > concept of a "designat

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread Brian Chapados
Hi Steve (et al), So, there are a couple things going on here. Cocoa classes use the concept of a "designated initializer" method, which is a name for the instance method that calls the initializer method of the superclass. This chain continues until you hit [NSObject#init]. To figure this out fr

Re: [MacRuby-devel] [MacRuby] #571: #respond_to? should return false for unimplemented methods

2010-01-21 Thread MacRuby
#571: #respond_to? should return false for unimplemented methods -+-- Reporter: hongli...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blo

Re: [MacRuby-devel] [MacRuby] #565: GCD sources should return passed-in handle for handle method

2010-01-21 Thread MacRuby
#565: GCD sources should return passed-in handle for handle method ---+ Reporter: j...@… |Owner: ernest.prabha...@… Type: defect | Status: closed Priority:

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread Edward Moy
This sounds like: https://www.macruby.org/trac/ticket/250 Any subclass of a native Objective C class will fail to call initialize. I do have a fix, but I've been working on other things at the moment. I'll try to finish up and get back to 250 as soon as I can. Ed On Jan 21, 2010, at 4:33 PM

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
So that confirms my suspicion. It's not so much a MacRuby thing as a Cocoa thing. I just don't see how to set an initial state in a class that's instantiated when a nib is loaded. I don't do the alloc.initWithWhatever. On the previous subject though, adding super/self does not cause the initiali

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread Matt Aimonetti
Sorry I replied too quickly and didn't read properly. Overwriting the init method of a Cocoa class subclass is not recommended. Here is an example of what I was suggesting: http://github.com/mattetti/phileas_frog/blob/master/image_layer.rb#L44 Which then get called there: http://github.com/matte

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
So, this class doesn't reopen a Cocoa class, it subclasses it. Same anyhow? The real problem is that the class is instantiated as a side effect of nib loading, and the only place I've been able to successfully set initial state is awakeFromNib. I either can't, or don't know how to make the nib l

[MacRuby-devel] [MacRuby] #572: ConditionVariable#wait should accept a timeout argument

2010-01-21 Thread MacRuby
#572: ConditionVariable#wait should accept a timeout argument -+-- Reporter: hongli...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocke

Re: [MacRuby-devel] My class's initialize not called

2010-01-21 Thread Matt Aimonetti
When reopening a Cocoa class, you should not overwrite initialize and if you were to do it anyway, don't forget to call super and to return self. The Cocoa way is to create your own initializer to end up with something like DuplicateCounterTextField.alloc.initWithDuplicate Also, remember that when

[MacRuby-devel] My class's initialize not called

2010-01-21 Thread steve ross
I'm sure this is an elementary question, but I have the class below. In IB, I set several NSTextField controls to this class. Everything works in the blah, blah, blah part, but strangely enough the puts "initialize dctf" never seems to be called. Any thoughts as to why? require 'strings' cla

[MacRuby-devel] [MacRuby] #571: #respond_to? should return false for unimplemented methods

2010-01-21 Thread MacRuby
#571: #respond_to? should return false for unimplemented methods -+-- Reporter: hongli...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blo

[MacRuby-devel] [MacRuby] #570: Some STDOUT write function doesn't handle spaces or tabs correctly or something

2010-01-21 Thread MacRuby
#570: Some STDOUT write function doesn't handle spaces or tabs correctly or something -+-- Reporter: hongli...@… | Owner: lsansone...@… Type: defect | Status: new

[MacRuby-devel] [MacRuby] #569: macrake crashes with abort trap when compiling Phusion Passenger

2010-01-21 Thread MacRuby
#569: macrake crashes with abort trap when compiling Phusion Passenger -+-- Reporter: hongli...@… | Owner: lsansone...@… Type: defect | Status: new Priority

Re: [MacRuby-devel] OpenGL/GLUT Bridgesupport

2010-01-21 Thread John Shea
Yes as far as I know bridge support does not support GLUT. So you (obviously) have two other options other than gen_bridge_metadata (which I gave up on after a few tries) : - don't use GLUT - use the equivalent (set of) non GLUT openGL calls - place the GLUT calls in an ObjC class - and call out

Re: [MacRuby-devel] Pointer.new_with_type("v")-is-unsized shocker

2010-01-21 Thread Carlo Zottmann
Thanks, for the pointers, guys! (Pun not really intended.) I'm sure I'll find something there. :) And Laurent, I'll file a ticket later today. Cheers, C. -- Carlo Zottmann Munich, Germany. -- http://carlo.zottmann.org TwerpScan -- Anti-Fool Twitter Contact Management Tool. http://twerpscan.c