Adding column to existing table

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding column to existing table

deniska
Hi, all.

I'm looking for a way to add a column to already existing qx.ui.table.Table.

So far I found nothing in API, or on forums, so is it even possible?
Reply | Threaded
Open this post in threaded view
|

Cleanly dispose of a qx.ui.menu.Menu ?

Varol Okan
Hey,

I am closing one of my windows which has a qx.ui.menu.Menu. When I close
the window I can still see that the Menu DIVs are part of the DOM tree.

What do I have to do get rid of those extraneous DIVs ?

Likewise, if I use a Label, I can see that I have more than one DIV. One
of those DIVs is at position -1000, -1000. Any ideas as to why ?

Thanks,

Varol

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Adding column to existing table

Derrell Lipman
In reply to this post by deniska
The answer is effectively, no. I'd added the following to the documentation for the setColumns() method of qx.ui.table.model.Abstract many years ago, after looking into how to easily allow changing the number of columns in a table:

     * Note: You can not change the _number_ of columns this way.  The number
     *       of columns is highly intertwined in the entire table operation,
     *       and dynamically changing it would require as much work as just
     *       recreating your table.  If you must change the number of columns
     *       in a table then you should remove the table and add a new one.

Derrell



On Sat, Sep 28, 2013 at 8:19 AM, deniska <[hidden email]> wrote:
Hi, all.

I'm looking for a way to add a column to already existing qx.ui.table.Table.

So far I found nothing in API, or on forums, so is it even possible?



--
View this message in context: http://qooxdoo.678.n2.nabble.com/Adding-column-to-existing-table-tp7584683.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Cleanly dispose of a qx.ui.menu.Menu ?

Varol Okan
In reply to this post by Varol Okan
Okay, figured it out.

I have to keep a reference to the qx.ui.menu.Menu and dispose it at
destruction time.

Destroying the qx.ui.menubar.MenuBar object alone will leave the remnants.

So then the next question is on how to get rid of the extra DIVs of a
qx.ui.basic.Label object after disposing the Label object itself ?
Is that maybe related to setRich ( true ) ?

Thanks,

Varol

On 09/28/2013 10:37 AM, Varol Okan wrote:

> Hey,
>
> I am closing one of my windows which has a qx.ui.menu.Menu. When I close
> the window I can still see that the Menu DIVs are part of the DOM tree.
>
> What do I have to do get rid of those extraneous DIVs ?
>
> Likewise, if I use a Label, I can see that I have more than one DIV. One
> of those DIVs is at position -1000, -1000. Any ideas as to why ?
>
> Thanks,
>
> Varol
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Adding column to existing table

deniska
In reply to this post by Derrell Lipman
Thanks.

In that case I'm thinking perhaps creating a new table, copying all the properties except for tableModel and setting tableModel manually with 1 more column.

Would that work, or do I need to copy additional stuff, except for properties?
Reply | Threaded
Open this post in threaded view
|

Re: Adding column to existing table

Derrell Lipman
If you have a consistent set of properties to set each time, then instead of copying them from the old table to the new one, you could just subclass the table (or its components) and have the subclass set the property values that you want. That way, all you need to do is instantiate a new one of your table subclass.

For the data, you can retrieve the current data with oldTable.getDataAsMapArray(). If you're deleting a column, you can use that map array as is, for the new array, as the extra data will just not appear in the table. If you're adding a column, you can iterate over the map array, adding the column data for the new column. In either case, you call newTable.setDataAsMapArray() with your (possibly) altered data array.

Cheers,

Derrell



On Sat, Sep 28, 2013 at 12:31 PM, deniska <[hidden email]> wrote:
Thanks.

In that case I'm thinking perhaps creating a new table, copying all the
properties except for tableModel and setting tableModel manually with 1 more
column.

Would that work, or do I need to copy additional stuff, except for
properties?



--
View this message in context: http://qooxdoo.678.n2.nabble.com/Adding-column-to-existing-table-tp7584683p7584687.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel