Old 26th February 2015, 15:55   #1
coderwolf
Junior Member
 
Join Date: Feb 2015
Posts: 25
blank parameter placeholders for pages

I have several questions on the pages subject
1) how can I have a page that has an exit_function but no Creator_function? In other words, what would I use as the blank placeholder so NSIS knows it is a second parameter.

2) would that placeholder be the same one to use for an 'internal_page_type'?
coderwolf is offline   Reply With Quote
Old 26th February 2015, 17:21   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Having a page with no controls on it makes no sense?

All custom pages need a creator function, just create a nsDialogs page with no controls on it...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th February 2015, 18:02   #3
coderwolf
Junior Member
 
Join Date: Feb 2015
Posts: 25
Maybe I was maligning the interpretation of "Creator_function" in what I had seen to now.

So far, in the particular implementations I have created, the Creator_function has simply been to run a section of code. Not interact with controls on the Form that is being created. I will get there eventually (mainly because I already see that if a form has a control that has previously had data entered. then the install goes forward. then the back button is pressed the control shows as blank.)
One use of this structure would be to set another variable to its value when there is a value that has been shown the previous form that drives the other variable.

To rephrase the question
1) (concerning custom pages) I want a to open a page that has been defined with no special code to be ran before it display (in my interpretation that would mean no "creator_function"), but I want my code to be executed on exit (ie leave_function).
custom [creator_function] [leave_function] [caption] [/ENABLECANCEL]

2) concerning internal_page_type
same song different verse. I just want to have a "leave_function", but no "pre_function" or "show_function"
internal_page_type [pre_function] [show_function] [leave_function] [/ENABLECANCEL]
coderwolf is offline   Reply With Quote
Old 26th February 2015, 18:26   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
1) Custom pages MUST have a creator.
2) Use empty string ("")

Quote:
Page Components "" "" compleave
Page Custom emptynsdcreate custleave
Page InstFiles

Function compleave
MessageBox mb_ok compleave
FunctionEnd

Function emptynsdcreate
nsDialogs::Create 1018
Pop $0
nsDialogs::Show
FunctionEnd

Function custleave
MessageBox mb_ok custleave
FunctionEnd

IntOp $PostCount $PostCount + 1
Anders 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