[MLton] Re: New mGTK pre-release

Wesley W. Terpstra terpstra@gkec.tu-darmstadt.de
Thu, 9 Dec 2004 22:40:41 +0100


--VrqPEDrXMn8OVzN4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Dec 09, 2004 at 01:52:43PM -0600, Henry Cejtin wrote:
> Re the exposure, I was thinking of an alternative (although I haven't thought
> much about it): rather than having the generated SML code access the non-GUI
> code by name (which makes me feel a bit nervous)

If you look at the code my xsl generates, the generated code does not
access the non-GUI code in any way. Rather, there is one structure which
contains all the publicly exposed widgets and a functor which takes your
structure and takes the functions from it and combines them with the
new window.

I suppose I should have attached the generated file in the first place.
It's attached to this email. Look at the commented, generated example
code on the bottom to see how to use it.

> how about having a function
> argument which is the lookup function (string -> ???).  This would definitely
> be the only way possible if you wanted to actually read in the .glade file
> at run-time, but might it not be better even at `compile' time?
> Of course you have to make a datatype for the result of the lookup function.

I don't really understand your suggestion.

As for dynamically loading a .glade file, my solution doesn't address
that. However, at least for me I want a standard-alone executable.
The type-checking in SML is what I like so much... is your proposal
with the datatype trying to address this?

-- 
Wesley W. Terpstra <wesley@terpstra.ca>

--VrqPEDrXMn8OVzN4
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="bah.sml.gz"
Content-Transfer-Encoding: base64

H4sICB3EuEECA2JhaC5zbWwA5VhZc9s2EH7Xr9j6JaQjq7XaJ2WUmTpOLE88caZxm4e2o4FI
WMKYBBQCtKxm/N+7C4AkKFE+crTNNIolEtwLe3y7YLQPZiE0XIqMA/6y0iiYc8kLZngKBwcH
cHwOb84v4OXx6cV3PdiHRC3XyMSB37B8iWyJSjkwY9dmyhiVAwphUuFC4SQzmQJLU7gsZWKE
kiwTZo3C4l5Pi7lkpiw4HP08mZ78egrjHgCu4jeAWS85GHtpv6J9YEnCtVYFGq0KYFmGBuRL
Jbk0GnJWXKHdTMOyUIYnuInvl+UsEwkICS+ePoWcrEXFJO2aZTBjixEYOHgO74VM1WowY5pX
16YhK3Fj8tCTHt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