Skip to content
⌘ NSIS Forum Archive

nsDialogs back/next/cancel buttons disabled

2 posts

paulprogrammer#

nsDialogs back/next/cancel buttons disabled

Hi all,

I've got this question also on StackOverflow:

I created an nsdialog from the tutorials.

I have a section that is correctly displaying my custom dialog at the right time, but doesn't allow me to do any next/back/cancel or close action.

What magick must be invoked to activate the buttons?



Here's the section:

Var Dialog
Var Label
Var MyTextbox
#Page custom configLocationDialog configLocationDialogLeave
#Page custom doConfiguration
Section configLocationDialog
nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}

GetFunctionAddress $0 "configLocationDialogLeave"
nsDialogs::OnBack $Dialog $0
#nsDialogs::OnNext $Dialog

${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
Pop $Label

${NSD_CreateText} 10% 20u 80% 12u "Hello World"
Pop $MyTextbox

nsDialogs::Show
SectionEnd
paulprogrammer#
Figured it out. The NSISEclipse plugin generates a big stack of code including a block of macro calls that generate the various installer pages. The trick was to insert my page call before the INSTFILES call.


# Installer pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
Page custom configLocationDialog configLocationDialogLeave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES