Re: how to define a boolean?

2009-08-10 Thread Marc Hohl
Carl Sorensen schrieb: On 8/10/09 1:54 AM, "Marc Hohl" wrote: Carl Sorensen schrieb: [...] The *specific* behavior you have requested can be achieved by the following: #(define myBool #f) myMusicFunc = #(define-music-function (parser location) () #{ \once \override Slur #'

Re: how to define a boolean?

2009-08-10 Thread Carl Sorensen
On 8/10/09 1:54 AM, "Marc Hohl" wrote: > Carl Sorensen schrieb: >> [...] >> >> The *specific* behavior you have requested can be achieved by the following: >> >> #(define myBool #f) >> >> myMusicFunc = >> #(define-music-function (parser location) () >>#{ >> \once \override Slur #'d

Re: how to define a boolean?

2009-08-10 Thread Marc Hohl
Carl Sorensen schrieb: [...] The *specific* behavior you have requested can be achieved by the following: #(define myBool #f) myMusicFunc = #(define-music-function (parser location) () #{ \once \override Slur #'dummyProperty = ##t #}) #(define-public (slur::boolean grob) ;; just

Re: how to define a boolean?

2009-08-09 Thread Carl Sorensen
On 8/9/09 9:12 AM, "Marc Hohl" wrote: > Carl Sorensen schrieb: >> >> So that is why the first value in the callback was #t -- it was left over >> from the last call of \myMusicFunc. Then the remaining values were #f, >> because all of the calls to \myMusicFunc had already been evaluated. >>

Re: how to define a boolean?

2009-08-09 Thread Marc Hohl
Carl Sorensen schrieb: On 8/9/09 1:20 AM, "Marc Hohl" wrote: Was there something else you were trying to do? Yes, I have to change the value of myBool within a stencil callback. Like this: \version "2.13.3" #(define myBool #f) myMusicFunc = #(define-music-function (parser loc

Re: how to define a boolean?

2009-08-09 Thread Marc Hohl
Nicolas Sceaux schrieb: Le 9 août 09 à 13:21, Marc Hohl a écrit : #(define-public (slur::boolean grob) ;; just a test function to try and switch boolean values (display "\nWithin callback\n") (display "myBool: ")(display myBool)(newline) (if myBool (set! myBool #f) (set! myBoo

Re: how to define a boolean?

2009-08-09 Thread Carl Sorensen
On 8/9/09 5:21 AM, "Marc Hohl" wrote: > Trevor Daniels schrieb: >> [...] >>> >>> >>> From what I see on the console output, the calls of \myMusicFunc >>> are evaluated first, so myBool is #t and the callbacks come in action >>> afterwards (the first slur claims #t, every other slur reads #f

Re: how to define a boolean?

2009-08-09 Thread Nicolas Sceaux
Le 9 août 09 à 13:21, Marc Hohl a écrit : #(define-public (slur::boolean grob) ;; just a test function to try and switch boolean values (display "\nWithin callback\n") (display "myBool: ")(display myBool)(newline) (if myBool (set! myBool #f) (set! myBool #t)) this can be writ

Re: how to define a boolean?

2009-08-09 Thread Carl Sorensen
On 8/9/09 1:20 AM, "Marc Hohl" wrote: >> >> Was there something else you were trying to do? >> > Yes, I have to change the value of myBool within a > stencil callback. > > Like this: > > \version "2.13.3" > > #(define myBool #f) > > myMusicFunc = > #(define-music-function (parser locati

Re: how to define a boolean?

2009-08-09 Thread Marc Hohl
Trevor Daniels schrieb: [...] From what I see on the console output, the calls of \myMusicFunc are evaluated first, so myBool is #t and the callbacks come in action afterwards (the first slur claims #t, every other slur reads #f), so apparently they don't influence each other the way I expect

Re: how to define a boolean?

2009-08-09 Thread Marc Hohl
Carl Sorensen schrieb: On 8/8/09 2:20 PM, "Marc Hohl" wrote: Carl Sorensen schrieb: [...] For the music-function you can do this: % you can also do: % mybool = ##f #(define mybool #f) Why not just change this to #(define-public mybool #f) then use mybool

Re: how to define a boolean?

2009-08-08 Thread Carl Sorensen
On 8/8/09 2:20 PM, "Marc Hohl" wrote: > Carl Sorensen schrieb: >> [...] For the music-function you can do this: % you can also do: % mybool = ##f #(define mybool #f) >> >> Why not just change this to >> >> #(define-public mybool #f) >> >> then use myboo

Re: how to define a boolean?

2009-08-08 Thread Marc Hohl
Carl Sorensen schrieb: [...] For the music-function you can do this: % you can also do: % mybool = ##f #(define mybool #f) Why not just change this to #(define-public mybool #f) then use mybool everywhere else? I tried this first, but it seems that it doesn't work inside a music

Re: how to define a boolean?

2009-08-08 Thread Marc Hohl
Mark Polesky schrieb: Marc Hohl wrote: Thank you! At least I can play with this ... The callback is a little trickier for me for the moment. I'll get back to you. Great. I am awaiting your response. Man, this stuff is tricky. Here's the best I can do for right now. I c

Re: how to define a boolean?

2009-08-08 Thread Carl Sorensen
On 8/8/09 11:59 AM, "Marc Hohl" wrote: > Mark Polesky schrieb: >> Marc Hohl wrote: >> >> >>> Sorry if this is a stupid question, but here im totally stuck: >>> >> >> Not a stupid question. This involves "parser variables" which are >> giving us developers troubles, too! If you're curio

Re: how to define a boolean?

2009-08-08 Thread Mark Polesky
Marc Hohl wrote: > Thank you! At least I can play with this ... > > The callback is a little trickier for me for the moment. > > I'll get back to you. > > > Great. I am awaiting your response. Man, this stuff is tricky. Here's the best I can do for right now. I commented out the third line of

Re: how to define a boolean?

2009-08-08 Thread Marc Hohl
Mark Polesky schrieb: Marc Hohl wrote: Sorry if this is a stupid question, but here im totally stuck: Not a stupid question. This involves "parser variables" which are giving us developers troubles, too! If you're curious, you can follow this long thread: http://lists.gnu.org/archive/

Re: how to define a boolean?

2009-08-08 Thread Mark Polesky
Marc Hohl wrote: > Sorry if this is a stupid question, but here im totally stuck: Not a stupid question. This involves "parser variables" which are giving us developers troubles, too! If you're curious, you can follow this long thread: http://lists.gnu.org/archive/html/lilypond-devel/2009-07/msg

how to define a boolean?

2009-08-08 Thread Marc Hohl
Sorry if this is a stupid question, but here im totally stuck: I need to define a boolean which is to be changed within a music-function and a stencil callback. I tried #(define mybool #f) at the beginning and later myfunc = #(define-music-function (parser location note) (ly:music?) (set! my