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

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

Re: Translation of 0/NULL in scheme?


From: Jan Nieuwenhuizen
Subject: Re: Translation of 0/NULL in scheme?
Date: Thu, 01 Jul 2004 14:55:41 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Andreas Rottmann writes:

> Probably in the .defs file, the (null-ok) option is missing for those
> arguments.

Yes, thanks.  I've added those, (should be in repository already):

    (define-method popup
      (of-object "GtkMenu")
      (c-name "gtk_menu_popup")
      (return-type "none")
      (parameters
        '("GtkWidget*" "parent_menu_shell" (null-ok))
        '("GtkWidget*" "parent_menu_item" (null-ok))
        '("GtkMenuPositionFunc" "func")
        '("gpointer" "data")
        '("guint" "button")
        '("guint32" "activate_time")
      )
    )


> The wrappers will only accept #f for NULL if that option is present.

Unfortunately, in this case it does not work for me yet?

    ugh.scm:

    #! /usr/bin/guile -s
    !#

    (debug-enable 'debug)
    (debug-enable 'backtrace)

    (use-modules (srfi srfi-2)
                 (gnome gtk)
                 (gnome gtk gdk-event)
                 (gnome gw wnck))

    (popup (make <gtk-menu>)
           #f #f
           (lambda (x) (write "pos callback\n"))
           #f
           0 0)

    $ ./ugh.scm
    (gnome gtk): [glib gobject atk pango gdk gtk support]
    Backtrace:
    In unknown file:
       ?: 0* [popup #<<gtk-menu> 40ca9750> #f #f #<procedure #f (x)> #f 0 0]
       ?: 1  [#<gw:dynproc gtk-menu-popup (7)> #<<gtk-menu> 40ca9750> #f ...]

    <unnamed port>: In procedure gtk-menu-popup in expression (#<gw:dynproc 
gtk-menu-popup (7)> arg1 arg2 ...):
    <unnamed port>: Wrong type argument in position 2: #f

Any ideas?
Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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