Archive: NSD_OnChange


NSD_OnChange
  Knowing that NSD_OnChange macro receives two parameters (handle and function that will be called), is there a way to the called function receive another parameter besides the handle? I want to make the function settext.onChange generic and everytime I update a textbox a variable gets fill. I don't know if my question is clear but I researched on old foruns post and I saw that this was not possible (I saw a post from 2001 I think). SO is the best solution create a function for eache textbox? or there is a way to make it generic?

###
${NSD_CreateText} 90u 50 50% 10% $smtpHost
Pop $smtphwnd
${NSD_OnChange} $smtphwnd settext.onChange

${NSD_CreateText} 90u 50 50% 10% $from
Pop $fromhwnd
${NSD_OnChange} $smtphwnd settext.onChange

###


Function settext.onChange
${NSD_GetText} $R8 $R9
FunctionEnd


You've already got what you need to distinguish them by using the handle, though?


FunctionEnd 

>
What sort of information were you hoping to pass along? The *UserData bits might also be of help;
http://nsis.sourceforge.net/NsDialog...ton_selections

Humm that way might help. I was trying to do a very generic function by pushing the variable names and set them dinamicly, but I thing the way you show is just fine thanks.


can't really 'push variable names'.. what would you pop them to? :) Can only push/pop values, really. If there were a GetVariableAddress.. then that might be possible.