Skip to main content

Favorites problems in JH 2.0_01

4 replies [Last post]
pkeegan
Offline
Joined: 2005-06-10

I downloaded the new release and plunked the jh.jar binary into my app (a custom build of NetBeans IDE), but the Favorites navigator isn't treating me well. If I right-click to create a new folder and then try
dragging an item into the folder, the help window freezes. Closing and reopening the help doesn't work (only a grey help window shows). I have to restart the whole app.

This brings me to another set of questions. I looked for the favorites file and discovered that it is stored in the system userdir in .javahelp/Favorites.xml.
*What would happen if another application used JavaHelp and the favorites feature?
*Would it use the same file?
*Is there a way to program where the Favorites file is stored? It might be nice to be able to have it saved in the userdir setup by the application.

-Patrick

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Richard Gregor

Hi Patrick,

java-help@JAVADESKTOP.ORG wrote:

>I downloaded the new release and plunked the jh.jar binary into my app (a custom build of NetBeans IDE), but the Favorites navigator isn't treating me well. If I right-click to create a new folder and then try
>dragging an item into the folder, the help window freezes.
>
Please, file a bug along with thread dump (run IDE in console and press
CTRL+BREAK when IDE is frozen).

>Closing and reopening the help doesn't work (only a grey help window shows). I have to restart the whole app.
>
>This brings me to another set of questions. I looked for the favorites file and discovered that it is stored in the system userdir in .javahelp/Favorites.xml.
>*What would happen if another application used JavaHelp and the favorites feature?
>*Would it use the same file?
>
Right it uses the same file. Each item has hs signature so in your
application you can see only items for valid helpset(s).

>*Is there a way to program where the Favorites file is stored?
>
No it isn't.

-Richard

>It might be nice to be able to have it saved in the userdir setup by the application.
>
>-Patrick
>
>********************************************************************************
>
>You may leave the list at any time by sending message with no subject and
>"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
>are available at http://archives.java.sun.com/archives/javahelp-interest.html.
>Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
>
>
>

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Anonymous

I tried a few experiments and am very confused about the intended behavior of favorites. I assumed that the favorites would persist across sessions and that each session would show the favorites saved for the current helpset.

I used the JHLauncher class in the demos source code for my experiments. I unjarred and modified the .hs files for the animals and the apidoc helpsets to include Favorites views as follows:


Favorites

javax.help.FavoritesView

Experiment 1: Start JHLauncher, open Animals.hs. Select Invertibrates and click on Favorites button. Restart JHLauncher and open Animals.hs. Select Vertibrates and click Favorites. Both topics show in the Favorites list. Restart JHLauncher and open Animals.hs. ONLY Vertibrates SHOWS IN THE FAVORITES LIST.

Experiment 2: Start JHLauncher, open api.hs. Nothing appears in favorites list (as expected). Select 2 topics and add to favorites list. Restart & open api.hs. Select a different topic and click Favorites. Topic not added to list and get the following error message in the output:

cannot create URL for

I try a different topic. I don't get the error message, but it doesn't get added to the favorites list either.

I am using javahelp-2_0_01

Richard Gregor

Hi,
it looks like a bug. Please, file an issue with example.

Richard.

java-help@JAVADESKTOP.ORG wrote:

>I tried a few experiments and am very confused about the intended behavior of favorites. I assumed that the favorites would persist across sessions and that each session would show the favorites saved for the current helpset.
>
>I used the JHLauncher class in the demos source code for my experiments. I unjarred and modified the .hs files for the animals and the apidoc helpsets to include Favorites views as follows:
>
>
>Favorites
>
>javax.help.FavoritesView
>

>
>
>
>Experiment 1: Start JHLauncher, open Animals.hs. Select Invertibrates and click on Favorites button. Restart JHLauncher and open Animals.hs. Select Vertibrates and click Favorites. Both topics show in the Favorites list. Restart JHLauncher and open Animals.hs. ONLY Vertibrates SHOWS IN THE FAVORITES LIST.
>
>Experiment 2: Start JHLauncher, open api.hs. Nothing appears in favorites list (as expected). Select 2 topics and add to favorites list. Restart & open api.hs. Select a different topic and click Favorites. Topic not added to list and get the following error message in the output:
>
>cannot create URL for
>
>I try a different topic. I don't get the error message, but it doesn't get added to the favorites list either.
>
>I am using javahelp-2_0_01
>
>********************************************************************************
>
>You may leave the list at any time by sending message with no subject and
>"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
>are available at http://archives.java.sun.com/archives/javahelp-interest.html.
>Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
>
>
>

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

pkeegan
Offline
Joined: 2005-06-10

I did some more checking on the bug. I can reproduce it with the Metal L&F, but it doesn't show up with the Windows L&F.

Also, I tried creating a thread dump, but nothing appeared on the console. Perhaps it's just because the JH viewer is the only thing that froze.

-Patrick