yes, i know, i thought the DynAPI.alert could be used
instead of alerts in for example addLibrary() and
when debugging, forward this alert to a console instead.
instead of getting a
alert("Incorrect DynAPI.addLibrary usage:\n\nExample:
DynAPI.addLibrary('dynapi.ext',['inline.js'])");
this string could be shown i a debugging-console
just to get everything at one place.
/martin
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Michael
> Pemberton
> Sent: den 21 februari 2001 14:09
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] DynAPI.require() method
>
>
> there is a DynAPI.errorHandler method that is used for debugging
> purposes. I
> suggest that you use this method for all API related alerts.
> This allows for
> the error to be hidden from the user and logged for later processing.
>
> martin ström wrote:
>
> > i've made a quick and dirty .require() method written
> > to use in widgets to make sure the right files are included.
> > it was first meant to call DynAPI.include() for each file
> > missed but this didn't really work so i decided just to show
> > an alert telling which files.
> >
> > take a look in button.js for example how to use the
> > require() method.
> >
> > i've made some minor changes in include() and added
> > a small _include() method to get everything to work
> >
> > i've also added a DynAPI.alert() method which by
> > default just shows an alert but can be overwritten
> > for debugging-issues.
> > this is better than common alert()s popuping up here and
> > where in DynAPI-code.
> >
> > I know this maybe isn't exacly what we need talking
> > optimizing, speed and size but i thought it could be usefull, please
> > take a look. (as far as i know, a require() method was discussed
> > a couple of months ago?)
> >
> > as i said, the code i quick written, just wanted to show my ideas
> >
> > (maybe this code could be an extension instead of core api,
> > and now i noticed it has some bugs which order the files are
> > included in netscape. well..)
> >
> > cheers
> > /martin
> >
> >
> ------------------------------------------------------------------------
> > Name: require.zip
> > require.zip Type: Zip Compressed Data
> (application/x-zip-compressed)
> > Encoding: base64
>
> --
> Michael Pemberton
> [EMAIL PROTECTED]
> ICQ: 12107010
>
>
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev