r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[View] discuss view related issues

Anton
15-Nov-2006
[6152]
An action could "recommend" the next button to push by setting it 
to blink for a few seconds. (I don't think I would ever use that 
myself, but maybe visually impaired users would find such a feature 
invaluable.)
Pekr
15-Nov-2006
[6153]
what does 'cue function do? Does it do action block submitted to 
style? (button here)
Anton
15-Nov-2006
[6154]
http://anton.wildit.net.au/rebol/doc/cue.txt
Pekr
15-Nov-2006
[6155]
thanks!
[unknown: 5]
15-Nov-2006
[6156]
what is the purpose of  /blinker ?  What would code look like that 
uses this?
Anton
15-Nov-2006
[6157x3]
blinker looks like just another on/off variable that tracks the blinking 
state.

Have a look at the button feel. Time events toggle the blinker between 
on and off.

Then redraw mashes BLINKER and STATE together to get the final visual 
STATE.

This is the "bug" that Henrik would rightfully be complaining about. 
It's just a very minimalist way to show the blinking state. (Henrik, 
feel free to stylize the button so it shows the blinking in a more 
expectable way.) I think it's good this way because it's very clear 
how this feature works, and it does not impact on any other feature 
of the button. For example, a better look might be to toggle LUMA 
in the effect dialect block, but then that would have to be taken 
into consideration every time by button restylists. Even if the blink 
feature wasn't used, just having code in there which affects the 
effect block would waste some of your time while you considered whether 
it had a negative impact on your custom style's effect block management.
So, the way it is now is minimalist - it's crying out for someone 
to stylize it.
Example code is as Henrik's blinking button, above.
[unknown: 5]
15-Nov-2006
[6160]
Thanks Anton.
Maxim
17-Nov-2006
[6161x3]
does anyone know how I can make a line's pattern "rotate" so that 
it animates as if a shape's contour revolves around it?
I cannot achieve this with line-pattern, cause I have discovered 
a while ago that specifying more than one dash/stroke combination 
will crash view, really, crash rebol itself!
if you have a working example of multiple dash/stroke line-pattern 
which does not crash when shown many times, I'd also like to see 
it.  This way I might understand what makes rebol crash and have 
the RAMBO ticket updated !?
Anton
17-Nov-2006
[6164x2]
Did you notice my LINK style in the style-gallery.r ?
http://anton.wildit.net.au/rebol/gui/link.r
do http://anton.wildit.net.au/rebol/gui/demo-link.r
I use a small 2x2 image, pixels set in checkerboard arrangement, 
to produce the outline when the links are focused.
Maxim
17-Nov-2006
[6166]
ahh, so I could just use a rotation image pattern... I guess.
Anton
17-Nov-2006
[6167]
By animating that image you could get something close to what you 
want. (I don't think rotation will be easy, have to think about it.)
Maxim
17-Nov-2006
[6168x2]
it sort of depends how view uses the pattern, but there is probably 
a way to make it work...
but how to get that working in draw... does draw support image patterns 
for the pen? or only the fill pattern?
Anton
17-Nov-2006
[6170x2]
Have a look at the link style. I just used it in the edge, I think.
Yes, when focused, I set the face/edge/image to the special checkerboard 
image.
Maxim
17-Nov-2006
[6172]
but I need to enable this for draw shapes... hummm not easy... I 
don't want to implement a shape resampling algorythm.
Anton
17-Nov-2006
[6173]
That bug is in rambo right ? Maybe send a feedback to raise its priority. 
It is a crashing bug, so it should be pretty high. It may just be 
fixed in this round.
Maxim
17-Nov-2006
[6174]
yes its in rambo... I'll be sure to nag Carl about it when the alpha's 
start rolling out ;-)
Anton
17-Nov-2006
[6175]
They asked for our favourite bugs recently so now's a good time - 
hopefully they're still in bug-fixing mode.
Thorsten
17-Nov-2006
[6176]
Hi, it seems quite a while ago that i did something in /view so i 
lost some knowledge about it. Can anybody help me out with how to 
change the color of a button when i press it?
Maxim
17-Nov-2006
[6177]
specify two colors attributes, same thing for text 
 ex: showing button and toggle styles:


view layout [button "ok" red blue toggle "press" "me" black green]
Thorsten
17-Nov-2006
[6178]
and what if the color should only change when a condition is true??? 
is there something like button/color??
Geomol
17-Nov-2006
[6179x2]
Thorsten, yes, but button/colors are used for that. Try this:

>> l: layout [b: btn "Red/Blue" red blue btn "Make Yellow" [b/colors: 
[yellow blue] show b]]
You can view it by:
>> view l
and look at the button with:
>> ? b
You can also see the colors block with:
>> ? b/colors
Thorsten
18-Nov-2006
[6181]
Hi Geomol,  this seems to me what i was looking for. Will try it 
out asap. Thanks
[unknown: 5]
18-Nov-2006
[6182]
Anyone know what the to-vector function is for in the new view 2.7 
build for windows?
Anton
19-Nov-2006
[6183]
There's a what ?
Henrik
19-Nov-2006
[6184]
>> to-vector "1"

crashes
Anton
19-Nov-2006
[6185x3]
TO-VECTOR doesn't look implemented. There are other bugs with it:
>> v: to-vector 1
== 1
>> v/1
== #"^]"
>> v/2
== none
>> v: to-vector 2.2
== 2.2
>> v/1
== #"^!"
If you want to see the new crash error message window, type this:
to-vector "x"
(should move bug discussions to RAMBO group)
Gabriele
19-Nov-2006
[6188x2]
vector! is a DT that was being implemented to represent real arrays 
(i.e. so that 10 integers do not take 160 bytes, but just 40). it 
would mainly be useful for rebcode, but there are many other cases 
when it is useful.
not sure if it will happen for r2 though.
Henrik
19-Nov-2006
[6190]
gabriele, sounds very interesting. I was although hoping a bit for 
a system to use arithmetics on blocks of numbers.
[unknown: 5]
19-Nov-2006
[6191]
Thanks Gabriele
Gabriele
19-Nov-2006
[6192]
i guess arithmetics would be possible on vector!. (but then, what 
kind of product? :)
Henrik
19-Nov-2006
[6193]
has there been any talks about complex numbers? electronics guys 
love those :-)
PhilB
20-Nov-2006
[6194]
How do I resize a text-list horizontally?
I tried this code
view layout/size [
    tl: text-list data ["A" "B" "C"]
    across

    btn "+" [tl/size: tl/size + 10x0 tl/sld/offset: tl/sld/offset + 10x0 
    show tl]

    btn "-" [tl/size: tl/size - 10x0 tl/sld/offset: tl/sld/offset - 10x0 
    show tl]
] 300x300
which works if the text-list is made smaller.
But if it's made bigger I get artifacts.
What else needs to be set in the text list to make it work?
Gregg
20-Nov-2006
[6195]
; how about using /resize, or stealing code from it?

view layout/size [
    tl: text-list data ["A" "B" "C"]
    across
    btn "+" [tl/resize/x: tl/size/x + 10  show tl]
    btn "-" [tl/resize/x: tl/size/x - 10  show tl]
] 300x300
PhilB
21-Nov-2006
[6196]
Excllent ... thanks gregg
Maxim
21-Nov-2006
[6197x2]
hum... anyone have success using the highlight-start/end values to 
setup view selection highlight in fields?
doh... sorry... copy/paste error in my code.  selection is working 
fine.  thx
Thorsten
24-Nov-2006
[6199]
Hi all,


what might be the best way to have a window with a process running

in the background, checking something and if a change occurs, the 
window ist
updated???


I made a GUI and function for the check. Checking and updating the

window via button is working fine. Now i thought about implementing 
a

process with a forever loop and wanted to start it, when the window
opens or at some time before.

First, i cannot find an 'open event. What can i use instead?
Second, is the forever loop the right way to make the process??

Third, is the event the right way to start the process automatically???

Fourth, how can the loop be stopped without closing the window (button???)

Can anybody help me out?
Anton
24-Nov-2006
[6200x2]
Something like this might work for you.
view/new layout [
	button "start work" [work-to-do?: true]
]

do-work: func [][
	; <- do a chunk of the work here
	work-to-do?: is-there-more-work?
]

forever [
	if work-to-do? [do-work]
	wait [0.02]
]