Old 27th March 2014, 20:11   #1
pld32
Junior Member
 
Join Date: Apr 2008
Posts: 15
Invalid command: ${NSD_SetUserData}

I'm trying a NSdialog example and getting an error? Can anyone tell me what is missing?

Invalid command: ${NSD_SetUserData}

I'm using HM NIS Edit 2.0.3

MakeNSIS V2.46

code:
!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"

OutFile "test.exe"

Page Custom pre post

var dialog
var hwnd
var minor

Function pre
nsDialogs::Create 1018
Pop $dialog

${NSD_CreateRadioButton} 0 0 40% 6% "I am 14 years of age or older"
Pop $hwnd
${NSD_AddStyle} $hwnd ${WS_GROUP}
${NSD_SetUserData} $hwnd "false"
${NSD_OnClick} $hwnd RadioClick
${NSD_CreateRadioButton} 0 12% 40% 6% "I am younger than 14 of age"
Pop $hwnd
${NSD_SetUserData} $hwnd "true"
${NSD_OnClick} $hwnd RadioClick

nsDialogs::Show
FunctionEnd

Function RadioClick
Pop $hwnd
${NSD_GetUserData} $hwnd $minor
FunctionEnd

Function post
${If} $minor == ""
MessageBox MB_OK "Please specify your age group"
Abort
${ElseIf} $minor == true
MessageBox MB_OK "installation will continue with content appropriate for your age"
${Else}
MessageBox MB_OK "installation will continue normally"
${EndIf}
FunctionEnd

Section ""
SectionEnd


Last edited by pld32; 27th March 2014 at 20:13. Reason: fix
pld32 is offline   Reply With Quote
Old 27th March 2014, 21:16   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,191
nsDialogs::SetUserData

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 28th March 2014, 13:00   #3
pld32
Junior Member
 
Join Date: Apr 2008
Posts: 15
Thank you....
pld32 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
nsdialogs

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