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

[view][list] Field faces within a list

 [1/3] from: louisgosselin::accesrail::com at: 28-Sep-2004 21:22

Hello List, Did anyone successfully used a field face within a list (a scrolling list) ? I find there seem to be some obstacles in doing this: First it appears that the action block of the field face is never triggered. This may have to do with the face never losing focus. The entire column of fields seem to react when text is highlighted anywhere in the column. Then editing the text in the field does not quite work; only one character can be inserted. Deleting characters eventually crashes edit-text ** Script Error: Cannot use path on none! value ** Where: edit-text ** Near: if all [tmp/x <= 0 tmp2/x < 0] [face/para/scroll/x: tmp2/x - tmp/x] All examples of list that I found never make use of field faces. So I wonder if there a good reason for this ? With Regards, Louis

 [2/3] from: antonr::lexicon::net at: 29-Sep-2004 22:09

Hi Louis, It looks like you found the good reason. :) That's exactly it; edit-text can't handle it, and if you investigate, you find that a solution isn't so obvious. There is a way to fake it perfectly, though, by positioning a field right over the top of the iterated face when it is clicked on. I think Allen Kamp was first to show how this was done in a Rebol Zine issue 3 long ago: google://rebol+zine+iterated+fields -> I would love to figure out a way to support iterated fields and other editable styles, but I think that would need a bit of a low-level redesign - anyway, if you read the article, you will get a solution that works now. Anton.

 [3/3] from: louisgosselin::accesrail::com at: 29-Sep-2004 17:07

Yessss ! It does the job indeed. Thanks Anton for pointing me to this article, that saved my day (actually more than a day ;)). The author of the article is in fact Sterling Newton. Bye, Louis At 08:09 AM 2004-09-29, you wrote: