* [Caml-list] LablTk question
@ 2003-03-08 2:31 mgushee
2003-03-08 3:24 ` mgushee
0 siblings, 1 reply; 3+ messages in thread
From: mgushee @ 2003-03-08 2:31 UTC (permalink / raw)
To: caml-list
I'm trying to learn LablTk by studying the examples provided in the
OCaml distribution ... looking at the Tetris game right now.
Fortunately I have plenty of experience with Tk itself, so most of
the code is intelligible. But I'm puzzled about the 'coe' function,
as in:
pack [coe c; coe r; coe r'] ~side: `Left ~fill: `Y;
Okay, so I dug a little deeper and found that 'coe' is an alias for
forget_type ... but why? What is the purpose of weakening the widget
types as they are packed?
And by the way, what does 'coe' stand for? Is it a French acronym?
Thanks in advance for shedding light on this dark corner.
--
Matt Gushee
Englewood, CO USA
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] LablTk question
2003-03-08 2:31 [Caml-list] LablTk question mgushee
@ 2003-03-08 3:24 ` mgushee
2003-03-08 8:02 ` Issac Trotts
0 siblings, 1 reply; 3+ messages in thread
From: mgushee @ 2003-03-08 3:24 UTC (permalink / raw)
To: caml-list
On 7 Mar 2003 at 19:31, mgushee@havenrock.com wrote:
> pack [coe c; coe r; coe r'] ~side: `Left ~fill: `Y;
>
> Okay, so I dug a little deeper and found that 'coe' is an alias for
> forget_type ... but why? What is the purpose of weakening the widget
> types as they are packed?
Duh. Never mind. I realized after asking this that it's in order to
be able to place different widget types together in a list ... though
if 'coe' has any other use, I'd be interested to know about it.
And I'm still curious about what it stands for.
--
Matt Gushee
Englewood, CO USA
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] LablTk question
2003-03-08 3:24 ` mgushee
@ 2003-03-08 8:02 ` Issac Trotts
0 siblings, 0 replies; 3+ messages in thread
From: Issac Trotts @ 2003-03-08 8:02 UTC (permalink / raw)
To: OCaml List
mgushee@havenrock.com wrote:
>On 7 Mar 2003 at 19:31, mgushee@havenrock.com wrote:
>
>
>
>> pack [coe c; coe r; coe r'] ~side: `Left ~fill: `Y;
>>
>>Okay, so I dug a little deeper and found that 'coe' is an alias for
>>forget_type ... but why? What is the purpose of weakening the widget
>>types as they are packed?
>>
>>
>
>Duh. Never mind. I realized after asking this that it's in order to
>be able to place different widget types together in a list ... though
>if 'coe' has any other use, I'd be interested to know about it.
>
>And I'm still curious about what it stands for.
>
From the labltk README,
"In CamlTk, we have only one widget type, [widget]. This type is equivalent
to the LablTk's type [any widget]. Therefore, if you want to apply CamlTk
functions to LablTk widget, you can use [coe] function to coerce it to
[any widget]."
So it's short for "coerce." Hope that helps.
--
Issac Trotts
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-08 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-08 2:31 [Caml-list] LablTk question mgushee
2003-03-08 3:24 ` mgushee
2003-03-08 8:02 ` Issac Trotts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox