developer
Junior Member
Posts: 5
Registered: 9/30/2004
Member Is Offline
|
| posted on 10/1/2004 at 03:49 PM |
|
|
TMenu_path_to_files relativity
Just a heads-up for those who redefine TMenu_path_to_files...
If you redefine this to use menus in subdirectories (as I do), then be careful of the following:
1. in menu.js, you will probably be commenting out or deleting TMenu_path_to_files and redefining it from where you call menu().
In earlier Tigra Gold versions that I've worked with, TMenu_path_to_files is declared by itself with a semicolon. In the optimized version I
have, the 'var' token is used once for TMenu_path_to_files, followed by a comma and then the balance of code.
This is perfectly legal, but if you're not aware of it, you might break your code after a script upgrade.
If you comment out TMenu_path_to_files, be sure that the var token is preserved in proper syntax for the balance of the code.
Before:
var TMenu_path_to_files = 'menu_files/',
menus=[],
After (won't work):
//var TMenu_path_to_files = 'menu_files/',
menus=[],
Proper (comment out or delete entry):
//var TMenu_path_to_files = 'menu_files/',
var menus=[],
2. You will probably be declaring the new TMenu_path_to_files variable in the file where you call menu(). Be sure that it's declared before (aka
above) anything that has to do with the Tigra package.
I've used Tigra for a long time. This is a powerful, ingenious and downright slick package.
Javascript syntax, as with all languages, is specific, unforgiving, and often difficult to debug. Keep this in mind when you're coding.
|
|
|
|