This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bad define placement error


> 
> Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> writes:
> 
> > Unfortunately, proc can only be used at top-level.
> 

It appears that the following modification of the definition of `proc'
in tcltk.scm solves the problem when all calls to `proc' are at the
top of a body:

;(defmacro-public proc (name . spec)
;  `(begin
;     (define ,name (tcl-lambda ,@ spec))
;     (tcl-create-command the-interpreter ',name ,name)))
(defmacro-public proc (name . spec)
  `(define ,name (let ((p (tcl-lambda ,@ spec)))
                   (tcl-create-command the-interpreter ',name p)
                   p)))

(but there is still a lot of code that I will need to rewrite in order
to move all calls to `proc' up to the top)

> I'd like to add that the guile-tcltk library isn't under active
> maintainership right now.  The efforts which we can spare will be
> directed towards GTk.
> 

Well, the Tk interface was probably the strongest part of Guile in the
beginning... I mean, from a user's perspective. I cannot afford to
rewrite in GTk what I have already written in Tk. I hope someone will
save this package.

Aleks

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]