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

World: r3wp

[View] discuss view related issues

Henrik
27-May-2005
[1157]
put in a 'wait for a short amount of time and cpu usage may drop 
dramatically. it works well with responsiveness for scrolling large 
panes even if the frame rate drops a bit
Pekr
27-May-2005
[1158]
OK, just wanted to know, if that is normal ...
Volker
27-May-2005
[1159]
if you do something using 100%, that is normal.
Pekr
27-May-2005
[1160x2]
Carl posts new thing to consider for View - min-face - look at recent 
blog article - http://www.rebol.net/article/0168.html
Volker - ok, I just thought that it is not normal to let one app 
to "eat" such power ....
Volker
27-May-2005
[1162]
your videos are not that big problem on modern hardware. a bigger 
problem is to react fast enough for the framerate.
Pekr
27-May-2005
[1163]
move it to blog discussion?
Volker
27-May-2005
[1164]
yes, you are right. but this demos are designed to get all the power. 
its kind of graphic benchmark.
Ashley
1-Jun-2005
[1165]
I've been looking at %view-edit.r recently (and Romano's excellent 
http://www.rebol.it/~romano/edit-text-undo.txt), and have the following 
three code change suggestions:


1) Allow Shift-Tab to cycle back through the first / last pane objects 
(as Tab does):

	back-field: func [face /local item][
		all	[
			item: find face/parent-face/pane face

   any [if head? item [item: tail item] true] ; new line added here
			while [face <> first item: back item][
			...

2) Implement a new function to hilight the current word.

	current-word: function [str] [s ns] [
		set [s] word-limits
		s: any [all [s: find/reverse str s next s] head str]
		set [ns] word-limits
		ns: any [find str ns tail str]
		;	hilight word
		hilight-text s ns
		show view*/focal-face
	]


3) Refactor the engage / down action to allow double-click selection 
of a word (something I use all the time in almost every editor I 
use).

Current code:

	down [
		either not-equal? face view*/focal-face [
			focus face
			view*/caret: offset-to-caret face event/offset
		][
			view*/highlight-start:
			view*/highlight-end: none
			view*/caret: offset-to-caret face event/offset
		]
		show face
	]

Proposed change:

	down [
		either event/double-click [
			current-word view*/caret
		][
			either face <> view*/focal-face [focus face] [unlight-text]
			view*/caret: offset-to-caret face event/offset
			show face
		]
	]

Comments?
ChristianE
2-Jun-2005
[1166]
Out of interest: Are the changes made to draw going to be available 
in the non-draw face effects, too? E.g. the draw fill-pen will allow 
gradients with an arbitrary number of colors to go through, but EFFECT: 
[GRADIENT ...] seems to be limited to two colors only. Not to high 
on my personal wish list though, I'm just being curious here.
Cyphre
2-Jun-2005
[1167]
ChirstianE: I think all possible feature duplicity in EFFECT should 
be merged with DRAW code but this won't happen in 1.3 It needs more 
work but I believe this will happen in future versions.
ChristianE
2-Jun-2005
[1168x2]
Yes, that's what I would vote for, too. The new draw makes these 
commands look somewhat inferior. On the other hand, they are an easy 
way to handle resized faces, whilst the draw block has to be changed 
manually.
Cyphre, since you are definitly the right one to ask on graphics 
related issues: I've already spent *ages* trying to understand how 
text high-lighting works in View. Do you happen to know if it is 
possible to make the background color of highlighted text different 
to the color of the text in lowlighted state? In a field with text 
black, I'd like to have the selection highlightened in e.g. silver, 
whilst the text itself should remain written in black. But I never 
managed to do so.
Gregg
2-Jun-2005
[1170]
I don't think so Christian; there's only one font per face at this 
point.
ChristianE
2-Jun-2005
[1171x2]
Yes, but if it were about changing the font, that probably may be 
possible by changing the fields font dynamically at the right time, 
may be by modifing CTX-TEXT.

What I meant is the way highlighting is "drawn". It looks much like 
if the text is rendered inverse with some sort of keying. You'll 
see what I'm trying to express by looking at


view layout [field "MMM" 210x100 effect [gradient 1x0 blue red] bold 
font-size 78]


and selecting the text. Obviously something like FONT [COLORS: REDUCE 
[WHITE BLACK]] here doesn't work, because FIELD/FEEL (i.e. SWIPE) 
doesn't make use of FONT/COLORS.

But more so, it seems like it's currently technially impossible to 
do so. In the end, the answer really seems to be No! for now.
Maybe I'll find "a little spare time" to do a field which draws it's 
text in the effect block and rewrite the stilll somewhat buggy text 
editing functions ;-)

(Not a serious comment though, because that's definitly not the league 
I'm playing in.)
Robert
3-Jun-2005
[1173]
Is there a way to show a pop-requester with a time-out? I want to 
show if for X seconds and if nothing happens return a default action.
Graham
3-Jun-2005
[1174]
inform/timeout
Robert
3-Jun-2005
[1175]
And this allows (yes) (no) (cancel) as well? Didn't used it yet.
ChristianE
3-Jun-2005
[1176]
Has anyone tried 1.2.117 yet? I'm experiencing problems here getting 
it to load my user.r on startup, even though I've already tried it 
with different places and registry settings.
Micha
3-Jun-2005
[1177x3]
plis help update sld text-list  .
parse-keywords: func [data /local k tmp ]

                     [ tmp: []


                       parse data [ any [thru "keywords=" copy k to {"} 

                                    (insert tail tmp join k " ")
 
                                    skip ]  ]

                       return tmp ]



lay: layout [  backdrop silver
               across
               h2 red 40 "url" f: field 200 []
               
               return
             
               
              space 0x0
              a:  text-list   []   [  i/text: form a/picked
                                             show i ]

              return
           
              i: info
    
              
             
              return
              pad 0x10
              space 10x10
              across 

              button "load url" [ a/data: parse-keywords read load f/text 

                                  a/sld/data: a/sn / ((length? head a/lines) - a/lc)
                                  show a]

              button "pase clibord" [ a/data: parse-keywords read clipboard:// 
              show a ]

             ; button "write" [write/append w a/text   a/text: "" show a ]



f/text: "http://cat333.com/"

button "halt" [halt]

]



view  lay
sld does not move
ChristianE
3-Jun-2005
[1180x3]
Try it with the following changes:
button "load url" [

                  insert tail clear a/data parse-keywords read load f/text
                  a/sld/redrag a/lc / max 1 length? head a/lines 
                  show a 
                                  
              ]
              button "paste clipboard" [ 

                  insert tail clear a/data parse-keywords read clipboard:// show a
                  a/sld/redrag a/lc / max 1 length? head a/lines 
                  show a
              ]
Oh, sorry, remove the first "show a" in "paste clipboard" button's 
action block.
Gabriele
3-Jun-2005
[1183]
Robert: request/timeout
Micha
3-Jun-2005
[1184]
it thanks ChristianE now work .
MichaelAppelmans
7-Jun-2005
[1185]
re versions I'm trying to run Didec's delete-emails which requires 
View 1.2.8+. I downloaded the latest version of View and it shows 
up as 1.2.1? When I look at the downloads dir I see 1.2.8 circa june 
2005 but the more recent files are labeled version 1.2.1. Can someone 
explain why newer code has a lower version number?  Thanks
Guest
7-Jun-2005
[1186]
Actually its revview1255031a1 18 oct 2004 vs rebview1211931 6 jun 
2005
Anton
7-Jun-2005
[1187x2]
The latest View beta is 1.2.119, which was released yesterday (and 
possibly throws up some new bugs/issues for older programs.)
http://www.rebol.net/builds/031/rebview1211931.exe

Otherwise I can recommend you try View beta 1.2.48, which is not 
so new and therefore more likely to have all its issues understood 
by delete-emails:
http://www.rebol.net/builds/031/rebview1248031.exe
(we sat on View 1.2.48 for a while, so I expect, like myself, Dide 
used this version to test his programs for a while)
MichaelAppelmans
7-Jun-2005
[1189x2]
thanks Anton I will try that version 1.2.119 issues memory read error 
with delete_emails.
btw why is the latest beta a lower version number than 1.2.48?
Vincent
7-Jun-2005
[1191]
higher: 119 > 48 (it's a tuple : a set of small integers, not a decimal)
DideC
7-Jun-2005
[1192x3]
Hi Michael,

Delete-emails works fine on 1.2.48, but not on 1.2.119. Some changes 
in POP protocol prevents it to work.
Last version of Delete-emails is 3.5.4 wich is available here

http://membres.lycos.fr/didec/rebsite/delete-emails/delete-emails.r
It works here on View 1.2.119.
It's not a final version, but is completely usable. What is not finish 
is the editor for the rules.

So, this rules are stored in the rules.txt file (this file appear 
after your run it one time) and should be edit manually.
MikeMason
8-Jun-2005
[1195]
I need to use com12 (on winXP) to access a Bluetooth serial port 
- anyway this can be done using REBOL?? (Other ports work fine on 
a different PC to Bluetooth) - but I need the flexibility as eventually 
I will be talking to 4 remote devices.   Any help out there???  thanks.........
Gregg
8-Jun-2005
[1196]
Do you mean just getting to com12? Look at system/ports/serial. By 
default I think it's just [com1 com2].
MikeMason
8-Jun-2005
[1197]
Gregg, I added com12 to the system/ports/serial and it gets thrown 
out when I OPEN.  Will work if I used com7 on another PC - seems 
to only like a single digit for N in comN??
Gregg
8-Jun-2005
[1198x2]
Hmmm, putting my "wayback" hat on...maybe try port12 (i.e. 'port 
instead of 'com)
I've never tried to go past com9 myself; I know that.
MikeMason
8-Jun-2005
[1200]
Thanks, I've tried some com port mapping software (maps com12 to 
com1) and then all works.  I can keep the REBOL com port as com1 
and change it in the mapping software.  A work around for now.  Tnks 
for the help
Henrik
8-Jun-2005
[1201]
I built a little Rotation Zoomer here: http://www.hmkdesign.dk/rebol/rzoom.r
Pekr
9-Jun-2005
[1202x3]
and please - could someone come with more attractive ViewTop skin? 
Maybe we could do a small contest, no? :-)
wrong group, sorry ...
Henrik - your zoomer is nice - I vote for it to be included in View 
Desktop test folder - nice example of AGG usage .... although REBOL 
is bitmap, or not? Once enlarged, I can see R and O letter with jaggies 
... :-)
Henrik
9-Jun-2005
[1205]
pekr, yes, it's bitmap. I noticed someone asked about a performance 
measuring tool for AGG perspective mapping, but I didn't have much 
time, so it became a rotation zoomer.
Carl
9-Jun-2005
[1206]
New ViewTop look!  I vote for that.  I did not want to use it again 
in 1.3 -- but our focus was in other areas, not on improving that 
graphic. I did a few small things t make it look a bit better.