Archive: Change section description at runtime


Change section description at runtime
I have a section for the JRE installation. If I detect the JRE at runtime (I do this check in the .onInit function) then I want to have the JRE installation section disabled by default and its description changed to: "You already have the JRE installed".

I can disable the section by default using SectionSetFlags, but I am unable to change the section description. Any ideas?

Gili


This is made worse by the fact that it is impossible to define your own ".onMouseOverSection" under the ModernUI. Am I missing something here? Is there a way to define your own callback hook?

Thanks,
Gili


As said in the feature request, use a variable in the description and change that variable in .onInit.


Originally posted by kichik
As said in the feature request, use a variable in the description and change that variable in .onInit.
Right now the description refers to a LangString. Are you saying that the LangString value should just be a variable? In other words:

LangString DESC_JRESection ${LANG_ENGLISH} "${myText}"

and alter ${myText} in .onInit?

Is there a way to alter the LangString directly instead?

Thanks,
Gili

The LangString can be replaced with a variable or it can contain a variable itself. If you want to support multiple languages, you can copy the appropriate LangString into the variable and use the variable in the description without the LangString.


Originally posted by kichik
The LangString can be replaced with a variable or it can contain a variable itself. If you want to support multiple languages, you can copy the appropriate LangString into the variable and use the variable in the description without the LangString.
It works great! Thank you very much!! :)

Gili