Popup menu bug?

Josep jmyepes at mac.com
Mon Jun 1 09:13:26 EDT 2009


Hi list,

I found this... maybe I doing something wrong but...

Create a popup menu with many options.
In the popupmenu put this:

on menuPick pItemName
   Global pOldItem
   
   put pItemName into fld lbl_search
   replace "!c" with "" in line lineOffset(pOldItem,button opt_search) of
button opt_search
   
   put "!c" before line lineOffset(pItemName,button opt_search) of button
opt_search
   put pItemName into pOldItem
   
   switch pItemName
    
   end switch
end menuPick

For check and uncheck the option selected by the user.

Put in a button mouseup this:

  switch the selectedtext of button opt_search
      case "!cNIF"
         put "select * from clientes where CLI_NIF like " & quote & "%" &
fld f_buscar & "%" & quote into tQuery
         break
      case "!cTeléfono"
         put "select * from clientes where CLI_Telefono like " & quote & "%"
& fld f_buscar & "%" & quote into tQuery
         break
      case "!cNombre"
         put "select * from clientes where CLI_Nombre like " & quote & "%" &
fld f_buscar & "%" & quote into tQuery
         break
      case "!cPoblación"
         put "select * from clientes where CLI_Poblacion like " & quote &
"%" & fld f_buscar & "%" & quote into tQuery
         break
      default
         
   end switch

The "the selectedtext of button opt_search" ever have the first option.
But if you don't perform any operation into menuPick the "the selectedtext
of button opt_search" have the correct option.

Why?


Salut,
Josep
-- 
View this message in context: http://www.nabble.com/Popup-menu-bug--tp23814764p23814764.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list