[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem calling scheme code from C++
From: |
Han-Wen Nienhuys |
Subject: |
Re: Problem calling scheme code from C++ |
Date: |
Thu, 21 Aug 2008 00:11:09 -0300 |
On Wed, Aug 20, 2008 at 6:10 PM, Reinhold Kainhofer
<address@hidden> wrote:
>> > I'm having serious problems calling a scheme function from C++ code. In
>> > particular:
>> >
>> > In Stem::flag (Grob *me), I have (stripped-down):
>> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> > SCM flag_style_scm = me->get_property ("flag-style");
>>
>> This invokes the function you defined under the hood.
>
> Okay, so what's the solution? Setting flag-style to #'test-flag does not work
> either, of course.
>
> Also, I don't understand the problem: Apparently the function body is NOT
> evaluated when get_property is called, because the (display ...) shows the
> grob argument passed in the scm_call_2, but not the number passed in that
> same call...
> Also, if I comment out the scm_call_2, I don't get any error at all.
> And third, even if I set flag-style to (lambda (grob log) ....), I get exactly
> the same errors, but the lambda is definitely not evaluated any further when
> get_property is called, is it?
>
> I just fail to see how my situation is different from e.g. the autoBeamCheck
> (lily/auto-beam-engraver.cc):
get_property is overloaded; Grob::get_property works different from
Context::get_property.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen