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

World: r3wp

[View] discuss view related issues

Maxim
17-Apr-2010
[9755x4]
so far,


fields: clipping text to field area (which can be smaller than the 
field itelf.

frames: clipping contents to frame bounds (just like faces in R2). 
this allows us to scroll frames within frames.


for frames the clipping isn't something I can ignore  it will have 
to work somehow.
hum  steeve did you try in 2.7.6 or 2.7.7  (SDK or full release view)?
I just updated the script so it crashes more frequently on 2.7.7. 
 the old one, it seems didn't crash for Carl !


this new one just kills view without a single refresh on my system.
curiously it can draw once in 2.7.6 SDK rebview.  put clicking on 
it ... BAM.  (on my system at least).
Maxim
18-Apr-2010
[9759x2]
NEW bug.. (but not a crash)


using vectorial fonts with text ending in spaces, corrupts color 
transparency of any following draw  element !!!

example script:
rebol [
	title: "Vectorial text corrupts transparency"

 note: "bug occurs only when text ends with one or more spaces!!!"
]

myfont: make face/font []

; COLOR IS TRANSPARENT
box-bg: green + 0.0.0.128

view layout [
	box 350x50 effect  [ 
		draw [
			font myfont
			
			 ;draw crosses
			line-width 1 
			pen blue 
			line 10x29 109x05 
			line 10x05 109x29 
			line 110x29 209x05 
			line 110x05 209x29
			
		    line-width 2 
			pen 0.127.0 
			fill-pen box-bg
			box 10x05 109x29 3 
			
			line-width 0
			pen black
			text "1    " 47x07 vectorial
			;line 0x0 0x0
			
			line-width 2 
			pen 0.127.0 
			;---------
			; following color alpha is WRONGß
			fill-pen box-bg			 
			box 110x05 209x29 3 
			
			line-width 0
			pen black 
			text "2" 154x07 vectorial 
		]
	]
]
UPDATE on clipping crash..   


using CLIP NONE , seems to be the definite cause which makes AGG 
crash in my tests.
ChristianE
18-Apr-2010
[9761]
Instead of CLIP NONE, does it work if you CLIP 0x0 350x50 (in effect 
no clipping at all)?
Maxim
18-Apr-2010
[9762x5]
nope....
that solution is exactly what I tried and it worked for awhile...
then BAM... a crash... so its back to square one... linear fills, 
when clipping, just crash AGG at some indefinite point in time.
the above text bug is also pretty weird  :-)


I discovered it when I attached a field to a label and another control 
would change colour as I typed!  :-)
wrt clipping crash..... unfortunately I've had to remove all clipping 
for now... this complicates things A LOT  .

hence delays in my release
Henrik
19-Apr-2010
[9767x2]
Are there any particular instance where OFFSET-TO-CARET will return 
NONE, even if the face has text?
oh, it seems to be when FACE/FONT is set to NONE. Nice to know.
Cyphre
19-Apr-2010
[9769]
Maxim, the first bug which crashes looks like DRAW dialect parser 
related as I tried it here with my debug library and it doesn't crash 
the agg engine itself. Unfortunately I can't test the original R2 
dialect part here.

The second bug with empty space in vectorial sctring is a side-effect 
of  one older known bug and I have already a fix for this one. I'll 
ask Carl if he can add that fix to the next R2 release.
Pekr
19-Apr-2010
[9770x2]
you should get this info to Carl, so that he knows where the bug 
might be :-)
... I mean - the first one :-)
Cyphre
19-Apr-2010
[9772]
yes, I sent him a message on R3 chat.
Maxim
19-Apr-2010
[9773]
thanks.
Anton
19-Apr-2010
[9774x2]
I suspect the CLIP bug could be the cause of large R2/View apps crashing.
I would definitely appreciate those View bugs being fixed.
james_nak
23-Apr-2010
[9776]
Once again I come to the Gurus. My app selects a folder then goes 
off and processes files. Is there any way to interrupt that process 
if a user wants to?
BudzinskiC
23-Apr-2010
[9777]
While you process files you could check a global variable stop-me 
if it's true and if so, stop processing files. Then all you have 
to do is add a button to your GUI that sets stop-me to true when 
clicked, which will stop the file processing.
Maxim
23-Apr-2010
[9778x2]
if you want your GUI to respond to events while you are processing 
within a loop,

here is a trick to allow the application to work asynchronously... 
add :

wait 0


within your loop.  this way, the event mechanism has the chance to 
do its thing.  if the gui sets a global called Interrupt, you can 
then inspect that within your loop and exit.

ex:

forever [
	wait 0
	if interrupt [
		break
	]
]
obviously forever is used as a simple example, in your app your loop 
will be where you are cycling over each file name.
james_nak
23-Apr-2010
[9780]
Maxim, perfect. Thanks. Thanks also to B.C. (My problem was getting 
the interface to allow a button to be pressed.)
BudzinskiC
25-Apr-2010
[9781]
I'm currently writing a Rogue like game with Rebol. I used a box 
to display the game map and set the focus on it so that it receives 
keyboard input but when I do that there is a weird white stripe being 
drawn on top of the box in the center. Any idea why that is and how 
I can make it go away? http://img.skitch.com/20100425-ju42itgetsasupi6yerc1ph4db.png
Henrik
25-Apr-2010
[9782x3]
That's the caret. Use FOCUS/NO-SHOW, if you want keyboard access 
to a face, but don't want to display the caret.
Though I'm not sure if it can be done when there is other content 
in the face like that.
otherwise an alternative is to provide a sensor face, size 0x0, sitting 
in the corner. focus that and the caret won't appear. then control 
the main game area using the sensor face.
BudzinskiC
25-Apr-2010
[9785]
Will have to do that, no-show isn't working. Thanks :)
Henrik
25-Apr-2010
[9786]
The caret is controlled by View on the C-layer, so there is not much 
else to do about it.
BudzinskiC
25-Apr-2010
[9787]
Ah well I'm sure it's going to be fixed in R3. R3 will make everything 
better. And coffee. Or so I've heard :)
Henrik
25-Apr-2010
[9788]
yes, text is managed on the mezzanine level, while high performance 
parts are in the open parts now.
Izkata
25-Apr-2010
[9789]
/no-show prevents the face from visibly being updated - if you do 
a [show FACE] later on, the effect of /no-show is negated
Henrik
25-Apr-2010
[9790]
yes, correct.
ChristianE
25-Apr-2010
[9791x2]
If you do not have/need text or if you display text only thru agg 
instead of face/text, you can hide the superfluous caret in R2/View 
by setting the face's para to to an origin like -100x-100.
That allows you to FOCUS such faces without having to care about 
caret.
Henrik
25-Apr-2010
[9793]
good tip
BudzinskiC
25-Apr-2010
[9794]
Works great, thanks :)
Anton
25-Apr-2010
[9795]
It should be enough to set the face/text to none.
BudzinskiC
25-Apr-2010
[9796x4]
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
That works too, thanks :) Shouldn't it be none by default then? Why 
is the default an empty string?
Sorry for that, AltMe was acting up
Anton
25-Apr-2010
[9800x2]
What face or style do you base the face which displays your map on?
Ah - BOX.   print mold svv/vid-styles/box/text ;== none    but it's 
FOCUS which does more than necessary. Check the souce of FOCUS. I 
patched FOCUS so it doesn't have such presumptuous side effects.
BudzinskiC
26-Apr-2010
[9802]
Ah alright, I checked the value of face/text after I already used 
focus on it.
Henrik
26-Apr-2010
[9803]
Anton, nice one.
Graham
29-Apr-2010
[9804]
Where would this be coming from ?

    near: [if find [down alt-down] Â act]
    where: 'wake-event

where the original code is

        feel: make feel [
          engage: func [face act evt][
            if find [down alt-down] act [
              focus/no-show face/parent-face
              face/start: evt/offset
            ]
            if find [over away] act [
              face/offset: face/offset + evt/offset - face/start
              clamp face
              show face
            ]
          ]
        ]