Evaluating the trial version of Allegro, I can't overcome the following
simple problem. I have a form with a button and a editable-text control.
On pushing the button, I'd like to update the value of the edit control.
What's the correct way to do it?
The following doesn't work, I have no idea what's wrong.
(defun form1-button1-on-change (widget new-value old-value)
(declare (ignore-if-unused widget new-value old-value))
(setf (slot-value (find-widget :editable-text-1 (parent widget)) 'value)
"Hello") t)
Furthermore, I'd like to know how to print on the debug window and where
'print' prints?
Thanks for any help,
K�roly
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
"Ladv�nszky K�roly" <··@bb.cc> writes:
> Evaluating the trial version of Allegro, I can't overcome the following
> simple problem. I have a form with a button and a editable-text control.
> On pushing the button, I'd like to update the value of the edit control.
> What's the correct way to do it?
Is it not described in tutorial or examples?
> The following doesn't work, I have no idea what's wrong.
>
> (defun form1-button1-on-change (widget new-value old-value)
> (declare (ignore-if-unused widget new-value old-value))
> (setf (slot-value (find-widget :editable-text-1 (parent widget)) 'value)
> "Hello") t)
Me too.
> Furthermore, I'd like to know how to print on the debug window
You might try to print to *debug-stream*.
> and where 'print' prints?
It prints to *standard-output*. See HypeSpec for deitails (or ACL's
conversion of the ANSI standard).
- - - - -
A question to someone who knows ACL -- what is the purpose of
IGNORE-IF-UNUSED declaration and how does it differ from IGNORALBLE?
--
Janis Dzerins
Eat shit -- billions of flies can't be wrong.
Thank you for your helpful anwser.
K�roly
"Janis Dzerins" <·····@latnet.lv> wrote in message
·················@milzis.latnet.lv...
> "Ladv�nszky K�roly" <··@bb.cc> writes:
>
> > Evaluating the trial version of Allegro, I can't overcome the following
> > simple problem. I have a form with a button and a editable-text control.
> > On pushing the button, I'd like to update the value of the edit
control.
> > What's the correct way to do it?
>
> Is it not described in tutorial or examples?
>
> > The following doesn't work, I have no idea what's wrong.
> >
> > (defun form1-button1-on-change (widget new-value old-value)
> > (declare (ignore-if-unused widget new-value old-value))
> > (setf (slot-value (find-widget :editable-text-1 (parent widget))
'value)
> > "Hello") t)
>
> Me too.
>
> > Furthermore, I'd like to know how to print on the debug window
>
> You might try to print to *debug-stream*.
>
> > and where 'print' prints?
>
> It prints to *standard-output*. See HypeSpec for deitails (or ACL's
> conversion of the ANSI standard).
>
> - - - - -
>
> A question to someone who knows ACL -- what is the purpose of
> IGNORE-IF-UNUSED declaration and how does it differ from IGNORALBLE?
>
> --
> Janis Dzerins
>
> Eat shit -- billions of flies can't be wrong.
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
"Ladv�nszky K�roly" <··@bb.cc> writes:
> Evaluating the trial version of Allegro, I can't overcome the following
> simple problem. I have a form with a button and a editable-text control.
> On pushing the button, I'd like to update the value of the edit control.
> What's the correct way to do it?
> The following doesn't work, I have no idea what's wrong.
>
> (defun form1-button1-on-change (widget new-value old-value)
> (declare (ignore-if-unused widget new-value old-value))
> (setf (slot-value (find-widget :editable-text-1 (parent widget)) 'value)
> "Hello") t)
How come you bind the function name form1-button1-on-change when you
want something to happen when you _click_ the button? Wouldn't
form1-button1-on-click be better?
--
chr
"Christian Nyb�" <···@sli.uio.no> wrote in message
····················@ulrik.uio.no...
> "Ladv�nszky K�roly" <··@bb.cc> writes:
>
> > Evaluating the trial version of Allegro, I can't overcome the following
> > simple problem. I have a form with a button and a editable-text control.
> > On pushing the button, I'd like to update the value of the edit
control.
> > What's the correct way to do it?
> > The following doesn't work, I have no idea what's wrong.
> >
> > (defun form1-button1-on-change (widget new-value old-value)
> > (declare (ignore-if-unused widget new-value old-value))
> > (setf (slot-value (find-widget :editable-text-1 (parent widget))
'value)
> > "Hello") t)
>
> How come you bind the function name form1-button1-on-change when you
> want something to happen when you _click_ the button? Wouldn't
> form1-button1-on-click be better?
> --
> chr
The problem is somewhere else, with form1-button1-on-click it still does
not work.
K�roly
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
> Furthermore, I'd like to know how to print on the debug window and where
> 'print' prints?
Under Windows you have a small icon in the system tray,
if you double click on it you get the console window.
This is probably where your print output goes...