function init()
{
// how do you get a ref to the paletteStore here?
}
dojo.addOnLoad(init);
How do I get a ref to a store I declaratively instantiated??? byJsId, byId, byFunction, byMagic???
Submitted by 2dor on Fri, 02/01/2008 - 00:50.
- Login or register to post comments
- Subscribe post

jsId creates global reference
It's easier than you expected: just
paletteStore, no functions required.jsId attribute explained on the parser page.
though for a second i was
though for a second i was seriously considering writing a dojo.byMagic() function. sounds useful :)
thanks dante :)
thanks dante. haha yah dojo.byMagic() would be a handy function to have :)
There's getObject
There's enough magic in dojo.getObject alone... :)
dojo.byMagic('paletteStore');
/* GeSHi (C) 2004 - 2007
dojo.byMagic = dojo.query; dojo.extend(dojo.query,{ // add all the magic you want });dojo.byMagic(".links").connect("onclick",function(e){ dojo.stopEvent(e); });