beginner's question: what's returned by a widget creation function?

From: Paul Shannon <pshannon_at_iapetus.CV.NRAO.EDU>
Date: Mon, 13 Mar 95 17:48:01 EST

Hello all,

I am confused about the type of object returned from an STk widget
creation function. If I create my own variable, and assign to it the
value returned by the widget creation function, sometimes I can use it,
and sometimes I cannot.


For example:


(define widget
   (text '.textWidget :width 80 :height 10
                      :borderwidth 1 :relief 'sunken :setgrid #t))

;; here I can treat my variable as equivalent to the tcl-style name

(pack widget)

;; but here I have trouble: my variable does not seem to be a real function

(widget 'insert 'end (format #f "------- widget insert-----------~%"))

;; error message is "eval: bad function in : (widget..."

;; but this more traditional form *does* work
(.textWidget 'insert 'end (format #f "------- .textWidget insert-----------~%"))


Any hints for me?

Thanks.

 - Paul Shannon
   pshannon_at_nrao.edu
   National Radio Astronomy Observatory
   Charlottesville, Virginia
Received on Mon Mar 13 1995 - 23:49:32 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST