PDA

View Full Version : pre installation summary



mholland
07-06-2004, 07:51 PM
This is killling me. There has to be a workaround.

Situation:
I want to make my own "preinstallation" summary dialog that gives more useful information than the dialog that ISX provides.

My Solution/Problem:
I created a new dialog and started to wonder what type of control I can use to display a message to the user that will change based on their inputs. Also, whatever control I use, I want to use "queryEnter" rather than queryInitialize... the reason being that the former will update every time I go to the dialog (say I look at the summary, don't like some values, press back and chnage somehting, and then arrive back at the summary dialog - I want the dialog to reflect my changes).

So... back to the search for controls. I started with a label or HTMLControl - both have methods that allow you to set the text that they display. However, using queryEnter, you only have an ISQueryContext, not an ISDialogQueryContext, so you can't get the control. I hope I'm wrong on this. I can't imagine that IS would make the queryEnter of the method without allowing you access to the dialog that you are entering. As far as I can tell, all I can do in queryEnter is set variables using:
arg0.getServices().getISDatabase().setVariableValue(control,message);

So, this leads me to an inactivated text box. I can put all of my dialog in there, set it to inactive, use the above command to edit the variable that the control represents and voila. Unfortunately, this isn't such a great solution UI wise. For one, making something inactive turns the text to a hard to read grey. Also, anything in the text box is centered. Not very nice looking when the rest of your project is top justified.

Any ideas out there? This really shouldn't be (and probably isn't) so damn hard!

The thing that really bothers me is that looking at the pre build preinstallation summary dialog, IS uses queryInitialize.. this means that if you go to the usmmary screen, go back and change your install location and then go to the summary again, your change WON'T be reflected. How crumby is that? Am I missing something?

thanks,
mike.

brianl
07-07-2004, 11:50 AM
In IS X, the initializeUI() events for the dialogs actually get called every time that the dialog is visited, not only the first time the dialog is created like in ISMP. The PreInstallSummary dialog will actually be redrawn with correct information if the user clicks back in the wizard and changes settings.; So you should be able to modify the HTMLControl on your dialog the same way that it is being done in PreInstallSummary.

wohler
10-13-2004, 05:06 PM
In IS X, the initializeUI() events for the dialogs actually get called every time that the dialog is visited, not only the first time the dialog is created like in ISMP.

Then what is the difference between initializeUI and queryEnter (other than the latter being crippled by not having access to the panel)?

Thanks.

crehbein
10-14-2004, 08:42 AM
Then what is the difference between initializeUI and queryEnter (other than the latter being crippled by not having access to the panel)?

queryEnter() is there just to allow you to determine if the dialog should be displayed - think of it as a condition property, but you're allowed to use actual code instead of just a property. You shouldn't be doing any UI initialization there - hence you have no access to the panel. As Brian said, initializeUI() will get called each time before the dialog is rendered regardless of the direction of the wizard.

wohler
10-14-2004, 04:30 PM
queryEnter() is there just to allow you to determine if the dialog should be displayed...
...by calling context.setReturnValue(true|false), yes?

crehbein
10-14-2004, 04:51 PM
...by calling context.setReturnValue(true|false), yes?

Exactly. Oh, and don't fall into the same trap I did... I once tried using queryEnter() to initialize class members of my dialog, only to realize that the dialog instance which queryEnter() is called on is not the same dialog instance that initializeUI() is called on. Everything that needs to be used in initializeUI() needs to be local to initializeUI() or accessible via the DialogContext parameter. Just a friendly heads-up.. :)

wohler
10-16-2004, 01:04 PM
Whoa! That's unexpected indeed. It also turns out that the same dialog instance isn't used when you revisit a dialog (which also surprised me) so in general you basically can't use any fields in your classes unless they are static.

Thanks for the info, Chris.