From: David <dap...@10...> - 2004-11-11 18:29:15
|
hi, I have added the following line to packages.js l.add('dynapi.Slider','ext/slider.js','DynLayer'); but it doesnt seem to include the file . The slider.js file holds another object. Can you give me some advice on how to get it working? TIA David |
From: Leif W <war...@us...> - 2004-11-11 20:53:23
|
> ----- Original Message ----- > From: David > To: dyn...@li... > Sent: Thursday, November 11, 2004 13:26 > Subject: [Dynapi-Help] including other files in a package > > > hi, > I have added the following line to packages.js > l.add('dynapi.Slider','ext/slider.js','DynLayer'); I think the packages.js file refers to the new DynAPI 3. Are you using DynAPI 3? Are you referring to the Slider object (v2.0, 2001-06-26) created by Jeff Greenberg? The source code clearly states that it was designed for DynAPI 2.5x. The two versions of DynAPI are not entirely compatible. > but it doesnt seem to include the file . > The slider.js file holds another object. > Can you give me some advice on how to get it working? To use this object with DynAPI 3, the object will need to be ported. The differences between version 2.5x and version 3.x are described in the dynapi3x/docs/changelog.html folder. Leif |
From: David A. <dap...@10...> - 2004-11-11 21:59:49
|
Hi, I am using DynAPI 3. The slider object is my own object nothing to do with DynAPI . It's a wrapper around a DynLayer, it does use slider effect but from version 3 , Ive never used an earlier version. David -----Original Message----- From: dyn...@li... [mailto:dyn...@li...] On Behalf Of Leif W Sent: 11 November 2004 08:53 PM To: dyn...@li... Subject: Re: [Dynapi-Help] including other files in a package > ----- Original Message ----- > From: David > To: dyn...@li... > Sent: Thursday, November 11, 2004 13:26 > Subject: [Dynapi-Help] including other files in a package > > > hi, > I have added the following line to packages.js > l.add('dynapi.Slider','ext/slider.js','DynLayer'); I think the packages.js file refers to the new DynAPI 3. Are you using DynAPI 3? Are you referring to the Slider object (v2.0, 2001-06-26) created by Jeff Greenberg? The source code clearly states that it was designed for DynAPI 2.5x. The two versions of DynAPI are not entirely compatible. > but it doesnt seem to include the file . > The slider.js file holds another object. > Can you give me some advice on how to get it working? To use this object with DynAPI 3, the object will need to be ported. The differences between version 2.5x and version 3.x are described in the dynapi3x/docs/changelog.html folder. Leif ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Dynapi-Help mailing list Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Leif W <war...@us...> - 2004-11-12 01:23:14
|
> ----- Original Message ----- > From: "David Appledore" <dap...@10...> > To: <dyn...@li...> > Sent: Thursday, November 11, 2004 16:59 > Subject: RE: [Dynapi-Help] including other files in a package > > Hi, > I am using DynAPI 3. The slider object is my own object nothing to do > with DynAPI . It's a wrapper around a DynLayer, it does use slider > effect but from version 3 , Ive never used an earlier version. Oh, probably a name collision if someone else ports the old Slider object. :p On second look, a package ... hmm, brush up on my package skills. A package (slider.js) seems to need this as the first line: Slider = {}; // used by dynapi.library Then extend an existing object like DynLayer, or make a new object. Then put the file where it makes the most sense. If "Slider" is some object that creates a sliding effect, it'd go into "src/fx/slider.js". If it lets you perform functions like arithmetic on a Slide Rule, maybe it'd go in "src/ext/functions.slider.js". It doesn't seem to be a good idea to clutter up the dynapi.* name space, as that is typically reserved for folder names. So pick another place, or make a "src/myext/slider.js" or "src/da/slider.js" or something. Then in packages.js, you would put the l.add line. 1) Using "src/fx/slider.js" l.add('dynapi.fx.Slider','dynapi.fx.slider.js'); 2) Using "src/ext/functions.slider.js" l.add('dynapi.functions.Slider','functions.slider.js'); 3) Using "src/myext/slider.js" l.addPackage('dynapi.myext',p+'myext/'); l.add('dynapi.myext.Slider','slider.js'); 4) Using "src/da/slider.js" l.addPackage('dynapi.da',p+'da/'); l.add('dynapi.da.Slider','slider.js'); If you extended one object, you need a third argument, a string, specifying which other layer is required if not already loaded. l.add('dynapi.myext.Slider','slider.js','DynLayer'); If you extended two or more objects, the third argument is an array: l.add('dynapi.myext.Slider','slider.js',['DynLayer','dynapi.functions.Ma th']); So you started with: l.add('dynapi.Slider','ext/slider.js','DynLayer'); This is somewhat confusing. The only things in "src/ext" are packages.js, generic utility functions to extend objects, the library.js, and the debug.js. This should probably not be the place to add stuff, unless added as "src/ext/functions.sliders.js", and only if it's a generic utility object which operates on data type objects, and so on. Other than that, the syntax should probably work, in a similar fashion to "dynapi.debug". So that makes me wonder if the first line of your "src/ext/slider.js" file is "Slider = {}; // used by dynapi.library". If you still can't find the problem, then try throwing in "alert('here!');" lines to see where the script does and doesn't get called. Look in JavaScript Console (Mozilla) or turn on script debugging and error messages in IE or other browsers. If there's still no luck, it might be helpful to post the code. The example HTML, and the slider.js file. Keeping it reasonably short and posting in the email (not as attachment) is the safest bet. Otherwise post a URL to a live example and a zip file download. Hope this (eventually) proves helpful. Leif > > -----Original Message----- > > From: dyn...@li... > > [mailto:dyn...@li...] On Behalf Of Leif W Hmm, guess I replied to the wrong one somehow. :p > > Sent: 11 November 2004 08:53 PM > > To: dyn...@li... > > Subject: Re: [Dynapi-Help] including other files in a package > > > > > ----- Original Message ----- > > > From: David > > > To: dyn...@li... > > > Sent: Thursday, November 11, 2004 13:26 > > > Subject: [Dynapi-Help] including other files in a package > > > > > > hi, > > > I have added the following line to packages.js > > > l.add('dynapi.Slider','ext/slider.js','DynLayer'); > > > > I think the packages.js file refers to the new DynAPI 3. Are you using > > DynAPI 3? > > > > Are you referring to the Slider object (v2.0, 2001-06-26) created by > > Jeff Greenberg? The source code clearly states that it was designed for > > DynAPI 2.5x. The two versions of DynAPI are not entirely compatible. > > > > > but it doesnt seem to include the file . > > > The slider.js file holds another object. > > > Can you give me some advice on how to get it working? > > > > To use this object with DynAPI 3, the object will need to be ported. The > > differences between version 2.5x and version 3.x are described in the > > dynapi3x/docs/changelog.html folder. > > > > Leif |
From: Leif W <war...@us...> - 2004-11-12 01:29:07
|
> Then in packages.js, you would put the l.add line. > > 1) Using "src/fx/slider.js" > > l.add('dynapi.fx.Slider','dynapi.fx.slider.js'); Umm, yeah... should have been: l.add('dynapi.fx.Slider','slider.js'); Leif |