Really thanks for the replies :)
After reading that and other great posts I still can't work properly
with tables :( So let me explain better:
I could show some values in tabular form, but not in the way I
expected. It's seems that the proper way to show these data is not
very intuitive (at least for me).
I passed this object to the Rep's replace function (I've post all
"data" entries I used, but only one was used at time).
var panel = context.getPanel(panelName);
var obj = {
columns: [
{ label: "Column 1", property: "c1" },
{ label: "Column 2", property: "c2" },
{ label: "Column 3", property: "c3" }
],
data1: { c1: 1, c2: 2, c3: 3 }, // The only
that worked for me BUT
these values are shown as the first cell of each row, 3 rows in total.
data2: [ [1, 2, 3], [1, 2, 3] ],
// No data is shown
data3: { c1: [1, 2, 3], c2: [4, 5, 6], c3: [7, 8, 9] }, // No data is
shown
data4: [
{ c1: 1, c2: 2, c3: 3 },
{ c1: 1, c2: 2, c3: 3 },
{ c1: 1, c2: 2, c3: 3 }
],
// No data is shown
data5: {
row1: { c1: 1, c2: 2, c3: 3 },
row2: { c1: 1, c2: 2, c3: 3 },
row3: { c1: 1, c2: 2, c3: 3 }
},
// No data is shown,
data6: {
row1: [ { c1: 1, c2: 2, c3: 3 } ],
row2: [ { c1: 1, c2: 2, c3: 3 } ],
}
// No data is shown,
};
FirebugReps.Table.tag.replace({object: obj}, panel.panelNode, null);
Being a totally newbie with Firebug I would expect that an object
(like data1) would fill a table's row or an array of objects (like
data2 or data4) would fill a set of rows.
What I'm missing?
Thanks!
On 29 feb, 08:34, Jan Honza Odvarko <[email protected]> wrote:
> On Tuesday, February 28, 2012 8:31:49 PM UTC+1, superruzafa wrote:
>
> > Hi.
>
> > I'm just starting to develop a Firebug extension to debug the
> > framework we use in our company. I'm trying to learn how to show some
> > basic data but what I really need at first is to show tabular data. I
> > realized there is a FirebugReps.Table that I can use to do that but
> > the only thing I've achieved is to show only the columns.
>
> > var obj = {
> > object: {
> > columns: [
> > { label: "A", property: "a" },
> > { label: "B", property: "b" }
> > ],
> > data: ???
> > }
> > };
> > FirebugReps.Table.tag.replace(obj, panel.panelNode, null);
>
> > What exactly is the kind of object that goes in that "data" entry?
>
> var object = {data: object, columns: columns};
> FirebugReps.Table.tag.replace({object: object}, this.panelNode);
>
> See my example (you need to get Firebug 1.10,
> R12926)http://code.google.com/p/fbug/source/browse/#svn%2Fexamples%2Ffirebug...
>
> It would be great to come up with better API that allows reusing
> FirebugRep.Table template
> Any tips, ideas how the API should look like?
>
> Honza
>
>
>
>
>
>
>
> > Thanks!
--
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