My own html-help menu succeeds in GiD11, but fails in GiD16.

Moderator: GiD Team

Post Reply
Hemmi
Posts: 31
Joined: Fri Nov 20, 2015 6:05 am
Location: Chiba prefecture, Japan

My own html-help menu succeeds in GiD11, but fails in GiD16.

Post by Hemmi »

I wanted to add my own html help menu.
In the GiD menu screen, if I select the problemtype I created and go to the new MyMenu menu, TestingMyHelpMenu, it succeeds in GiD11, but fails in GiD16.
I would like to know how to modify the file testingMyHelpMenu.tcl so that it succeeds in both versions of GiD.

In the attachment, the testing GiD problem type testingMyHelpMenu.gid and the figure are included.
Attachments
testingMyHelpMenu.gid.zip
my testing problem type
(6.07 KiB) Downloaded 60 times
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: My own html-help menu succeeds in GiD11, but fails in GiD16.

Post by escolano »

It seems that the main problem is related to the special name 'index.html' (GiD 16 try to fill the tree with this index.html)
If do you rename it to other name like 'hello.html' works as you expect in both versions, 11 and 13

I attach my copy
testingMyHelpMenu.gid.zip
(5.37 KiB) Downloaded 64 times
I have modified the file foo.gif used as problemtype icon (rewritten with gimp), because GiD 11.0.8 was complaining about it. If fact we are not using GIF image files in GiD since a lot of years ago. We were using PNG that has more features like allow transparency. In fact in GiD 16 we have re-created all our icons as SVG vectorial format, to allow scale them gracefully to different sizes (current screens have bigger resolution)

And for the menu instead try to use help16x16.gif change it by the name help.png (that exists in GiD 11 and in GiD 16 try to find a help.svg if exists or otherwise thy to use help.png)

If do your really need to write different code to allow different versions of GiD can do something like
if [GidUtils::VersionSatisfy $MinimumOfficialVersion $MinimumDeveloperVersion } {
#do something if is loaded in a GiD version more modern than $MinimumOfficialVersion if is an official or $MinimumDeveloperVersion if is a developer
} else {
#do old code if loading in older GiD versions...
}
Post Reply