This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (gnome gtk) et al


Kevin Ryde <user42@zip.com.au> writes:

> Andreas Rottmann <a.rottmann@gmx.at> writes:
>>
>> (let ((error '(#f #f #f)))
>
> I'd thought it might be worth having GError as a distinct type, for
> stricter checking etc.
>
Well, I don't know if that's worth it or even feasible; GError is
quite special in that you don't pass a GError object (i.e. GError*) to
the functions, but an GError** - I don't know how how to sanely wrap
that semantics with a g-wrap WCT...

>>   (if (not (g-io-channel-new-file "/ENOENT" "r" error))
>
> Calls would no doubt accept #f to mean NULL at the C level.
>
Yes, it seems I've overlooked that. I'll re-submit my pach as soon
we've got an CVS repository...

>>       (if (= (g-file-error-quark) (car error))
>
> As a separate type it'd be "g-error-code" or whatever instead of car.
> More long winded, but would maximize clarity.
>
>>           (format #t "file error (~S) opening /ENOENT: ~S\n" 
>
I thought about defining g-error-{domain,code,message} as
{car,cadr,caddr} in glib.scm, respectivly.

> Speaking of formatting, I suppose having g-set-error and friends take
> printf style format strings would most closely match native glib.  But
> it'd probably require a more or less complete re-implementation of
> printf taking scm arguments.  Maybe someone has such a thing kicking
> around already.
>
I don't see the need for this, really. We have (format #t ...) on the
scheme level, so why not use that...

Regards, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]