question about mobile list and longtap

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

question about mobile list and longtap

rsantiagopaz
hi (sorry the english)

I use a mobile list and longtap event to show a context menu. But I need known the item selectioned (the item model, item index, etc). How I can know the item list?
I try (targets, touch events, taps, etc) and read all the documentation and I can't figure how to get this.

thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

John Spackman
Hi

Please could you re-ask this question at StackOverflow and make sure you add the tag “qooxdoo”?  We’re trying to develop a more public set of Q&A and StackOverflow is a great way to do it

Regards
John



On 28 June 2016 at 09:47:29, rsantiagopaz ([hidden email]) wrote:

hi (sorry the english)

I use a mobile list and longtap event to show a context menu. But I need
known the item selectioned (the item model, item index, etc). How I can know
the item list?
I try (targets, touch events, taps, etc) and read all the documentation and
I can't figure how to get this.

thanks



--
View this message in context: http://qooxdoo.678.n2.nabble.com/question-about-mobile-list-and-longtap-tp7588348.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

kreimer
In reply to this post by rsantiagopaz
Hola Santiago,

probablemente te sea más conveniente escuchar al changeSelection de la lista. Para posicionar el popup respecto al item correspondiente a la selección, tendrías averiguar la posicion (algun indexOf de la coleccion con la que construiste la lista) y con eso mas los métodos getItemCount y getItemHeight... posicionar el popup. Estaría bien que todo esto estuviera soportado ya en qx.Mobile, que es un sabor algo en desuso (yo lo uso),. Pero ahí esta todo en github.. para que lo enriquezcas.

Suerte!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

rsantiagopaz
thanks kreimer

no necesito posicionar, necesito saber que item estaba siendo presionado. El behavior basico de menu de contexto en apps moviles.

I do not need positioning, I need known the pressed item when the longtap is triggered.
I asume is easy get a hack, but I have no knowledge.
Without a answer negative or positive Im stuck. But I will use others options, no context menu.
thanks

Sorry the english!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

kreimer
hola, me imagino que sabiendo la posición de la selección te basta para saber qué ítem fue seleccionado. (tu guardas la lista 'modelo' con la que alimentaste la lista con setModel, no?)

Extraído de la doc de qx.ui.mobile.list.List:

  list.addListener("changeSelection", function(evt) {
    alert("Index: " + evt.getData())
  }, this);
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

rsantiagopaz
I inspected the removeItem event and found a solution

list.addListener("longtap", function(evt) {
    var originalTarget = evt.getOriginalTarget();
    while (originalTarget.tagName != "LI") {
        originalTarget = originalTarget.parentNode;
    }

    var itemIndex = parseInt(originalTarget.getAttribute("data-row"), 10);
    alert("Item Selected #" + itemIndex);
});
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: question about mobile list and longtap

John Spackman
Hi guys

Thanks for contributing and taking part on the list, but please can you communicate in English?  Qooxdoo is made up of users from across Europe as well as further afield, and the official policy is that all emails, discussions, comments, etc are in English.

Thanks
John

On 7 July 2016 at 21:07:12, rsantiagopaz ([hidden email]) wrote:

I inspected the removeItem event and found a solution





--
View this message in context: http://qooxdoo.678.n2.nabble.com/question-about-mobile-list-and-longtap-tp7588348p7588356.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...