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

area problem

 [1/4] from: kpeters:otaksoft at: 19-Sep-2007 16:15


I have used the modified clear-fields function below until I also had some areas in my layout that needed to be cleared as well. No sweat - a little mod & off I go - or so I thought. It ignored my areas! Upon chasing it down, it appears that flag-face? face area does not "detect" areas? Why would areas be different and how do I fix this? TIA, Kai empty-fields: func [ panel [object!] ][ if not all [ in panel 'type panel/type = 'face ] [ exit ] unfocus foreach face panel/pane [ if any [ flag-face? face field flag-face? face area flag-face? face memo flag-face? face fld flag-face? face inf ][ either series? face/text [ clear face/text face/line-list: none ] [ face/text: attempt [ make face/text none ]] ] ] show panel ]

 [2/4] from: sant4:wanadoo at: 20-Sep-2007 15:28


the style area contains the flags: [tabbed on-unfocus input]
>> layout [a: area] >> a/flags
== [tabbed on-unfocus input] So, you could check 'input flag instead empty-fields: func [ panel [object!] ][ if not all [ in panel 'type panel/type = 'face ] [ exit ] unfocus foreach face panel/pane [ unless empty? intersect face/flags [field input] [ either series? face/text [ clear face/text face/line-list: none ] [ face/text: attempt [ make face/text none ]] ] ] show panel ] Steeve

 [3/4] from: anton::wilddsl::net::au at: 21-Sep-2007 2:00


Kai, I do not think there is any AREA face-flag. Read this doc: http://anton.wildit.net.au/rebol/doc/face-flags.txt Anton.

 [4/4] from: kpeters::otaksoft::com at: 20-Sep-2007 11:04


Thanks, Steeve ~ that's a lot better. Nice use of 'intersect, too. Kai On Thu, 20 Sep 2007 15:28:48 +0200 (CEST), Steeve ANTOINE wrote: