Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange problem - cancel button doesn't react
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01537294
Message ID:
01537299
Vues:
56
>Hi everybody,
>
>I have a complex form with an ActiveX control and a pageframe with 11 pages. Almost every page has Save/Cancel buttons on almost the same positions.
>
>I found this weird behavior. When I activate Sections page and try to click Cancel button, nothing happens and code doesn't execute. If I switch to Level page and then back to Sections page, the Cancel button starts working.
>
>Do you know what can I do to make it always work?
>
>Thanks in advance.

A bit more info. I tested that this button doesn't work in another position on this page also. There is a form's method called CancelValidation with this code
local llReturn, loObject
local array laMouseObj[1]

amouseobj(laMouseObj,1) && object under mouse
loObject = laMouseObj[1,1]

if vartype(m.loObject) = "O"

   llReturn = thisform.releasetype = 1 or ;
      (inlist(lower(justext(sys(1272, m.loObject))),"abortbutton", "cmdclose", "cmdcancel") ;
      and mdown()) && We're checking for Release type and Close/Cancel button
else
   llReturn = thisform.releasetype = 1
endif

return m.llReturn
This method is called from grid's BeforeRowColChange and Valid methods. Also, I found if I gave this button a different name, say, cmdAbort, it works. As soon as I name it 'cmdCancel' it stops working. Do you know what may cause this behavior? I also verified, that it doesn't work if I name this button AbortButton, so this method CancelValidation is somehow a culprit, but I don't understand how.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform