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

Help with (flavor:method :background-gray dw:margin-label) in 7.1



    Date: Wed, 11 May 88 10:08:24 EDT
    From:     kelsen@ge-dab.ge.com

    (send *dynamic-window* :set-margin-components
			   '((dw:margin-label :string "name" 
					      :background-gray tv:10%-gray)))

       Executing the above invokes the debugger with a message that tv:10%-gray
    is not an array.  The following blurb is found in the documentation and
    causes me some confusion as to what the method is expecting for an
    argument.

       Book 7A, p.405: "Note that the specification is for an array object,
			not its symbol."

       After reading that I tried the following which also did not work:

    (send ... :background-gray (symbol-value tv:10%-gray)))

       And finally I tried:

    (send ... :background-gray (eval tv:10%-gray)))

       What exactly should I send to this method to gray the margin label?


    Michael Kelsen <kelsen@ge-dab.GE.COM>

The label spec wants the array object as you say. It wants it in the spec so:

(send *dynamic-window* :set-margin-components
			   `((dw:margin-label :string "name" 
					      :background-gray ,tv:10%-gray)))

The backquote allows you to evaluate the gray array symbol into the
spec. With the regular quote the evaluation of symbol-value and eval
would have to take place at argument evaluation time (which doesn't
happen as the documentation says it expects the array not something to
eval for it)

Enjoy.