Results 1 to 5 of 5

Thread: My click event in treegrid Object make a loop

  1. #1
    Member
    Join Date
    Oct 2012
    Location
    México city
    Posts
    67

    My click event in treegrid Object make a loop

    Hi , I have treegrid in canvas section , I use the click event in it , but this make a loop, if I click in item inside my treegird the event run the procedure Ok, when it finish (the procedure) start again .. How can I clear the mouse buffer or how can I ovoid this loop.

    Thanks for youre time

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Gontran,

    Looks like it is being called twice. I have submitted a ticket for this. If this is not what you are seeing, can you attach an example to the ticket?

    Regards,

    Yvonne

  3. #3
    Member
    Join Date
    Oct 2012
    Location
    México city
    Posts
    67
    Hi again , yes I do some like you say .. I use a new public sw logical var for the event , and Voila...it works fine

    Using the sw_tregree1 and sw_tregree2 one var for one treegrid object


    My active event in page
    proc Cotizaciones_activate()
    // insert your code here
    public sw_tregree1, sw_tregree2
    store .f. to sw_tregree1, sw_tregree2
    endproc


    My click event :
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc Cotizaciones_crear_cot_lista_cat_click()
    // insert your code here
    if .not. sw_tregree1
    store space(0) to clave01
    Oitem = Lianja.getElementByID("Cotizaciones.crear_cot.list a_cat")
    clave01 = Oitem.currentItem.value

    select catalogo
    m_recno = recno()
    m_select = select()

    browse caption "Producto" noedit ;
    fields clave:h="Clave",descripcion:h="Descripcion" for at(clave01,clave) <> 0 size 400,400 title "Selecciona un Tipo"
    if _result != 0
    select m_select
    store clave to clave02
    store descripcion to descripcion02
    registro= alltrim(clave02) + "|" + descripcion02
    a1=Messagebox('¿Esta seguro de agregar este producto '+alltrim(descripcion02)+'?',4)
    if a1 = 6
    cantidad01 = inputbox('Cantidad del producto','Cantidad ','0')
    registro = registro + "|" + cantidad01
    Oitem = Lianja.getElementByID("Cotizaciones.crear_cot.prod uctos_cot")
    Oitem.AddItems(registro)
    endif
    else
    // "Cancel" was clicked or the dialog closed without selecting a row
    endif
    store .t. to sw_tregree1
    else
    store .f. to sw_tregree1
    endif
    endproc

  4. #4
    Member
    Join Date
    Oct 2012
    Location
    México city
    Posts
    67
    And yes , I use the debuger for trace the secuence , and yes in did the event go 2 times

    Regards ,
    Gontran

  5. #5
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Gontran,

    This has been fixed in the forthcoming v2.0.0 release.

    Regards,

    Yvonne

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us