[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: export question



Candide,
 
I'm afraid that (at present) there isn't explicit support for exporting classes into anything other than the default package. In truth, MLj should really issue an error if you attempt to name a fully-qualified class in the export directive. I'll make sure that this is fixed for the next release.
 
Apart from general "tidiness" considerations, is there a particular reason why the MLj-defined class must be in the same package as the rest of your application? Does it need to use package-level access (i.e. not public or private)?
 
- Andrew.
-----Original Message-----
From: fractals [mailto:fractals@ping.be]
Sent: Friday, July 23, 1999 2:00 PM
To: liste mlj
Subject: export question

Hi again,
 
Thanks to andrew (kennedy I think) for telling me my stupid error in specifying the mlj variables, ie the (stupid) quotes :-(
I slowly continue to "accomodate myself" to mlj. At the moment, I just promised myself to write an entire module of my application in mlj. It is something quite straightforward which doesn't really need ML, but as it is crucial to me to be able to mix ml code to my Java application, what I just want here is to see how to do just this.
And at that point I have problems with packages. The module I want to program is a set of classes which I want to integrate to a package named "com.dancity.tools". So until now, I tried two things. The first is:
 
structure com =
struct
structure dancity =
struct
structure tools =
struct
 
open javax.swing
 
_classtype configurator _extends JDialog ...
 
end
end
end
 
Along this file, I had another one with just one structure. I tried to make it, and I ended with a configurator class but in the default package.
 
The same thing happened when I did
export com.dancity.tools.configurator com.dancity.tools.configurator
make
 
I also want to say that something rather strange seems to happen :-) (it's really weird): sometimes, a file name seems to hinder the compiler in doing its job. If I rename the file, it works again, but then I have to change the name of the structure and that is really not convenient.
 
What did I do wrong/what can I do ?
 
Thanks for making mlj,
 
candide kemmler