olec
10 Sep 2010, 1:54 AM
I'm having some (for me) odd difficulties to initialize a the tbar-config in a gridpanel.
If I initialize the tbar static, aka:
tbar : [ { ... }] it works swell.
But If I use a global variable somewhere else:
var tBar = "[{ ... }]";
and then later on in my extJs do like this:
tbar: tBar
The tbar is just treated as a string, or in other words, when I later do an alert, it will just print
a plain string. Whereas the static initialization would give something like {Object Object}, {Object Object}, ...
Any suggestions why this happen and what to do?
Regards
Ole Christian
If I initialize the tbar static, aka:
tbar : [ { ... }] it works swell.
But If I use a global variable somewhere else:
var tBar = "[{ ... }]";
and then later on in my extJs do like this:
tbar: tBar
The tbar is just treated as a string, or in other words, when I later do an alert, it will just print
a plain string. Whereas the static initialization would give something like {Object Object}, {Object Object}, ...
Any suggestions why this happen and what to do?
Regards
Ole Christian