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
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
#571: #respond_to? should return false for unimplemented methods
-+--
Reporter: hongli...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blo
#565: GCD sources should return passed-in handle for handle method
---+
Reporter: j...@… |Owner: ernest.prabha...@…
Type: defect | Status: closed
Priority:
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
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
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
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
#572: ConditionVariable#wait should accept a timeout argument
-+--
Reporter: hongli...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocke
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
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
#571: #respond_to? should return false for unimplemented methods
-+--
Reporter: hongli...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blo
#570: Some STDOUT write function doesn't handle spaces or tabs correctly or
something
-+--
Reporter: hongli...@… | Owner: lsansone...@…
Type: defect | Status: new
#569: macrake crashes with abort trap when compiling Phusion Passenger
-+--
Reporter: hongli...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority
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
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
16 matches
Mail list logo