bergie/hallo

Plugin namespace 'IKS' should not be required

Closed this issue · 2 comments

I'm writing a small plugin, but for Hallo to find it, I have to create it under the IKS namespace (jQuery.widget "IKS.supersub") for it to work.

I'm using Hallo 1.0.4, jQuery UI 1.10.3 and jQuery 1.10.2.

If I try without a namespace (just supersub), I end up with Uncaught Error: Plugin supersub not found.

If I try a custom namespace (NBO.supersub) I get the same error, or
Uncaught TypeError: Object [object Object] has no method 'NBO.supersub' if I give plugins: {..., "NBO.supersub": {}} to hallo.

I'm guessing this is because of getPluginInstance in hallo.coffee:210 and how jQuery UI registers widgets, but I'm not too familiar with either to figure out a good fix just yet.

@PerfectlyNormal originally the namespaces used for Hallo widgets didn't matter, but jQuery UI 1.10 changed the way you retrieve a widget instance to be namespace-specific, and this unfortunately means that now they all have to be under IKS. If jQuery UI starts providing a better mechanism in the future then we can consider changing this, but right now it is out of our hands.

Yeah, that's what I feared…
Not a terribly big deal for me, as the plugins I'm going to work on won't be published anywhere.

Thanks for a quick reply, and a great project!