From: Denis Balencourt
Subject: input from editable-text widget returned with boring "
Date:
Message-ID: <3423FB63.19C0@resu1.ulb.ac.be>
Hi,
I'm using Allegro CL for Windows
char > indicates the CLOS' prompt.
I'm building a GUI,
I have a problem with an editable-text widget used for user input.
folowing function returns widget-value + " "
>(setf classname(dialog-item-value (widget :widget-name :window-name)))
> "widget-value"
So widget-value is not a symbol and can not be traited by the following
function
>(find-class classname)
>;; Error: Argument "widget-value" was not a symbol in FIND-CLASS
May i use an another function or an another widget type ?
Thanks,
Denis Balencourt
Universite Libre de Bruxelles.
From: Barry Margolin
Subject: Re: input from editable-text widget returned with boring "
Date:
Message-ID: <6014tk$a44@pasilla.bbnplanet.com>
In article <·············@resu1.ulb.ac.be>,
Denis Balencourt <·······@resu1.ulb.ac.be> wrote:
>I'm building a GUI,
>I have a problem with an editable-text widget used for user input.
>
>folowing function returns widget-value + " "
No, it returns a string. Quotes are part of how strings are printed,
they're not part of the string itself.
>>(setf classname(dialog-item-value (widget :widget-name :window-name)))
>> "widget-value"
>
>So widget-value is not a symbol and can not be traited by the following
>function
>
>>(find-class classname)
>>;; Error: Argument "widget-value" was not a symbol in FIND-CLASS
>
>May i use an another function or an another widget type ?
I'm not familiar with the GUI library you're using; it may have a widget
type that accepts the printed representation of Lisp objects or Lisp
symbols.
If not, you can use READ-FROM-STRING to convert the input to the
corresponding Lisp object. Or you could use
(setf classname
(intern (string-upcase (dialog-item-value ...))))
--
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
Support the anti-spam movement; see <http://www.cauce.org/>
Please don't send technical questions directly to me, post them to newsgroups.
In article <··········@pasilla.bbnplanet.com>, Barry Margolin
<······@bbnplanet.com> wrote:
> In article <·············@resu1.ulb.ac.be>,
> Denis Balencourt <·······@resu1.ulb.ac.be> wrote:
> >I'm building a GUI,
> >I have a problem with an editable-text widget used for user input.
> >
> >folowing function returns widget-value + " "
>
> No, it returns a string. Quotes are part of how strings are printed,
> they're not part of the string itself.
>
> >>(setf classname(dialog-item-value (widget :widget-name :window-name)))
> >> "widget-value"
> >
> >So widget-value is not a symbol and can not be traited by the following
> >function
> >
> >>(find-class classname)
> >>;; Error: Argument "widget-value" was not a symbol in FIND-CLASS
> >
> >May i use an another function or an another widget type ?
>
> I'm not familiar with the GUI library you're using; it may have a widget
> type that accepts the printed representation of Lisp objects or Lisp
> symbols.
>
In ACL/W 3.0 and later: try using the dialog "lisp-text" or
"multi-line-lisp-text".
The lisp object is represented like using prin1 and the value is stored
like using read-from-string.
- stefan
--
University of Wuerzburg, GERMANY
·····@informatik.uni-wuerzburg.de