[rdnzl-devel] RE: rdnzl-devel Digest, Vol 1, Issue 5

Francisco Rivera jfrivera56 at hotmail.com
Fri Dec 24 16:59:49 UTC 2004


> That was an oversight of mine, sorry.  I forgot to specify an external
> format in port-lw.lisp.  Please try the 0.4.4 release which should fix
> this.

Thanks very much, now is working fine.


> At least two things need to be fixed in the code above:
>
> 1. You forgot to import the type "System.EventHandler" which you need.
>    That's actually the cause for the error message - you should have
>    checked the backtrace.  Add these two lines:
>
>     (import-type "System.EventHandler") 
>     (use-namespace "System")

I was using

(import-types "System" "EventHandler")
(use-namespace "System")

but then the program cannot be compiled. The error was:

Warning: Returning NULL object from .NET call
Error: Type with name "System.EventHandler" not found in assembly "System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
  1 (abort) Return to level 0.
  2 Return to top loop level 0.


Merry Christmas.


Regards

Francisco Rivera
jfrivera56 at hotmail.com


-----Original Message-----
From: rdnzl-devel-bounces at common-lisp.net
[mailto:rdnzl-devel-bounces at common-lisp.net] On Behalf Of
rdnzl-devel-request at common-lisp.net
Sent: Friday, December 24, 2004 5:02 AM
To: rdnzl-devel at common-lisp.net
Subject: rdnzl-devel Digest, Vol 1, Issue 5

Send rdnzl-devel mailing list submissions to
	rdnzl-devel at common-lisp.net

To subscribe or unsubscribe via the World Wide Web, visit
	http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-devel
or, via email, send a message with subject or body 'help' to
	rdnzl-devel-request at common-lisp.net

You can reach the person managing the list at
	rdnzl-devel-owner at common-lisp.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of rdnzl-devel digest..."


Today's Topics:

   1. Version 0.4.3 (sorry...) (Edi Weitz)
   2. Version 0.4.4 (Christmas release) (Edi Weitz)
   3. Re: RDNZL (Edi Weitz)


----------------------------------------------------------------------

Message: 1
Date: Thu, 23 Dec 2004 13:37:47 +0100
From: Edi Weitz <edi at agharta.de>
Subject: [rdnzl-devel] Version 0.4.3 (sorry...)
To: rdnzl-devel at common-lisp.net, rdnzl-announce at common-lisp.net
Message-ID: <u3bxxyyuc.fsf at agharta.de>
Content-Type: text/plain; charset=us-ascii

Changelog:

  Version 0.4.3
  2004-12-23
  Argh!!! Version 0.4.2 included a defective DLL due to a typo

Download:

  <http://weitz.de/files/RDNZL.tar.gz>
  <http://weitz.de/files/RDNZL_cpp.tar.gz>

Edi.



------------------------------

Message: 2
Date: Fri, 24 Dec 2004 01:57:04 +0100
From: Edi Weitz <edi at agharta.de>
Subject: [rdnzl-devel] Version 0.4.4 (Christmas release)
To: rdnzl-devel at common-lisp.net, rdnzl-announce at common-lisp.net
Message-ID: <u652ssecf.fsf at agharta.de>
Content-Type: text/plain; charset=us-ascii

ChangeLog:

  Version 0.4.4
  2004-12-24
  Added correct external encoding to :EF-WC-STRING type in port-lw.lisp
(caught by Francisco Rivera)
  Changed some code examples from LW to AllegroCL

Download:

  <http://weitz.de/files/RDNZL.tar.gz>

Cheers,
Edi.



------------------------------

Message: 3
Date: Fri, 24 Dec 2004 02:05:17 +0100
From: Edi Weitz <edi at agharta.de>
Subject: [rdnzl-devel] Re: RDNZL
To: "Francisco Rivera" <jfrivera56 at hotmail.com>
Cc: rdnzl-devel at common-lisp.net
Message-ID: <uwtv8qzea.fsf at agharta.de>
Content-Type: text/plain; charset=iso-8859-1

Hi!

Please use the mailing list for bug reports and questions. Thanks.

On Thu, 23 Dec 2004 16:06:22 -0600, "Francisco Rivera"
<jfrivera56 at hotmail.com> wrote:

> I have 2 problems:
>
> 1) with
>
> (defun message-box (text &optional (caption "Message"))
>   [Equals [MessageBox.Show text caption  [$MessageBoxButtons.OKCancel]]
>           [$DialogResult.OK]])
>
> the following problems appears when I use Spanish characters:
>
> (message-box "botón")
>
> Error: External format FLI:ASCII-WCHAR got error writing #<Pointer to type
> FLI::WCHAR-T = #x008B0258> at position 2: Non-ASCII character #\ó.

That was an oversight of mine, sorry.  I forgot to specify an external
format in port-lw.lisp.  Please try the 0.4.4 release which should fix
this.

> 2) How I can create a push button event (Click)?
>
> The following is not working:
>
> (use-package :rdnzl)
>
> (enable-rdnzl-syntax)
>
> (import-types "System.Windows.Forms"
>               "Application" "DockStyle" "Form" 
>               "KeyPressEventHandler" 
>               "MessageBox" "MessageBoxButtons" "DialogResult" 
>               "TextBox" "Button" "Label")
>
> (import-types "System.Drawing" "Point")
> (use-namespace "System.Windows.Forms")
> (use-namespace "System.Drawing")
>
> (let ()
>   (defun clicked ()
>     (message-box "Boton presionado")))
>
> (defun make-control (tipo &optional (x 0) (y 0) (texto ""))
>   (let ((ctl (new tipo))
>         (pto (new "Point")))
>     (setf (property pto "X") x
>           (property pto "Y") y
>           (property ctl "Location") pto
>           (property ctl "Text") texto)
>     ctl))
>  
> (defun calculator ()
>   (let ((forma (new "Form"))
>         (tb1 (make-control "TextBox" 0 0))
>         (tb2 (make-control "TextBox" 100 0))
>         (etiq (make-control "Label" 0 75))
>         (boton (make-control "Button" 0 25 "ADD")))
>     (setf (property forma "Text") "Lisp.Net Calculator")
>     (invoke (property forma "Controls") "Add" boton)
>     (invoke (property forma "Controls") "Add" tb1)
>     (invoke (property forma "Controls") "Add" tb2)
>     (invoke (property forma "Controls") "Add" etiq)
>     [+Click boton (new "EventHandler" #'clicked)]
>     [Application.Run forma]
>     forma))
>
>> (calculator)
>
> Error: Trying to call function RDNZL::%INVOKE-CONSTRUCTOR with NULL object
> #<RDNZL::CONTAINER NULL #xBC4810>.

At least two things need to be fixed in the code above:

1. You forgot to import the type "System.EventHandler" which you need.
   That's actually the cause for the error message - you should have
   checked the backtrace.  Add these two lines:

     (import-type "System.EventHandler") 
     (use-namespace "System")

2. CLICKED has the wrong signature.  It'll get two arguments like any
   event handler and you have to specify them:

     (defun CLICKED (object event)
       ...

   Of course, you can IGNORE them if you want.

I hope that'll bring you on the right track.  Let me know if you still
have problems.

Cheers,
Edi.



------------------------------

_______________________________________________
rdnzl-devel mailing list
rdnzl-devel at common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/rdnzl-devel


End of rdnzl-devel Digest, Vol 1, Issue 5
*****************************************



More information about the rdnzl-devel mailing list