This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How can I with code set a $V variable?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2006
09:05 AM
How can I with code set a $V variable?
I want to be able to set a $V variable. How can I do this? Maybe Im going about this the hard way but what I have tried is to create a custom event and used the following :
public void onExecutingsetVariable(com.installshield.event.wizard.WizardActionContext arg0)
{
SetVariableAction myVar = new SetVariableAction();
myVar.setName("test");
myVar.setValue("myValue");
myVar.execute(test);
}
The problem is that the execute method of the SetVariable needs a (WizardBeanEvent event ) which for the life of me I cant figure out how to get from my context 😞 Please help its driving me nuts!!
public void onExecutingsetVariable(com.installshield.event.wizard.WizardActionContext arg0)
{
SetVariableAction myVar = new SetVariableAction();
myVar.setName("test");
myVar.setValue("myValue");
myVar.execute(test);
}
The problem is that the execute method of the SetVariable needs a (WizardBeanEvent event ) which for the life of me I cant figure out how to get from my context 😞 Please help its driving me nuts!!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2006
09:36 AM
Please see the end of this thread: [thread]144598[/thread].
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2006
10:47 AM
How can I specify attributes such as persitant or global,etc?
Thanks.
This should really be documented in the section on working with variable. Having only ways to set it in the UI in the documentation is very limiting 😞
Thanks.
This should really be documented in the section on working with variable. Having only ways to set it in the UI in the documentation is very limiting 😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2006
12:24 PM
I haven't used them myself, but the same class that provides the setVariableValue method provides createGlobalVariable, createGlobalPersistedVariable, and similar methods; which return an ISVariable object, which in turn has setName, setValue, setSecret (and related) methods...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 28, 2006
02:50 PM
Cool I will give it a try 🙂