Hi there,

this indeed a severe issue - ironically, once I read it, I was facing the
exact same issue when
building a new component yesterday.

I investigated a bit, but I didn't see a quick valid fix - Scott, any idea
how to improve this?

On Wed, Nov 26, 2008 at 8:23 AM, Timothee <[EMAIL PROTECTED]>wrote:

>
> Hi all,
>
> I'm using the ui.core framework to develop a few widgets for a site at
> the moment. I ran into the problem below. I'm developping with ui
> 1.5.2 but the problem still exists in SVN, as far as I can tell from
> the code.
>
> My widget constructor (method init) takes a callback function as one
> of its input options. The callback is fired from within the method
> init itself. The callback function (or any function called by it) then
> attempts to call one of the method of the widget via the call $
> ("query").mywidget("some_method").
>
> This fails (silently) because:
> 1) in the widget factory, the init method is ran from the constructor
> 2) the widget class instance is only added as dom data AFTER the
> constructor runs
>
> in SVN, that's line 290:
> (!instance && !isMethodCall &&
> $.data(this, name, new $[namespace][name](this, options)));
>
>
> In my case, the problem can be fixed by doing this:
> 1) remove the _init method call from the constructor
> 2) update line 290 to this:
>
> (!instance && !isMethodCall &&
> $.data(this, name, new $[namespace][name](this, options))._init());
>
>
> Thoughts?
>
> Tim.
>
> >
>


-- 
Paul Bakaus
UI Architect
--
http://paulbakaus.com
http://www.linkedin.com/in/paulbakaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" 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/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to