Extending modules/classes
Grzegorz Chrupała
grzegorz at pithekos.net
Tue Sep 23 14:39:34 CEST 2003
On Wed 24 Sep 2003 13:10, duchier at ps.uni-sb.de wrote:
> You write (and use) a new module that provides your extensions. If
> you want a module that provides extended functionality for File
> objects, you would subclass Open.file:
>
> %%% BetterFile.oz
> functor
> import Open
> export 'class': BetterFile
> define
> class BetterFile from Open.file
> ...
> end
> end
>
> Cheers,
OK, that makes sense.
Correct me if I am wrong: modules (except built-ins) don't really have
names, one just imports them specifying a variable with which they can be
referred to. So if I import the "String" module from mogule
(x-ozlib://duchier/lib/String.ozf) I have to use a name other than
"String" if I want to use the built-in "String" module as well?
Thanks for your help.
--
Grzegorz Chrupała
jabber://grzegorzc@jabber.org
http://pithekos.net
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs at mozart-oz.org.
More information about the mozart-users
mailing list