Archive: "Next" button


"Next" button
In one of the custom pages in my installer at the initialization I disable the "Next >" button and then, based on user input I enable it. It's meant to stop the user from keying in rubish and get away with it...
The problem is: the stupit button doesn't want to get back to "enabled" state...
the code is very simple:

....
page custom java_home java_home_valid
....

Function java_home
....
GetDlgItem $NEXTWINDOW $HWNDPARENT 1
EnableWindow $NEXTWINDOW 0
....
FunctionEnd

Function java_home_valid
....
; search for java.exe
JREdll::validate "$JRE_LOCATION" ;my own plugin
Pop $valid
StrCmp $valid "TRUE" "" "ELSE"
GetDlgItem $NEXTWINDOW $HWNDPARENT 1
EnableWindow $NEXTWINDOW 1
ELSE:
....
FunctionEnd
....

Thas it... easy, right ? but it doesn't work... it does work for the other 2 buttons, "back" and "cancel"... i can disable and enable them as i wish... but i don't need that! I want my "Next" back !!

Anyone has ANY idea ?


Hi :)

Instead of disabling the "Next" button you could use the instruction "Abort" in the page's "Leave Function" if the user has typed rubbish... If he did, he'll stay on the page. You can also display a message at this point..

Explanations about "Callback functions" can be found there:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.5.3

evilO/Olive


I know that... but i prefer not to let them click "next" if the input is not correct...
Actually it's a bit different... The "input" is a disabled customized "browse for directory" which has the "OK" button enabled if and only if the selected directory points to a JDK home. Until the user chooses a valid JDK directory the "Next" button is disabled.

Of course if i will not be able to do it my way, the proposed solution sounds good.
It's just a challenge for me and who ever has some free time to think about it ... :D


http://forums.winamp.com/showthread....hreadid=177208


Aha!!! so it's the little sneaky "abort" that causes all the problems... the little bastard...
NOw.. how can I go around it.... ??


It has been reported and will be fixed.


Sorry, I'm new here... I discovered NSIS one week ago :D How will I know if it has been fixed ? Is there a page that I have to read daily like a ChangeLog or something ?

Thanks for your help...


http://nsis.sourceforge.net/developm...ent/changelog/


Fixed in the latest CVS version.


Hmm....
I've tried the new changes and it seams to me that all the buttons are messed up... Is it just me or someone else had same problem..
"Next" doesn't get enabled and "Back" and "Next" (if i do not disable it) have the same effect, "move to next screen" ... I will keep trying to see if it's my error but so far my script seams to be correct...

P.S.
Thanks for the effort!


kichik fixed that in the latest CVS version.


Strange... It still behaves the same.... the "next" doesnt get re-enabled...


Just curious, is anybody still looking into this error or I should give up the hope and try a different solution?

Thanks.


Make sure you have the latest CVS version. It's working for other people and I have just successfully tested it again to make sure.


OK.. I will download it again and test one more time...
Fingers crossed!!!


It works!!

What was wrong? kichik forgot to add "InstallOptions.dll" in the modifed files list and I havent update it... :rolleyes:

2004-05-15 11:22 Amir Szekely (kichik)

makensis.exe, Source/exehead/Ui.c: fixed the next/back buttons bug caused by the last fix
Now it's PERFECT!!! Thanks alot guys!!! Great job!!!