World: r3wp
[View] discuss view related issues
older newer | first last |
DideC 11-Jan-2005 [166x3] | With anamonitor : |
system/view/screen-face/feel/event-funcs/1: func [face event /local fac][ if all [ system/view/focal-face event/type = 'down not within? event/offset win-offset? system/view/focal-face system/view/focal-face/size system/view/focal-face/dirty?] [ fac: system/view/focal-face unfocus if flag-face? fac on-unfocus [ do-face fac none fac/dirty?: none]] event] | |
the flag is set by each function that modified the series. It's in ctx-text (insert-char, edit-text for the most). | |
eFishAnt 11-Jan-2005 [169] | thanks, DideC |
james_nak 12-Jan-2005 [170] | Hello, I'd like to create a data window like the one you're looking at now. This isn't an "area" gadget is it? I've created a "list" out of an area but each row is the same height regardless of content and it crashes a lot if I try to scroll the individual rows. Any suggestions? |
Geomol 12-Jan-2005 [171x4] | Maybe a box like this: >> l: layout [b: box white font [size: 12 style: none shadow: none color: black] "text text text text text text text text"] >> b/size/y: second (size-text b) + 4x4 == 34 >> view l |
correction: b/size/y: second (size-text b) + 4 | |
And then you have to add possibility to select text. | |
You can look at the engage function for a field this way: >> fi: get-style 'field >> f: get in fi/feel 'engage >> source f | |
james_nak 12-Jan-2005 [175] | Thanks! |
Ammon 12-Jan-2005 [176] | JFYI... CTX-TEXT is the context in which all VID Text functions reside... |
Anton 12-Jan-2005 [177x4] | James, you want LIST styles ? There is scroll-table: |
do load-thru site/gui/demo-scroll-table.r | |
(tell me if something doesn't load properly, you will need betas no more than a year old, too, probably) | |
site: http://www.lexicon.net/antonr/rebol/ | |
james_nak 12-Jan-2005 [181] | Anton, thanks. I see you have a number of cool things. Thanks. |
james_nak 13-Jan-2005 [182] | Anton, I am enjoying your code. I had seen it a while back but I couldn't figure out how to get it working. This morning I decided to take a closer look. How very cool. Thanks. |
Ryan 14-Jan-2005 [183] | Hey, what do you guys think about a timer style for view? |
Graham 14-Jan-2005 [184] | whadayamean? |
Ryan 14-Jan-2005 [185x2] | num: 1 view layout [cnt: label (form num) timer 1 [cnt/text: form num: num + 1 show cnt]] |
Or is there an easy layout way without a timer style? | |
Graham 14-Jan-2005 [187x2] | all of my timers use the timer event. |
and i usually track elapsed time... | |
Ryan 14-Jan-2005 [189x2] | I usually do this: num: 1 win: view/new layout [cnt: label (form num)] while [viewed? win] [cnt/text: form num: num + 1 show cnt] |
Err, actually with a wait like: num: 1 win: view/new layout [cnt: label (form num)] while [viewed? win] [cnt/text: form num: num + 1 show cnt wait 1] | |
Graham 14-Jan-2005 [191] | how do you get anything else done? |
Ryan 14-Jan-2005 [192] | Quick and dirty, but not the same as the event, as it does not account for processing time. |
Graham 14-Jan-2005 [193] | using a time event is like multitasking whereas your quick and dirty way makes it difficult to do anything else ... |
Ryan 14-Jan-2005 [194] | A face with a rate and time catcher in the engage function. |
Graham 14-Jan-2005 [195] | yeah, like triggering on the vertical sweep on the C64 :) |
Ryan 14-Jan-2005 [196x3] | yes, I understand the downside to the quick and dirty. |
I know a thing or two about that as well. | |
do you use insert-event? | |
Graham 14-Jan-2005 [199x2] | there's this nasty problem though : http://www.rebol.net/cgi-bin/rambo.r?id=3593& |
discovered while I was writing my portal software | |
Ryan 14-Jan-2005 [201] | Somehow avoided that one, near miss I guess. |
Graham 14-Jan-2005 [202] | Yeah .. strange that it has laid hidden for such a long time. |
Geomol 14-Jan-2005 [203] | num: 1 view layout [cnt: label (form num) rate 1 feel [engage: [cnt/text: form num show cnt num: num + 1]]] |
Ryan 14-Jan-2005 [204x3] | Slick |
num: 1 view layout [cnt: label (form num) rate 1 feel [engage: [cnt/text: form num: num + 1 show cnt]]] | |
quick and dirty though, the minor problem is that reponds to ui events. | |
PhilB 14-Jan-2005 [207] | I have a timer/clock style if you are interested. |
Ryan 14-Jan-2005 [208] | Submit it to the rebol.org for me. |
Geomol 14-Jan-2005 [209] | To prevent ui events and have counter start with 1 using your short form: num: 0 view layout [cnt: label (form num) rate 1 feel [engage: func [face action event] [if action = 'time [cnt/text: form num: num + 1 show cnt]]]] |
PhilB 15-Jan-2005 [210x2] | Ryna ... see ... http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=timer-styles.r Its quite old ..... but I have used it daily. (Note .... There is a bug with the timers if you are timing an inerval over midnight) |
Its so old it was done before now/precise was available :-/ | |
Ryan 15-Jan-2005 [212] | It seems to me that a timer style should be considered for VID. Its such a commonly used thing, it should be able to be tapped without any underlying knowledge of VID. Plus, it would take very little room and be widely used. |
Vincent 15-Jan-2005 [213] | Funny: downloaded an old /View beta (0.9.9) from web.archive.org http://web.archive.org/web/20000830122735/www.rebol.com/downloads/view/rebol909031.exe and started it. Pushed "Check REB Site": Before /View desktop, "REB Services"! |
james_nak 15-Jan-2005 [214] | I asked Anton directly but some of you may know a work-around. I'm using his scroll-table style but when I call a face using it within a reblet it does not "do" it. It works from the command line with a "view face" but not within. Is there something akin to "reduce" which would, for lack of a better phrase, force a face to recompute itself entirely? I tried "show" and "focus." |
Vincent 15-Jan-2005 [215] | (sorry, message cut by altme?) ... lanched /View 0.9.9, clicked on "Check REB Site": Before /View desktop, "REB Services"! |
older newer | first last |