Skip to content
⌘ NSIS Forum Archive

nsDialogs Example Not Working

8 posts

shiva21#

nsDialogs Example Not Working

Hello.

I followed Step By Step Tutorial from this link -http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html, The nsDialog is not opening at all, am I making any mistake.

I checked that the custom page function is getting called, but the crete dialog is not working.

-Shiva S
shiva21#
Below is the Code which I used.

!include nsDialogs.nsh
!include LogicLib.nsh

Name nsDialogs
OutFile nsDialogs.exe

XPStyle on

Var Dialog
Var Label
Var Text

Page custom nsDialogsPage
Page instfiles

Function nsDialogsPage

nsDialogs::Create 1018
Pop $Dialog

${If} $Dialog == error
Abort
${EndIf}

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

${NSD_CreateText} 0 13u 100% -13u "Type something here..."
Pop $Text

nsDialogs::Show

FunctionEnd

Section

DetailPrint "hello world"

SectionEnd
irmurray#edited
Hi,

I am unable to run this code either - it compiles OK (I have NSIS 2.33) but when I run it, I immediately get an "unknown exception" and no dialog appears. This gives me no clue as to how to fix it - where would I start to debug this?

Commenting out line nsDialogs::Create 1018 removes the exception ... but of course I get no dialog box either!

Later examples on the same readme.html page won't even compile.

Thanks for any help.


Iain.
irmurray#
Dear Anders,

Thanks for your reply. I was reluctant to upgrade as I have a number of existing installers written with 2.33 and was concerned that upgrading would affect these. The docs also suggest that nsDialogs should work with 2.29 upwards.

I have now upgraded to 2.46 and the nsDialogs example is working - great!

However, my latest installer is not compiling now, so I'll have to look into that.

Thanks again,


Iain.
Anders#
The 2.4x releases had some fixes related to Vista/7 compatibility so you really should use it if possible...