• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Help With Java Help

 
Ranch Hand
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.



 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
James Hambrick
Ranch Hand
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if hs is null, it would show you something in your console window
 
salvin francis
Bartender
Posts: 2908
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 282
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
There's a way to do it better - find it. -Edison. A better tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic