Subj : Re: JavaScript inheritance problem To : netscape.public.mozilla.jseng From : Ondra Zizka Date : Sun Nov 28 2004 02:32 am Hmm shame on me... It was caused by the document.write... I didn't know that it does throw out even loaded scripts... 8-O "Ondra Zizka" píše v diskusním příspěvku news:coa345$188$1@news.vol.cz... | Hello, | | I have a script that uses inheriting. But it seems to cause weird problems - a global class (function) disappears after certain | action. I would understand if it disappeared in certain level of scope, but not this. | | I'm including the script (it has 2,5 kB so it shouldn't ) bother. | | Exactly where the problem shows is at line 166: | oNeuron = this.GetNeuronAt(aCoords); | | After executing this line, global functions disappear and can't be reached, according to Venkman and the behavior of the script | corresponds to that: An exception occurs at line 62: "Error: cTrans is not defined". | | The inheritance is at lines 91 and 92 from "class" cNeuralNet to cNeuralNetCube: | cNeuralNetCube.prototype = new cNeuralNet(); | cNeuralNetCube.prototype.cNeuralNet = cNeuralNet; | | I think that these two things are related somehow but can't realize how. Could anyone explain it? Thanks a lot! | | Additional info: | "fce.js" is a set of functions commonly used by me. | I have Mozilla 1.7.3. | The script is a model of a neural net of some kind. It's not complete, I've cut most to be closer to minimal test case. | | | .