Question: Simple things in Allegro 
Author Message
 Question: Simple things in Allegro

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,

Kroly

______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.*-*-*.com/



Mon, 12 Jul 2004 00:42:04 GMT  
 Question: Simple things in Allegro

Quote:

> 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?

Quote:
> 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.

Quote:
> Furthermore, I'd like to know how to print on the debug window

You might try to print to *debug-stream*.

Quote:
> 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.



Mon, 12 Jul 2004 02:26:52 GMT  
 Question: Simple things in Allegro
Thank you for your helpful anwser.

Kroly


Quote:

> > 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


Mon, 12 Jul 2004 03:27:43 GMT  
 Question: Simple things in Allegro

Quote:

> 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


Mon, 12 Jul 2004 03:29:51 GMT  
 Question: Simple things in Allegro


Quote:

> > 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.

Kroly

______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net



Mon, 12 Jul 2004 03:41:18 GMT  
 Question: Simple things in Allegro

Quote:
> 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...



Tue, 13 Jul 2004 22:41:23 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Question in french (a simple question, very simple)

2. Could someone help with a very simple thing?

3. What should be a simple thing?

4. Simple things

5. gcc inline asm, can't do even simple things :-(

6. Doing the simplest thing with Tkinter Canvas

7. Seemingly simple problem with adding things to a canvas

8. programming -- keep things simple

9. Another simple thing from me

10. Simple thing about printing

11. Simple threading thing

12. Writing a simple linux daemon type thing...

 

 
Powered by phpBB® Forum Software