From: Brandon M. <bnd...@ho...> - 2000-11-29 00:37:46
|
Not with the proposed change I sent in an e-mail with the subject line: Re: [Dynapi-Dev] DynDocument Plugin? There is a change which allows DynAPI to not need DynDocument at all. If DynDocument isn't loaded it's assumed that the other scripts on the page would never call getDocument, or use DynAPI.document. As for BrowserCheck, it doesn't rely on DynDocument, so that's a non-issue. If you want to make BrowserCheck also independent, change the resizeHandler to not use is.ns4 in the if statement. Instead, have it check for the layers array. If it exists then perform the netscape specific stuff. Although many other objects rely on browsercheck. One more thing, the resize handler should simply return if DynDocument does not exist. insert at the first line of resizeHandler: if (this.document) return; By Default, DynAPI.document is false, untill it's assigned in the loadHandler. If DynDocument doesn't exist, then it will not change the value from false. ----- Original Message ----- From: "Robert Rainwater" <rra...@ya...> To: <dyn...@li...> Sent: Tuesday, November 28, 2000 7:35 AM Subject: Re: [Dynapi-Help] Very Basic question > Hi, > > That is because dyndocument.js and browser.js are required by dynapi.js > in order to work at all. > -- > Robert Rainwater <rra...@ya...> > > On Tue, 28 Nov 2000 10:45:34 +0100 > "David van Coevorden" <da...@on...> wrote: > > > Pascal, > > > > thank you for your reply. The situation is worse however > > Even just running this little snippet runs into an error ("DynDocument is undefined"). > > > > > > <html> > > <head><title>DynAPI2 tutor - creating layers</title> > > <Script language="Javascript" src="../dynacore.dynapi.2000.11.12/js/dynapi.js"></script> > > </head> > > <body> > > </body> > > </html> > > > > Thank you > > > > David > > > > ----- Original Message ----- > > From: Pascal Bestebroer > > To: dyn...@li... > > Sent: Tuesday, November 28, 2000 10:34 AM > > Subject: RE: [Dynapi-Help] Very Basic question > > > > > > Hi, > > > > I think your mixing up versions, the tutorial was created for the DynAPI code, but judging by the path your using your using my Dynacore package.. so you should change the includes to > > > > DynAPI.include('dynacore.*.*') > > > > and not > > > > DynAPI.include('dynapi.*.*') > > > > greets, > > Pascal Bestebroer > > pb...@oi... > > http://www.oibv.com > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... [mailto:dyn...@li...]Namens David van Coevorden > > Verzonden: dinsdag 28 november 2000 10:31 > > Aan: dyn...@li... > > Onderwerp: [Dynapi-Help] Very Basic question > > > > > > Hi > > > > I am just starting to try and use the DynAPI and have a very basic question. I tried to execute the code snipped provided in the first tutorial, namely: > > > > <html> > > <head><title>DynAPI2 tutor - creating layers</title> > > <Script language="Javascript" src="../dynacore.dynapi.2000.11.12/js/dynapi.js"></script> > > <Script language="Javascript"> > > > > DynAPI.setLibraryPath('../js/lib/') > > > > DynAPI.include('dynapi.api.dynlayer.js') > > DynAPI.include('dynapi.api.browser.js') > > DynAPI.include('dynapi.api.dyndocument.js') > > > > DynAPI.onLoad=function() { > > myLayer=new DynLayer() > > myLayer.setSize(100,100) > > myLayer.setBgColor('#c0c0c0') > > myLayer.moveTo(100,100) > > > > DynAPI.document.addChild(myLayer) > > } > > > > </script> > > </head> > > <body> > > </body> > > </html> > > > > Every time I try to view this in a webbrowser I get the error: > > > > "DynDocument is undefined" > > > > I think i put the right paths and all. What's going on? > > > > Any help appreciated, > > > > David > > > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |