Re: How to force a message to a overriding method from within an init method

2009-02-18 Thread Andreas Grosam
On Feb 12, 2009, at 2:31 AM, João Varela wrote: João, Hi all I am porting most of my C++ code into Objective C and at the moment I have this problem: In C++ to force a constructor to call a overriding method of a subclass I used pure virtual functions defined in an abstract (super) cl

Re: How to force a message to a overriding method from within an init method

2009-02-11 Thread Erik Buck
Calling a subclass's overridden implementation of a superclass member function from within the super class constructor is very very dangerous in C++. I don't believe if is even supported by the ANSI/ ISO standard, and to the extent it works at all, it is probably compiler and linker depende

Re: How to force a message to a overriding method from within an init method

2009-02-11 Thread Graham Cox
On 12 Feb 2009, at 12:31 pm, João Varela wrote: Hi all I am porting most of my C++ code into Objective C and at the moment I have this problem: In C++ to force a constructor to call a overriding method of a subclass I used pure virtual functions defined in an abstract (super) class.

Re: How to force a message to a overriding method from within an init method

2009-02-11 Thread Shawn Erickson
On Wed, Feb 11, 2009 at 5:31 PM, João Varela wrote: > Hi all > > I am porting most of my C++ code into Objective C and at the moment I have > this problem: > > In C++ to force a constructor to call a overriding method of a subclass I > used pure virtual functions defined in an abstract (super) cla

How to force a message to a overriding method from within an init method

2009-02-11 Thread João Varela
Hi all I am porting most of my C++ code into Objective C and at the moment I have this problem: In C++ to force a constructor to call a overriding method of a subclass I used pure virtual functions defined in an abstract (super) class. An example: class Foo { Foo(); vir