frameDecoration::closeResponder

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 88
Joined: 18 Jul 2006 17:18

frameDecoration::closeResponder

Unread post by daveplummermd » 20 May 2012 12:17

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
Dave Plummer

daveplummermd
VIP Member
Posts: 88
Joined: 18 Jul 2006 17:18

Unread post by daveplummermd » 20 May 2012 12:40

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
Dave Plummer

Post Reply