Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] troubles with polymorphic variant in class
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] troubles with polymorphic variant in class
On Sun, Jun 13, 2004 at 06:05:57PM +0200, François-Xavier HOUARD wrote:
> So, as every composant can have different type of father, every object
> is parametrized by the type of his father, for example, a button in a
> panel in a window is, for the moment, typed as 
> window panel button
> as the button class looks like that:
> class ['a] button (father:'a)
> ....
> and the panel too,etc
> I find it nice, cause every widget has got his "genealogic tree" in his
> type.

I'm probably missing something here, but what's wrong with having
every widget just contain an ordinary data item / method pointing to
the parent?  eg. button#parent == panel ?


Richard Jones.
Merjis Ltd. - improving website return on investment
C2LIB is a library of basic Perl/STL-like types for C. Vectors, hashes,
trees, string funcs, pool allocator:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: