guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g-wrap <gw-guile-wct> questions


From: Andy Wingo
Subject: Re: g-wrap <gw-guile-wct> questions
Date: Mon, 16 Aug 2004 21:26:04 +0100
User-agent: Mutt/1.5.6+20040803i

Hey Steve,

On Mon, 16 Aug 2004, Steve Tell wrote:

> (define-method (wrap-value-cg (wct <gw:parport*>)
>                               (value <gw-value>)
>                               status-var)
>   (let ((wct-var (slot-ref wct 'wct-var-name))
>         (sv (scm-var value))
>         (cv (var value)))
>     (list
>      "if(" cv " == NULL) scm_syserror_msg(\"wrap(gw:parport*)\", \"error 
> ~a\", SCM_EOL, errno);\n"
>      "else " sv " = gw_wcp_assimilate_ptr((void *) " cv ", " wct-var 
> ");\n")))
> 
> 
> (I'm doing the call to scm_syserror_msg wrong somehow; 

Yeah, you should be using gw:error. It's a bizarre construct, e.g.

        `(gw:error ,status-var type ,(wrapped-var value))

First the gw:error symbol, then the name of the status var, then a
symbol indicating which kind of error, then type-specific args:

;; (list 'gw:error status-var 'misc msg format-args)
;; (list 'gw:error status-var 'memory)
;; (list 'gw:error status-var 'range scm-item-out-of-range)
;; (list 'gw:error status-var 'type scm-bad-type-item)
;; (list 'gw:error status-var 'argc)

Cheers,
--
Andy Wingo <address@hidden>
http://ambient.2y.net/wingo/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]