feature request: base_init

View: New views
2 Messages — Rating Filter:   Alert me  

feature request: base_init

by alberto colombo-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hello,

Gob2 manual says that there are two methods that handle the construction
of an object: init(self) and class_init(class). However, there is a
third method, base_init(gclass), that gob2 doesn't know about.

would it be possible to define the base_init constructor from gob, just
like we do with base_init? It is actually required to write GStreamer
objects.

Thank you very much
alberto

PS: at the moment, I'm putting the base_init code in the class_init
constructor, and it works, but this will screw up inheritance, as far as
I understand.

--
Alberto Colombo, MSc
PhD student at Digital Imaging Research Centre
Kingston University, London

e-mail: a.colombo@...
  cell: +44 (0) 77267 11980

This email has been scanned for all viruses by the MessageLabs Email
Security System.



--
to unsubscribe:
send mail to minimalist@... with "unsubscribe gob-list" in the subject

Re: feature request: base_init

by Jiri Lebl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

alberto colombo wrote:

> hello,
>
> Gob2 manual says that there are two methods that handle the construction
> of an object: init(self) and class_init(class). However, there is a
> third method, base_init(gclass), that gob2 doesn't know about.
>
> would it be possible to define the base_init constructor from gob, just
> like we do with base_init? It is actually required to write GStreamer
> objects.
>
> Thank you very much
> alberto
>
> PS: at the moment, I'm putting the base_init code in the class_init
> constructor, and it works, but this will screw up inheritance, as far as
> I understand.

I know this is a year late, but I just did a search for messages matching
"gob" in my inbox and noticed this:

You want to overide the get_type method.  See OVERRIDING THE GET_TYPE METHOD
in the manpage.

George

--
George <jirka@...>
   I can live with doubt and uncertainty and not knowing. I think it is much
   more interesting to live not knowing than to have answers that might be
   wrong.
                       -- Richard P. Feynman



--
to unsubscribe:
send mail to minimalist@... with "unsubscribe gob-list" in the subject