Skip to content
⌘ NSIS Forum Archive

[ExperienceUI] Fail to Abort from page leave function

3 posts

meltice#

[ExperienceUI] Fail to Abort from page leave function

I use ExperienceUISetup-1.11-pre.exe

I am unable to stay in current page with Abort instruction. ExperienceUI's UI missing(crash) when I call Abort. And I found if I click the Cancel button, the page leave function will be triggered too, and that is wrong. Need I change back to Modern UI? I like ExperienceUI interface better. Somebody can help me fix these 2 bugs? Thanks.

!define XPUI_PAGE_CUSTOMFUNCTION_LEAVE ComponentsLeave
${Page} Components

Function ComponentsLeave
MessageBox MB_YESNO "Leave this page?" IDYES NO_ABORT
Abort
NO_ABORT:
FunctionEnd
fishsauce#
I have that issue with one of my pages too... but I disabled the 'next' button on that page. If I hit 'cancel' I have to hit 'back' afterwards to get the installer to close.
meltice#
Here comes the solution I found...


Function ComponentsLeave
;
; It seems ExperienceUI call LockWindow on somewhere
; that make UI won't repaint
;
LockWindow off

MessageBox MB_YESNO "Leave this page?" IDYES NO_ABORT
Abort
NO_ABORT:
FunctionEnd