Page 1 of 1

frameDecoration::closeResponder

Posted: 20 May 2012 12:17
by daveplummermd
Guys

I am trying to verify the close requests with user input. But, I can not see how to prevent closure .

here is clip of code in question:

Code: Select all

predicates     onClose : frameDecoration::closeResponder. clauses     onClose(_Source) =frameDecoration::defaultCloseHandling():-       Ans=vpiCommonDialogs::ask("Are You Sure",["Yes","No","Maybe"]),       Ans=1,       !.    
results in e631

any suggestions on how to fix this?

dave plummer

Posted: 20 May 2012 12:40
by daveplummermd
Whoaa

solved my own problem with:

Code: Select all

predicates     onClose : frameDecoration::closeResponder. clauses     onClose(_Source) =Out:-       Ans=vpiCommonDialogs::ask("Are You Sure",["Yes","No","Maybe"]),       if (ANS=1) then         Out=frameDecoration::denyClose()       else          Out=frameDecoration::defaultCloseHandling()       end if,             !.
Thanks