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

[REBOL] Re: Moving the focus in View...........

From: antonr:lexicon at: 19-Jun-2004 2:48

Rebol's 'next is different to English. 'next expects a series argument to follow, and face is not a series. Let me see, try this: if 2 = length? face/text [ focus first next find face/parent-face/pane face ] We use face/parent-face/pane to get to the pane block which holds our face. 'find returns the pane block at the position where our face is, then 'next is applied to move the position forward one - to the next face. This is really simple, doesn't handle certain conditions. See how ctx-text/next-field does it: probe get in ctx-text 'next-field Unfortunately, there is no concept of tab-order in rebol at the moment (which has been discussed quite a bit, and requires a new focus framework to be implemented), but you can make your own custom focus code using next-field as an example, and check face/style = 'your-style for instance. Let me revise the top example: if 2 = length? face/text [ focus ctx-text/next-field face ] Anton.