How to programmatically close a qx.ui.tabview.Page

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

How to programmatically close a qx.ui.tabview.Page

zaucker
Hi,

how can I close a qx.ui.tabview.Page programmatically from the page itself?

-  this.fireEvent('close')

    seems to work, but it also seems like a hack and I am not sure if it has
    side effects I don't see.

- this.getChildControl('button').fireDataEvent('close', this)

   seems to work as well, same questions as above. Which one of those two
   would be more appropriate?

- this.getChildControl('button').getChildControl('close-button').execute()

   would seem appropriate for me, but does not work (no error, but the page
   isn't removed).


Thanks,
Fritz (somewhat confused)

--
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically close a qx.ui.tabview.Page

Daniel Wagner
Administrator
Hi Fritz,

using this.fireEvent('close') is perfectly fine. The TabView doesn't
care if the event was originally triggered by a button click or not.
It's a simple event without any data so there won't be any side effects.

Regards,
Daniel

On 27.03.2015 12:59, Fritz Zaucker wrote:

> Hi,
>
> how can I close a qx.ui.tabview.Page programmatically from the page itself?
>
> -  this.fireEvent('close')
>
>     seems to work, but it also seems like a hack and I am not sure if it has
>     side effects I don't see.
>
> - this.getChildControl('button').fireDataEvent('close', this)
>
>    seems to work as well, same questions as above. Which one of those two
>    would be more appropriate?
>
> - this.getChildControl('button').getChildControl('close-button').execute()
>
>    would seem appropriate for me, but does not work (no error, but the page
>    isn't removed).
>
>
> Thanks,
> Fritz (somewhat confused)
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically close a qx.ui.tabview.Page

fritz
Thanks,
Fritz

On Fri, 27 Mar 2015, Daniel Wagner wrote:

> Hi Fritz,
>
> using this.fireEvent('close') is perfectly fine. The TabView doesn't
> care if the event was originally triggered by a button click or not.
> It's a simple event without any data so there won't be any side effects.
>
> Regards,
> Daniel
>
> On 27.03.2015 12:59, Fritz Zaucker wrote:
>> Hi,
>>
>> how can I close a qx.ui.tabview.Page programmatically from the page itself?
>>
>> -  this.fireEvent('close')
>>
>>     seems to work, but it also seems like a hack and I am not sure if it has
>>     side effects I don't see.
>>
>> - this.getChildControl('button').fireDataEvent('close', this)
>>
>>    seems to work as well, same questions as above. Which one of those two
>>    would be more appropriate?
>>
>> - this.getChildControl('button').getChildControl('close-button').execute()
>>
>>    would seem appropriate for me, but does not work (no error, but the page
>>    isn't removed).
>>
>>
>> Thanks,
>> Fritz (somewhat confused)
>>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

--
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel