PDA

View Full Version : simple variable get and set a variable



freecandykids
07-19-2004, 03:18 PM
how can i, within a custom event bean, retrieve the value of a variable as a string, and then set another variable with the value of that string? I have to do this at run-time and simply setting the values within my Property Manager won't work.

thanks,
billy

Steff74
07-20-2004, 06:49 AM
String oldVariableValue = context.getServices().getISDatabase().getDatabaseDef().getVariable("OLD_VARIABLE").getValue();

context.getServices().getISDatabase().getDatabaseDef().getVariable("NEW_VARIABLE").setValue(oldVariableValue);

Steff

freecandykids
07-20-2004, 01:21 PM
There are so many things about installshield that should be so simple that just go undocumented. I'm really starting to hate this software. Thanks again steff.

Steff74
07-21-2004, 02:58 AM
There is a more simple way I think and I just found it in the Installshield provided PanelDestination class:

installLocation = context.getServices().getISDatabase().getVariableValue(DESTINATION_VAR_NAME);

context.getServices().getISDatabase().setVariableValue(DESTINATION_VAR_NAME, installLocation);

The most times I use provided examples and the advanced API to get the functionality I need...

As I'm also a programmer, I know what it means, to document a program, code, ... :)

Steff

coreram
02-01-2006, 10:52 AM
There are so many things about installshield that should be so simple that just go undocumented. I'm really starting to hate this software. Thanks again steff.

Hi

Can u help by providing the Method..

Help me to create a property file with some properties like Application name, Install Location.

mail Id : knowledgeinshare@yahoo.co.in

Thanks & Regards,
Ram