Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 4

Options file reading in confusion

I have an options file I'm using and my question has to do with the reading in from the file. The one part of my options file that is giving me an issue looks like this:
-V usrLang=ja_JP
and when I'm reading it in I do
public void silentExecuteSelectLanguage(ISSilentContext arg0){
String lang = arg0.getServices().getISDatabase().getVariableValue("usrLang");
System.out.println("The lang is " + lang);
arg0.getWizard().getServices().getISDatabase().setVariableValue("usrLang", lang;
However no matter what I put in the options file it prints out "en_US" (the default) as the usrLang. I played around with some other files and I'm pretty sure I'm doing the reading in correctly so any idea why it's reading in the wrong value?
Labels (1)
0 Kudos
(2) Replies
Level 9

Do you have code that initializes that variable somewhere besides the Property Manager? I too had something similar where I had code in my OnBegin that was setting the variable - which would overwrite the optionfiles value!

Also - try putting the value in double quotes!

-V usrLang="ja_JP"
0 Kudos
Level 4

Hmm the double quotes did not work but I might be setting it elsewhere, I'll poke around and see if I can find something.

It was being set somewhere else, got it to work now. Thanks!
0 Kudos