Skip to main content

How to set Help files and resourcebundle files in custom interview class?

3 replies [Last post]
murali_reddy219
Offline
Joined: 2007-10-25

Hi Vladimir,

How are you?.After long gap i got one problem. As you told i had created customized interview.Now i need to set Help files folder and resourcebundle.properties file in my interview class. Without Help, my interview is working properly.But when i add setHelpSet("help/tckinterview") this statement to my interview , i am getting the following error after giving the test suite path before configuration interview.

"An Error occurred while trying to access the test suite interview {0} ".

My interview.java file is :

package com.sun.tck.j2me.interview;

import java.util.Map;
import java.util.regex.Pattern;

import com.sun.interview.FinalQuestion;
import com.sun.interview.IntQuestion;
import com.sun.interview.Interview;
import com.sun.interview.Question;
import com.sun.interview.StringQuestion;
import com.sun.interview.StringListQuestion;
import com.sun.interview.YesNoQuestion;
import com.sun.javatest.InterviewParameters;
import com.sun.javatest.Parameters;
import com.sun.javatest.TestSuite;
import com.sun.tck.j2me.interview.util.StringEncoder;
import com.sun.javatest.util.I18NResourceBundle;

public class TCKInterview extends Interview
{
public TCKInterview(MidpTckBaseInterview parent)throws InterviewParameters.Fault {
super(parent, "tckinterview");

setResourceBundle("i18n");
setHelpSet("help/tckinterview");
setFirstQuestion(testURL);
}
private StringQuestion testURL = new StringQuestion (this, "ValidURL") {
protected Question getNext() {
return nonexistURL;
}

public void export (Map data) {
// must protect against null question answer
data.put("ValidURL", value);
}
};

private StringQuestion nonexistURL = new StringQuestion(this,"NONExistingURL") {
protected Question getNext() {
return CreateURL;
}

public void export (Map data) {
// must protect against null question answer
data.put("NONExistingURL", value);
}
};
private FinalQuestion qEnd = new FinalQuestion(this);
private static final I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(TCKInterview.class);
}

I was created Help folder and tckinterview.properties file.
why i am getting that error? plz tell me the solution for tht problem

Thanks & Regards
Murali

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vsizikov
Offline
Joined: 2004-11-16

Hi Murali,

Tricky issue, I wasn't yet able to identify any obvious reason for this problem.

Couldl you please surround that setHelpSet method call with something like:
try {
setHelpSet....
catch (Exception e) {
System.err.println("Exception: " + e);
e.printStackTrace();
}

And send me the output. The exception, and especially the stack trace will help us in narrowing the scope of the problem.

Btw, did you create all the required files, like *.hs, *.jhm files needed by JavaHelp?
Most probably, the problem is there.

Thanks,
--Vladimir

murali_reddy219
Offline
Joined: 2007-10-25

Hi Vladimir,

>> Btw, did you create all the required files, like *.hs, *.jhm files needed by JavaHelp?
>> Most probably, the problem is there.

Yes, the problem is there only. In *.hs file, i did a small mistake,it is the problem of lowecase and uppercase letters.

Thank you very much.

Thanks
Murali.

vsizikov
Offline
Joined: 2004-11-16

Hi Murali,

I'll take a look into this problem today and let you know.

Thanks,
--Vladimir