|
Author |
Topic: external classes not exported to web (Read 769 times) |
|
arielm
|
external classes not exported to web
« on: Oct 13th, 2003, 3:21am » |
|
in 063, i've been playing with the new ability to load external classes: it works fine within the ide but the classes (.class files, or .jar files) are not copied to the applet folder. it's solvable by copying the files manually into the applet folder (and for .jar files: tweaking the applet's tag "archive" attribute in the html file), but it would be nice if it is done automatically...
|
Ariel Malka | www.chronotext.org
|
|
|
fry
|
Re: external classes not exported to web
« Reply #1 on: Oct 14th, 2003, 10:36pm » |
|
yeah, amit already found this, and i was hoping to get a release out before anyone noticed, but i took the weekend off. the fix will be in 66.
|
|
|
|
arielm
|
Re: external classes not exported to web
« Reply #2 on: Oct 14th, 2003, 11:07pm » |
|
taking weekends off is useful sometimes concerning the issue of exporting-to-web the external classes, there is only one exception that may worth to be taken in count (?): when using the famous & useful JSObject class (responsible for communication between an applet and its host html page), there is a need to correctly import the class for the code to compile, BUT the class must not be exported-to-web, otherwise it simply won't work (it's because each VM/Browser combination has it's own internal version of JSObject)
|
Ariel Malka | www.chronotext.org
|
|
|
fry
|
Re: external classes not exported to web
« Reply #3 on: Oct 15th, 2003, 12:07am » |
|
oog.. right. actually that looks like we should just include JSObject with p5, that way it'll do the right thing.. where does one find the right JSObject class to use? i haven't done javascript <-> java things for ~6 years..
|
|
|
|
arielm
|
Re: external classes not exported to web
« Reply #4 on: Oct 15th, 2003, 2:47am » |
|
one technique that i've used since the old days of processing: locate jaws.jar on your hd, extract from it the 3 following classes: netscape\javascript\JSException netscape\javascript\JSObject netscape\javascript\JSUtil then reinject them to pde.jar (under netscape\javascript, otherwise the package thing won't work) more details at: http://proce55ing.net/discourse/yabb/board_Syntax_action_displa_y_num_1049901181.html note: in theory, these 3 classes could just be empty (only with the correct fields and methods signatures) because all this is only required for compilation to work smooth...
|
Ariel Malka | www.chronotext.org
|
|
|
fry
|
Re: external classes not exported to web
« Reply #5 on: Oct 18th, 2003, 7:49pm » |
|
k, i've actually just modified things to properly load JSObject for 66, so you won't need to include it in the 'code' folder. i've also added "import netscape.javascript.*" to the default imports list. still working on the code for including files from the code dir in exported sketches.
|
|
|
|
fry
|
Re: external classes not exported to web
« Reply #6 on: Oct 19th, 2003, 8:04pm » |
|
i've finished fixing 66 so that files from inside the 'code' folder will be merged in when an applet (and eventually application) is exported.
|
|
|
|
|