
+<snit-wjduquette.com.lists.wjduquette.com>                                     
List-Unsubscribe:                                                               
+<http://lists.wjduquette.com/listinfo.cgi/snit-wjduquette.com>,                
                                                                                
+<mailto:snit-wjduquette.com-request@lists.wjduquette.com?subject=unsubscribe>  
List-Archive: <http://lists.wjduquette.com/private.cgi/snit-wjduquette.com/>    
Date: Fri, 17 Jan 2003 16:54:05 -0800                                           
    
########################################################################
## Nouvelle fonctionnalité de snit::widget)    
                                                                                
At 03:49 PM 1/17/2003 -0600, David S. Cargo wrote:                              
>It looks like the jump between snit::widget and snit::widgetadaptor is         
>not too bad, but could you include an example of the new snit::widget          
>usage?                                                                         
>                                                                               
>escargo                                                                        
                                                                                
I'll have that in the updated documentation, of course. I'm splitting the       
man page up into two pieces.  The first is the man page proper;  it will be     
purely reference, with everything you absolutely need to know in one place      
with little discussion.  The second will be a FAQ list; it will discuss all     
of the features in great detail, with examples of how to use them and how       
to do a variety of things.                                                      
                                                                                
But anyway, here's a contrived example of using a snit::widget in V0.8a:        
                                                                                snit::widget labelAndButton {                                                   
    option -buttontext "Push Me"                                                
    option -labeltext "Push the Button"                                         
                                                                                
    delegate option -buttontext to mybutton -text                               
    delegate option -labeltext to mylabel -text                                 
                                                                                
    constructor {args} {                                                        
        component mylabel is [label $win.label]                                 
        component mybutton is [button $win.button]                              
        $self configurelist $args                                               
        pack $win.label                                                         
        pack $win.button                                                        
    }                                                                           
}                                                                               
                                                                                
This example doesn't do much, but it does point out that there's no need to     
define a hull component for a snit::widget; it's already done, and it's a       
Tk frame.                                                                       
                                                                                
Will                                                                            
########################################################################
