Hi. Just write to say thank you for your great help. It seems I need more reading because Firebug Dev is still very hard to learn for me but I'm still hanging in there :)
On 2 mar, 08:44, Jan Honza Odvarko <[email protected]> wrote: > On Thursday, March 1, 2012 11:33:29 PM UTC+1, superruzafa wrote: > > > Unfortunately this approach still doesn't work for me :( > > > To clear doubts, I've shared the small .js I've using here: > >http://jsbin.com/izepug/2/edit#javascript,html > > > The onDatabase() function does the work. > > > BTW, I'm using Firebug 1.9.1 and > > alert(FirebugReps.Table.computeColumns(obj)) prints "undefined" > > The method is brand new, you need to use SVN head and build Firebug. > Will be part of Firebug 1.10a5 (next week) > > In the meantime, you can use this build I did for > youhttp://www.softwareishard.com/temp/firebug/firebug-1.10.0a4.tablerep.xpi > > The method is implemented > here:http://code.google.com/p/fbug/source/browse/branches/firebug1.10/cont... > > If you want to support Firebug 1.9, just copy the code and implement it in > your extension. > > --- > > This code can't work since you are not providing any columns. > > var panel = context.getPanel(panelName); > var obj = [ > {name: "John", age: "25"}, > {name: "Jack", age: "24"}, > {name: "Bob", age: "23"} > ]; > var object = {data: obj}; > FirebugReps.Table.tag.replace({object: object}, panel.panelNode); > > Instead you need (and this code doesn't need the compute columns method so, > should be compatible with Firebug 1.9): > > var obj = [ > {name: "John", age: "25"}, > {name: "Jack", age: "24"}, > {name: "Bob", age: "23"} > ]; > > var cols = []; > cols.push({ > property: "name", > label: "name", > alphaValue: true > }); > > cols.push({ > property: "age", > label: "Age", > alphaValue: false > }); > > FirebugReps.Table.columns = cols; > var object = {data: obj, columns: cols}; > FirebugReps.Table.tag.replace({object: object}, this.panelNode); > > Does it work for you? > > Honza -- You received this message because you are subscribed to the Google Groups "Firebug" 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 https://groups.google.com/forum/#!forum/firebug
