Stlyise'ing a Style
[1/3] from: philb::upnaway::com at: 11-Dec-2000 8:09
Hi Guy, I want to base a style on a previously defined style. Can someone tell me what I am doing wrong ?? The following code doesnt work .... (nor many variations on it) REBOL  large-text: stylize [ ltext: text font [size: 30] center shadow 4x4] large-red-text: stylize/styles large-text [ rtext: ltext 200.0.0] view layout [ styles large-text ltext "Test Large Text" styles large-red-text rtext "Red Text" ] I get the error .... ** Script Error: Invalid argument: words. ** Where: set [specs facets] do-facets specs new/words Cheers Phil
[2/3] from: mike:myers:cybarite at: 10-Dec-2000 20:06
The order of the values passed to stylize/styles seem to be important. STYLIZE specs /master /styles styls If you evaluate via the shell the two lines large-text: stylize [ ltext: text font [size: 30] center shadow 4x4] large-red-text: stylize/styles large-text [ rtext: ltext 200.0.0] you will see that large-red-text is only [rtext: ltext 200.0.0] instead of a style sheet like large-text is: [ltext make object! [ type: 'face offset: 0x0 size: none span: none pane: none ... If you re-order the values to be: large-red-text: stylize/styles [ rtext: ltext 200.0.0] large-text you get the answer you seek.
[3/3] from: philb:upnaway at: 11-Dec-2000 17:09
Hi Mike, yup, got it .... Cheers