| Author |
Help With Java Help
|
James Hambrick
Ranch Hand
Joined: Sep 04, 2004
Posts: 277
|
|
Okay I have used this tutorial to create the help files and the code to call javaHelp.
http://72.5.124.55/developer/technicalArticles/J2SE/Desktop/javahelp/index.html
I have used the code from this example and it worked perfectly, but I seem to be missing something when I try to incorporate it into the program we are making.
Our Main file draws the window and creates the menus including the help menu. here's the code I have
the problem is that in the getHelpSet(string) funtion hs is returned as null. Displaying the help files should probably be a new class call HelpMenu but I don't know how to then call when the user click the Help Topics menu option.
I hope this makes sense.
|
Visit my blog! http://jameshambrick.com
|
 |
Raghavan Muthu
Ranch Hand
Joined: Apr 20, 2006
Posts: 3327
|
|
Hi James,
the problem is that in the getHelpSet(string) funtion hs is returned as null. Displaying the help files should probably be a new class call HelpMenu but I don't know how to then call when the user click the Help Topics menu option
Though I could not completely go through the entire article at the moment, after looking at the piece of code you had pasted and with your query, the reason for the getHelpSet(string) method returning null could be because the 'hs' object could be null.
This may be due to the fact that the constructor of HelpSet is unable to return a non-null object. Did you check the availability of helpsetfile in the same path where the classloader is looking for?
|
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
c:\MyHelp\Sample.hs
Is this the file path in your System too ??
When a function returns you null, you have to look into the function's logic and understand why,
Hint: according to your function written below, if hs is null, it would show you something in your console window
Judging by the Question you asked, i suggest you to first try simpler examples
|
My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
|
 |
James Hambrick
Ranch Hand
Joined: Sep 04, 2004
Posts: 277
|
|
salvin francis wrote:
c:\MyHelp\Sample.hs
Is this the file path in your System too ??
When a function returns you null, you have to look into the function's logic and understand why,
Hint: according to your function written below, if hs is null, it would show you something in your console window
Judging by the Question you asked, i suggest you to first try simpler examples
I have stepped through the code and this is where hs becomes null. c:\MyHelp\Sample.hs is the correct path to the help file I have already checked that.
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
|
if hs is null, it would show you something in your console window
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
Let me rephrase my self,
Please provide us with the error message Stack trace that appears in your console window so that we can help you better.
And,
I knw its a bit too late to mention it now, but your post title
Help With Java Help
mentions nothing about the problem you are facing
please ensure a brief descriptive title in future
I had already established the fact that the error was in lines 18 - 19 in the code, I am intrested to know that the error is.
|
 |
James Hambrick
Ranch Hand
Joined: Sep 04, 2004
Posts: 277
|
|
|
I will remember to post and better topic on my next ones. I have gotten help from one of the other programmers working on the project with me. Thanks for the help.
|
 |
 |
|
|
subject: Help With Java Help
|
|
|