This does indeed look like a good application of jQuery's Deferred
object. Also an excellent reason to upgrade TiddlyWiki to the latest
version of jQuery.

I'll get your patch plus the latest jQuery into the next alpha.

Martin

On May 8, 7:32 am, John-Kim Murphy <[email protected]> wrote:
> I patched twFile.js so there is a callback that guarantees twFile is fully
> initialized. It doesn't need to load any files at all. Use like this:
>
> $.twFile.initialize().then(function() {
>       alert('twFile is ready!');
>
> });
>
> Accomplished via jQuery Deferrred 
> objects<http://intridea.com/2011/2/8/fun-with-jquery-deferred>(requires 
> v1.5+).
>
> Patch file attached; full twFile.js file at:http://jsbin.com/adehi5/edit
>
>  twfile_add_initialize_method.patch
> < 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to