[jsmenu-codedev] Changelog 2001-12-10, parts I & II
Status: Inactive
Brought to you by:
nettrom
From: Morten W. <war...@on...> - 2001-12-10 22:05:56
|
mostly fixes to make menu building a lot easier, removing the need to know what item index in the items[] array you need and also the need for "new MTMenuItem()". the menu building update is currently undocumented, for an example of how the new structure looks, see <URL: http://groups.yahoo.com/group/tree_menu/message/942 > 2001-12-10 (part II): - added MTMTrackedCookie as a global variable. would cause a problem if cookies were turned off since there's an if(MTMTrackedCookie), browsers would throw an error since the variable doesn't exist. 2001-12-10: - added function MTMakeLastSubmenu() and created this as a method named "makeLastSubmenu", part of the MTMenuItem() object. - added method makeSubmenu, part of the MTMenuItem() object. no need to name the methods the same as the function when they're part of an object. foo.makeSubmenu() is much easier to read and work with than foo.MTMakeSubmenu(). - added a test to MTMAddItem() converting the first argument to a string. if it's an object we add it as usual, if not we create a new MTMenuItem() object. this makes menu creation even easier since users can now say menu.MTMAddItem("foo"); instead of having to create the new MTMenuItem(). - added method addItem, part of the MTMenu() object. again no need to name the methods the same as the function, addItem() is easier to read than MTMAddItem(). the function name stays the same to be unique though. Morten! -- "...a liquid which was almost, but not quite, entirely unlike tea." My opinions are not necessarily those of my provider, not necessarily mine, and probably not necessary. |