|
Release 4.0 |
 |
Description - this.helpfile
Name: | | this.helpfile this.helptopic |
Type: String
Context: All formula types
Description:
Perhaps your formula needs special information in order to use it. Or perhaps you want to explain the math behind it?
Then you can set this attribute to any string pointing to wherever you like. This can be a file on the harddisk or a URL.
If you specify that parameter then a small help icon will be shown in the parameter window of the fractal.
When the user clicks onto that small icon, the help associated with the formula will be shown.
You can specify a help topic inside that help file using the property "this.helptopic". That way only that topic
will be shown. ChaosPro correctly handles the following help file types:
- this.helpfile = "http://www.someurl-you-like.any-domain/any-path..." : By using such a direct URL ChaosPro will show the corresponding file
using the default browser associated with html files. ChaosPro will display the correct topic inside that file, which you need to specify as a
named anchor (i.e. <A NAME="formula1"></A>).
If the user clicks onto the help icon and wants to display the help associated with
the formula, then ChaosPro checks whether there is an Internet connection. If not, it informs the user that a manual internet connection needs
to be established in order to view that file.
- this.helpfile = "path to local chm-file" : You can also provide a local "*.chm" file (compiled HTML file). Helptopic lets you specify a topic, just as it is defined in the Microsoft HTML Help Workshop.
The path can either be absolut or relative, most probably you may want to provide a relative path. If you provide a relative path, then ChaosPro will search various directories in order to find the help file:
- It will search relative to the directory where your formula resides.
- It will search relative to ChaosPro\Compiler\Formulas
- It will search relative to ChaosPro\Compiler
- It will search relative to ChaosPro
As soon as ChaosPro finds the file, it uses and displays it.
- this.helpfile = "path to local hlp-file" : You can provide a local "*.hlp" file (WinHelp file).
Helptopic lets you specify a topic ID (i.e. the topic number) inside that file.
The path can either be absolut or relative, most probably you may want to provide a relative path.
If you provide a relative path, then ChaosPro will search various directories in order to find the help file:
- It will search relative to the directory where your formula resides.
- It will search relative to ChaosPro\Compiler\Formulas
- It will search relative to ChaosPro\Compiler
- It will search relative to ChaosPro
As soon as ChaosPro finds the file, it uses and displays it.
- this.helpfile = "path to local htm-file" : And of course you can provide a local htm file.
ChaosPro will display the correct topic inside that file, which you need to specify as a
named anchor (i.e. <A NAME="formula1"></A>)
The path can either be absolut or relative, most probably you may want to provide a relative path.
If you provide a relative path, then ChaosPro will search various directories in order to find the help file:
- It will search relative to the directory where your formula resides.
- It will search relative to ChaosPro\Compiler\Formulas
- It will search relative to ChaosPro\Compiler
- It will search relative to ChaosPro
As soon as ChaosPro finds the file, it uses and displays it using the default browser associated with html files.
The default is "formula.html".
So there are various possibilities for you to provide help for your formulas. But most probably you may want to do
a mix of all:
You may want the users to download your formulas and your help file. But what happens if you update your help file?
Users do not get the actual help file, because they have it stored locally.
Due to that ChaosPro allows you to specify the property this.helpfile="..."; and this.helptopic="..."; several
times in order to provide more locations.
ChaosPro tries to display the help file starting with the first helpfile location provided. If that fails it moves on to the
next possible helpfile location. So you can specify the first help file location as a URL to a file on your homepage.
After that you can specify relative paths, so if the user does not have an Internet connection and does not want to establish
one, then the local help files get displayed.
Example:
void description(void)
{
this.helpfile="http://www.mypage.com/fractals/dummy/etc/g_9807.html";
this.helptopic="mpf_cubic";
// If that fails, try to locate my chm file locally...
this.helpfile="mpf.chm";
this.helptopic="mpf_cubic";
// If that again fails, perhaps he has the HTML-version?
this.helpfile="mpf/mpf_cubic.html";
}
void description(void)
{
// an absolute path to a hlp file and no topic. Perhaps a bad idea...
this.helpfile="c:\fractals\formulas\g2009.hlp";
}
|