From: Raymond I. <xw...@ya...> - 2003-04-01 14:06:38
|
Please see below: --- Doug Melvin <do...@cr...> wrote: > Woh dudes.. I had a flash, and had to try it our.. > AND IT WORKED!! > The only reason I'm surprised is taht I tried > something similar in 2.x and couldn't get it > working.. > > Sorry here's the deal: > In order to reduce the amount of code the user need > in order ot use the scrollbar, > I added the library calls to load the dynButton IN > THE SCROLLBAR.JS FILE (DOH!) > My question is this.. can there be any bad side > effects (as far as we know) to > accidently loading the same library twice? Is there > a check when loading or defining a libary? > If not then I propose to make this part of the > widget standard.. > > Just load your widget's dependancies in your widgets > .js file before you define the object.. Well, one of the things that I like about 3.0 is the library class. It really makes things much easier. The dependency feature can be used as shown below: this.add('dynapi.gui.DynButton','dynbutton.js','DynLayer'); this.add('dynapi.gui.ScrollBar','scrollbar.js','DynButton'); With the above DynButton will be automatically loaded whenever ScrollBar is included: dynapi.include('ScrollBar'); No need to include DynButton as ScrollBar is dependent on DynButton. Now that's what I call cool! -- Raymond Irving > > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://platinum.yahoo.com |