Archive: Using NOTIFY flag is jumping over my page


Using NOTIFY flag is jumping over my page
Hello,
it is simple: two custom pages;
on first
- select item from listbox
- click Next and go to second
on second
- check/uncheck checkbox and finish.

I set flags=notify on listbox in first page in order to disable\enable Next button, according to is item selected.
When i select an item, button gets enabled and installer jumps on the second page, shows it for a moment and finishes installation so i have no chance to see it.
I tried AutoCloseWindow true, but no success.
Tried to Abort page if Next button is not pressed, but the button gets disabled again.
And it already took me too much time, that's why i am asking for help.
Greetings.


Using NOTIFY is the same as the user clicking the Next button.
So you need to check if NOTIFY was called by checking the State value under Settings (I assume you're already doing this)... then obviously you need to stop it continuing to the Next page. It will if you don't stop it! Call Abort to return to the page.

-Stu


ahmm, to understand I begin.
I actually tried that already, but there is another problem:
- my page shows with Next button disabled
- when i select item from list the button blinks as enabled and sets disabled again.
I think i read that Abort calls back the Pre function and i tried to check there if NOTIFY was called and not to disable the button again. I put a messagebox in the beginning but it doesn't appear after selecting item.



Function "browse_pre"

StrCmp $notify_flg 1 go no
no:
GetDlgItem $next_btn $HWNDPARENT 1
EnableWindow $next_btn 0
go:
!insertmacro MUI_INSTALLOPTIONS_WRITE "server.ini" "Field 1" "ListItems" "$net_pc"
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "server.ini"
!insertmacro MUI_INSTALLOPTIONS_SHOW
FunctionEnd

Function "browse_post"
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "server.ini" "settings" "State"
StrCpy $notify_flg $R1
StrCmp $notify_flg 1 stay continue
stay:
Abort
EnableWindow $next_btn 1
continue:


I hope you got the idea.
Thanks in advance :)

Page Custom ShowFunc LeaveFunc

Calling Abort in the LeaveFunc function will return back to that page. NOTIFY still works with the Next button disabled. Obviously it doesn't actually click on the Next button to call the leave function!

-Stu


Returning back to ShowFunc ?
Then why, in ShowFunc, I can't check if NOTIFY was called(using $notify_flg variable)?

And if Abort does not return to ShowFunc, then how the Next button is changed back to disable when there is no such command in LeaveFunc?

Yes I get the behaviour of NOTIFY, but can not understand the behaviour of Abort.


No it doesn't execute the ShowFunc code again. It just shows the InstallOptions dialog again which is already in memory.

What are you trying to do exactly?

-Stu


Show the page with Next button disabled. After selecting an item from listbox, enable the Next button and when user click on it - proceed.


In which case have code in the Show function to disable the button and code to enable the button in the Leave function.

-Stu


Leave it, the boss suggest another way.
Thanks a lot, and sorry for wasting your time :)