Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Field color change on error.

From: g:santilli:tiscalinet:it at: 18-Oct-2002 0:59

Hi Carl, On Thursday, October 17, 2002, 11:51:24 PM, you wrote: CR> block with the styles in. (Or an empty block). However, neither of CR> these seem to work... CR> set-font face style none CR> set-font face style 'none CR> so you'll have to use a method other than set-font. ie... Hmm, indeed looking at the source:
>> source set-font
set-font: func [aface 'word val][ if none? aface/font [aface/font: vid-face/font] if not flag-face? aface font [aface/font: make aface/font [] flag-face aface font] either word = 'style [ if none? aface/font/style [aface/font/style: copy []] if word? aface/font/style [aface/font/style: reduce [aface/font/style]] aface/font/style: union aface/font/style reduce [val] ] [set in aface/font word val] ] seems like they forgot the case when one sets the style to none. CR> face/font/style: none CR> which is probably faster anyway, not to mention shorter. Of course, that's the way to go if you have already cloned the font object. However I'd suggest to flag the face in that case, so that it is not cloned again and again. In the case when you don't know if the object has been cloned or not, of course the safest way is to clone it always; the most efficient is probably doing something like SET-FONT, however. CR> PS. Oh, you've had some replies already. (: Gabriele suggested CR> this... CR> set-font face style none CR> yet it doesn't work for me... I didn't test it, sorry. CR> Another beta enhancemant I assume? Doesn't like so, by looking at the source above. BTW, is [feedback--rebol--com] working? I miss the times when you got back a ticket number immediately, and a message from Bo the day after... Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r