guile-user
[Top][All Lists]
Advanced

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

Re: [guile/scwm] anyone can tell me something about those messages


From: Rob Browning
Subject: Re: [guile/scwm] anyone can tell me something about those messages
Date: Fri, 13 Sep 2002 17:19:19 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-pc-linux-gnu)

P Pareit <address@hidden> writes:

> Bad hook: #<variable 4046eaf8 binding: #<hook 7 4046efb0>>, args = (#<window 
> 10485775: "address@hidden: /usr/src/scwm"> 0 0 727 377 79 23)
> ERROR: In procedure hook-empty?:
> ERROR: Wrong type argument in position 1 (expecting HOOKP): #<variable 
> 4049af78 binding: #<hook 1 4049ae78 display-string-newline-to-error-port>>
>
> The <snip>'s where inserted by me for keeping this mail short.
> Someone knows what some of the messages mean? I can understand most of them 
> but I'm not sure where to look for a solution.

I'm not positive, but my quick impression is that you're getting
variables in places where you actually want the variable values.  Some
functions return "variables" which are actually objects that *contain*
values.  So rather than

  SCM foo = scm_lookup (scm_str2symbol ("foo"));
  do_something (foo);

you probably need:

  SCM foo_var = scm_lookup (scm_str2symbol ("foo"));
  do_something (SCM_VARIABLE_REF (foo_var));

or a little more compactly:

  SCM foo_var = scm_c_lookup ("foo");
  do_something (SCM_VARIABLE_REF (foo_var));
  
and unless your app's really trivial, you should probably be more specific:

  SCM foo_var = scm_c_module_lookup (scm_c_resolve_module ("some-module"),
                                                           "foo");
  do_something (SCM_VARIABLE_REF (foo_var));

and check for lookup failures, etc...

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD




reply via email to

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