With respect to the now well established 2.x versions there are only few changes visible to the average user. However, the architecture and configuration have ben dramatically changed. Most 2.x versions ported without any problems. Please report any problems if they occur.
Due to the transition to Tcl/Tk (7.4/4.0 and beyond) a number of changes were needed. GIF and pixmap support has changed, see the hush FAQ for more information. Also, some changes with respect to event handling and session startup were made. Also some new data types are offered, including list(4), iter(4), string(4), dictionary(4).
Most changes are be backward compatible, and do not require any changes to your code. An exception is the use of "action", which was considered to be a misleading name by many hush users. As a result the kit::action() member function is renamed to kit::bind(), and the class action is renamed to class binding.
However, the most important change is the new automatic garbage collection policy for widgets: All widgets will be DELETED AUTOMATICALLY by their parent widget. To anticipate the installation of the new version, you are advised to remove all delete statements which are used to delete widgets (except for top level widgets).
Other improvements:
- hush compiles with g++ -Wall flag to facilitate debugging handler::_register function for implicit garbage collection Known bugs in <hush/list.h> and <hush/dictionary> fixed kit::eval(cmd) generates error messages if cmd evaluates to false Many memory leaks fixed Automatic administration of creation/deletion of hush objects
Below, you'll find a list of changes wrt. the 1.x versions of hush.
'<-' means 'replaces'
In all classes containing an installhandler(...) member function:
bind(...) <- installhandler(...)
void session::prelude() <- void session::prelude(kit,int,char**)
int session::main() <- void session::main(kit,int,char**)
The class action has been renamed into binding. Also the functions action and _bind have been eliminated from the kit.
binding* bind(..) <- class action* action(...)In other words use bind to obtain a binding.
The dispatch function of handler has been modified to allow for other kinds of events, in addition to Tcl and X events.
int handler::dispatch(event*) <- int handler::dispatch(kit*,int,char**)This means that argc and argv are no longer available as instance variables. Instead write
int argc = _event->argc(); char** argv = _event->argv();to access the argc/argv pair associated with a Tcl event. See also string(4).
void widget::alias(widget*)The alias method is added to allow for the definition of compund widgets. See examples:hush/meta.c. and examples:drawtool/drawtool.h.
Usage:
widget* root = frame(path());create outer widget
widget* c = new whatever(root,".c",options);inner widget
c->pack();pack inner widget
redirect( c );redirect to inner component
alias( this );alias this !
Apart from the api/hush/ and api/widgets/ directories, there is alos the ap/dv/ directory which contains (at the moment) all Tcl/Tk related stuff.
There is a problem with items. It seems that the bind function for items does not work correctly.
|
Hush Online Technology
hush@cs.vu.nl
09/24/99 |
|
|