Content-type: text/html; charset=UTF-8
Fx:Init Fx_Menubar Fx_Frame Fx_Entry
For example, suppose you have the following Schema.
# Sample MyRelation/Schema file a ( b c d )*
An Fx toolkit program for this Schema might look like:
#!/usr/local/qddb/bin/qwish -f lappend auto_path $qddb_library/fx $blt_library set s [qddb_schema open MyRelation] # You *must* call Fx:Init $s to initialize Fx Fx:Init $s Fx_Menubar menubar -w .mb -schema $s -array gv_attr set search_entry [menubar SearchForEntry] # define all the instances and how they are viewed. # -setschema should be set on the first # call to Fx_Entry and Fx_Frame Fx_Frame a -w .a -setschema $s -attr a -side top \ -anchor nw -relief raised Fx_Entry a.b -w .a.b -searchfor_entry $search_entry -attr a.b \ -relief sunken -bd 3 -side left -setschema $s # configure the Fx_Frame's focus (for adding new entries) a configure -focus [a.b GetEntry] Fx_Entry a.c -w .a.c -attr a.c -relief sunken -bd 3 -side left pack .a.b -side left -expand on -fill x pack .a.c -side left -expand on -fill x # Note that a.d doesn't have to be in the same physical frame as # its siblings in the Schema. Fx_Entry d -w .d -attr a.d -relief sunken -bd 3 -side left pack .d -side bottom -expand on -fill x # Link up the frames and entries with the menubar menubar configure -instances [Fx_Entry::GetInstances] \ -frames [Fx_Frame::GetInstances] # Go to Search Mode to start menubar SearchModeProc Fx:InitConfigure ;# sets up window position management
A Guide to QDDB Eric H. Herrin II and Raphael A. Finkel Qddb User's Guide An ASCII Database for Fast Queries of Relatively Stable Data Eric H. Herrin II and Raphael A. Finkel Computing Systems, Volume 4 Number 2 University of California Press, Berkeley CA Schema and Tuple Trees: An Intuitive Structure for Representing Relational Data Eric H. Herrin, II and Raphael A. Finkel Computing Systems, Volume 9, Number 2 MIT Press, Cambridge MA TCL and the TK Toolkit John K. Ousterhout Addison-Wesley, 1994 ISBN 0-201-63337-X