From: Ladv�nszky K�roly
Subject: Question: Simple things in Allegro
Date: 
Message-ID: <3c4ee82d_1@corp-goliath.newsgroups.com>
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

From: Janis Dzerins
Subject: Re: Question: Simple things in Allegro
Date: 
Message-ID: <a2mv9c$hg8$1@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.
From: Ladv�nszky K�roly
Subject: Re: Question: Simple things in Allegro
Date: 
Message-ID: <3c4f0efe_1@corp-goliath.newsgroups.com>
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
From: Christian Nyb�
Subject: Re: Question: Simple things in Allegro
Date: 
Message-ID: <sikk7u8euhc.fsf@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
From: Ladv�nszky K�roly
Subject: Re: Question: Simple things in Allegro
Date: 
Message-ID: <3c4f1232$1_1@corp-goliath.newsgroups.com>
"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
From: Samir Sekkat
Subject: Re: Question: Simple things in Allegro
Date: 
Message-ID: <MPG.16ba65fe577b5198989698@news.t-online.de>
> 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...