Old 9th October 2007, 22:27   #1
junrau
Junior Member
 
Join Date: Oct 2007
Location: Littleton, CO
Posts: 3
How do I know if the cancel button was clicked?

In my page leave function, the following call returns 0 for both the cancel button and the next button, so my validation occurs when the cancel button was clicked:

ReadINIStr $0 "pageComponentParameters.ini" "Settings" "State"

Is there a way to know if the button clicked was Cancel vs. Next?
junrau is offline   Reply With Quote
Old 9th October 2007, 22:33   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The leave function isn't called when the Cancel button is clicked. If you're talking about the code after InstallOptions::show is called, then the answer is waiting for you on the stack. If the user clicked Cancel, InstallOptions::show will return "cancel" on the stack. It'll return "success" for Next and "back" for Back.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 10th October 2007, 15:18   #3
junrau
Junior Member
 
Join Date: Oct 2007
Location: Littleton, CO
Posts: 3
The Leave function is definitely being called when I click Cancel. I am using the ExperienceUI, so I have no InstallOptions::show call. Would that make a difference?
junrau is offline   Reply With Quote
Old 10th October 2007, 15:52   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That is a known bug with ExperienceUI.

Stu
Afrow UK is offline   Reply With Quote
Old 10th October 2007, 15:58   #5
junrau
Junior Member
 
Join Date: Oct 2007
Location: Littleton, CO
Posts: 3
Is there a workaround?

Quote:
Originally posted by Afrow UK
That is a known bug with ExperienceUI.

Stu
junrau is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump