Version française
Home     About     Download     Resources     Contact us    
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 ?

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
C2LIB is a library of basic Perl/STL-like types for C. Vectors, hashes,
trees, string funcs, pool allocator: http://www.annexia.org/freeware/c2lib/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners