Archive: Dynamic IO Pages


Dynamic IO Pages
OK, I searched the forums, but I didn't found anything that fits to my wishes.

I just wanted to create Dynamic IO Dialogs
something Like this

______________________________
|Which Database do you use
|( )ORACLE
|( )SQL
|
|
|
|______________________________

|
V
______________________________
|Which Database do you use
|( )ORACLE
|(X)SQL
|Please enter the Servername:
|
|Please enter the Database:
|______________________________

|
V
______________________________
|Which Database do you use
|(X)ORACLE
|( )SQL
|Please enter the TNS-Names:
|
|
|______________________________



It would be useful, cause the user hasn't to click throught 20 Dialogs when he can make 3 or 4 inputs in only one dynamic Dialog

is there anyway to do this?


You might be able to achieve this with the new NOTIFY flag. I haven't used it before so I can't be sure, but from what I have read about it it should be possible.

Vytautas


thats near to what I'm searching for,
but I would prefer it to hide the fields complete and not just disable them

nevertheless thanks Vytautas

PS.: Wouldn't it be fine to have a Flag or a Property like Visibility?


You might be able to call a windows message to hide the fields from the callback function of NOTIFY :igor: I hope.

I think the message you are looking for is something like WM_HIDE or WM_SHOW or something else.

Vytautas


Hmm Sorry but I can't understand what you mean :(

hmm ok it seems that I have to create those nearly 20 Dialogs


Hi Davion :)

Well, I hope you didn't start yet to write those 20 dialogs, as there IS a solution to your problem: dselkirk wrote a plugin that can show/hide controls:

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


I compiled the Dll, and wrote a test script.. try it and let me know it it does work for you.. (tested and working on XP).


evilO/Olive


Doh! I forgot to attach the DLL.. (just slept 3 hours last night.. :D)


Shame on me! I forgot the script too :(


I receive an Error when I try to compile a script... don't really know how to work with this example

sorry I'm still a noob :(


Damn cool it worked :D

I just have to modify it a bit, but I'll tell you if it worked as I want it to

Thanks evilO


Great Thanks evilO, it works fine - it's a bit confusing code, cause I didn't work with this commands until now, but it works and thats important

Great!

Dave


I'm glad it's working :)

But sorry I think I didn't put any comment at all in the source code :(
So here is a commented version if that can help you or anybody else..

I hope Im forgiven :D

evilO/Olive


ShowWindow can show/hide windows like EnableWindow can enable/disable windows. If you can disable using EnableWindow, you can hide using ShowWindow.


I've putted your Script into my Setup

unfortunatly if I click on Oracle or SQL it jumps to the Next page like I've clicked on Next and the I cant make any input into the textbox I defined I'll attach the the Script and the ini, maybe someone has an idea

I know that some parts are not complete yet, but they don't use the script evilO gave me... so they shouldnt be responsible for the error


Hi :)

Sorry for the delay I had some work to get done..


1) In the function "cp_leave", just replace

ReadIniStr $R0 "$PLUGINSDIR\dynamic.ini" "Settings" "State"

by

ReadIniStr $R0 "$PLUGINSDIR\ioSDBType.ini" "Settings" "State"


"dynamic.ini" was the name of the ini file I used to test the script. So the installer tries to read the user input in a file that does not exist, therefore causing the error.



2) Another point: I've just spotted that in the script I forgot to "Pop $R0" before the two instructions "Abort" , causing values to pile up... fixed.


3) Another issue, about the "NOTIFY" flag : there is a bug if the user changes the selection using the keyboard, the 'leave' function is called around 18 times (put a MessageBox and you'll see that..).

Thread:
http://forums.winamp.com/showthread....hreadid=171745



I think that's all.. Let me know if there are still problems.. :)


evilO/Olive


Thanks for your fixes evilO, but it still doesn't work

if I click on one of the two options, the next dialog is shown - If I use this script only(without my extensions) it works, but as soon as I complete the script it doesn't work anymore

similar thing with the LangString error - I've another Setup which works, but in this script there's an error...

its confusing

some scripts work with parts of code, but other scripts don't even if I adapt the paths and so on


Err, really strange, it's working fine on my computer.. :eek:
Same remark for the LangString problem, it's working just fine..

Which version of NSIS do you use?

could you attach the whole script with your last modifications?

evilO/Olive


Now it quite works

I defined an own langFile, included it - got an error - included german - and it worked

and the dynamicPage...well it works...but...

there are two inputboxes
i entered some text and clicked next

it copied the files and showed the finishscreen - after pressing finish
it started again o_O

is this what you meant above?


I defined an own langFile, included it - got an error - included german - and it worked
Well, you shouldn't have to define you own LangFile to get this working...
it copied the files and showed the finishscreen - after pressing finish it started again
What to you mean by "it started again" ?
is this what you meant above?
Err, which sentence in which post? :confused:
If you still have problems, could you please attach your script?


evilO/Olive

Another issue, about the "NOTIFY" flag : there is a bug if the user changes the selection using the keyboard, the 'leave' function is called around 18 times (put a MessageBox and you'll see that..).
hmm here is the Script

If I click on FINISH it returns to the welcomepage and I have to click all dialogs a second time, but it works as I want it to... but its nevertheless confusing

Ok, no it's not related to the bug about the "NOTIFY" flag I told you about.

If you have to go through all the dialogs a 2nd time, it's because you defined all the pages twice in your script, to get rid of the "LangString problem" I guess.

I have just removed the MUI macros between the functions ".onInit" and "cp_show":
- No LangString warning
- No "Double execution"
- The radiobuttons with the "NOTIFY" flags are working

You can check the examples in "NSIS\Examples\Modern UI" if you are still confused..

evilO/Olive


I'm so stupid

thx evilO thx to all others

with your help the worst work is done
I have to keep on working over the weekend, so I may fill the forum a bit more :D

Thank You very much!

greetz

Dave


You are welcome Davion, I'm glad you got it working :up: !

I have to keep on working over the weekend, so I may fill the forum a bit more
Err, week-end are meant to have fun or to rest :p !!!

Anyway have a nice week-end :D

evilO/Olive

hmm maybe something on my system is wrong, but I dont get everything working... expect evilOs function which works fine...