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

World: r3wp

[View] discuss view related issues

Volker
25-Jan-2006
[4124]
do/args http://polly.rebol.it/test/test/scratch/simcon.r[
probe event-port
# length? system/ports/wait-list
# same? first system/ports/wait-list system/view/event-port
# get in system/view/event-port 'awake
# probe we: get in system/view 'wake-event
# insert second :we [prin "*"] 
# view layout[area] none
]
Janeks
25-Jan-2006
[4125x2]
So I made modified function to:

loadMapImg: func [
	mapUrl
	/local rezImg tmpWl
][
	if exists? %mapImg.gif [ delete %mapImg.gif ]
	either attempt [
		tmpWl: copy system/ports/wait-list
		clear system/ports/wait-list
		rezImg: load-thru/to mapUrl %mapImg.gif
;		rezImg: load mapUrl	
	][
		system/ports/wait-list: tmpWl
		return load %mapImg.gif
;		return rezImg
	][
		return none
	]
]
It works for me! Thanks!
Is it correct?

I looked into system/ports/wait-list - there is a lot variables and 
awake function.
For what else wait-list is good?
Volker
25-Jan-2006
[4127x3]
All ports there are automatically active on 'wait.
for other ports you have to wait[port1 port2 ..]. Ports in wait-list 
are automatically "added".
looking into - yes, prboing ports is long. i suggest using some visual 
tool like anamonitor.
Janeks
25-Jan-2006
[4130x2]
Are there any docs available about wait-list on the net?
So I mean a bit detailed docs about wait-list system ...
Volker
25-Jan-2006
[4132]
Got my knowledge by source/ML/chatting. I guess google finds some 
ML. Maybe there are more "real" docs somewhere.
Janeks
25-Jan-2006
[4133]
Sorry, what is "source/ML/chatting"?
Volker
25-Jan-2006
[4134x2]
looking inside rebol with 'source etc, mailing-list, altme/ios.
Hmm, both anamonitor and roam can not dump that port.
Janeks
25-Jan-2006
[4136]
So what exacly is wait-list? 
It is block of what?
Where can I see all those active ports?
Volker
25-Jan-2006
[4137]
yes, a block. with ports in it.
 echo on probe system/ports/wait-list
then look in %rebol-echo.txt with an editor.
Janeks
25-Jan-2006
[4138]
The same I can see with just probe.
O'k I see now - in this case it is just one 'EVENT port!
Volker
25-Jan-2006
[4139x4]
thats true. but its big. in an editor you have find, matching parens 
and such. thats why i use echo.
other ports you have to put in yourself.
i guess a search for "awake rebol" would turn something up.
maybe something like this: http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlGKXQ
Janeks
25-Jan-2006
[4143]
Yep.

Now I just trying to better understand, how it all works. I have 
some feelings and now my script works like expected.
I hope my method is correct.
Now I want to make working progess bar by using read-thru.
But now it is quite late - I am gonna to sleep.
Thanks Volker for your advice!
Volker
25-Jan-2006
[4144]
goodnight Janeks :)
Anton
26-Jan-2006
[4145]
Gabriele, that is good! I had completely forgotten about this, but 
now I remember it was mentioned before. You have to use it yourself 
to remember it well...
Janeks
26-Jan-2006
[4146]
Now the question is about progress face. I dumped my progress face 
and see there also text atribute. But 
code 
		mapDwnlProgr/text: "Test"
		show mapDwnlProgr
does nothing.
So for what is used text atribute in progress face?
Anton
26-Jan-2006
[4147x10]
You cannot see the text attribute, unfortunately, because it is covered 
by a subface, the blue progress amount.
If we set the font color to white and move the subface a little bit 
we can see the text.
view layout [progress 200x50 "hello there" font-color white with 
[data: 0.6 append init [pane/offset: size / 5]]]
Mmm, you could do it like this:
view layout [progress 200x50 "hello there" font-color white with 
[data: 0.6 append init [pane/offset: size / 6 pane/effect: [merge 
alphamul 128]]]]
But the text is still partly obscured by the blue progress.
I wrote my own progress style to overcome some of the default's limitations.
I used one face and used the draw dialect to draw the blue progress 
amount. It should be more efficient because it only uses one face.
(and face/text is rendered over the top of draw dialect graphics).
do http://www.lexicon.net/antonr/rebol/gui/demo-percent-progress.r
DideC
27-Jan-2006
[4157]
There was some work on a progress in "RebGUI" group arround 24-nov-2005.


For those who don't like setting Altme message limit too high (sync 
bug) there is :
http://membres.lycos.fr/didec/rebol/altme-chat-reader.r
Save it to your %Altme\ folder for easier use.
Janeks
27-Jan-2006
[4158]
Thanks, Anton and DideC!

It seems, that there could be make very interesting progress indicators 
by the Rebol.

In this case I made it in simplest way - just put over progress one 
of text styles.
Anton
2-Feb-2006
[4159x3]
HKEY_CURRENT_USER\Software\Rebol\View\Home = d:\anton\dev\rebol\view

HKEY_CURRENT_USER\Software\Rebol\View\Sandbox =d:\anton\dev\rebol\view
Sandbox goes into view-root, if I recall correctly.
I set them to the same path to get the "traditional" rebol behaviour, 
public cache under the same program directory.
Pekr
2-Feb-2006
[4162]
where is user.r being looked for by default?
Anton
2-Feb-2006
[4163x2]
In view-root, I believe. But you can just try experimenting with 
the two paths to see what happens.
Also check system/options/home and system/options/boot
Pekr
2-Feb-2006
[4165x2]
well, exactly ... that is a mess however ...
now print this, send this to novice user, he will be disgusted. We 
forgot things should be simple ....
Anton
2-Feb-2006
[4167]
Not as bad as you think. It's quite simple, really. I just can't 
remember exactly, so I'm not being precise right now.
Pekr
2-Feb-2006
[4168]
not as simple, as what happens if you have user.r in your .exe placement 
dir - will it be used instead of the one placed in the cache?
Anton
2-Feb-2006
[4169x3]
user.r is not used in the cache. Public cache is determined from 
view-root but that does not mean it *is* view-root.
public cache is at view-root/public/
PATH-THRU defines where the public cache is:
>> ?? path-thru
path-thru: func [
    "Return a path relative to the disk cache."
    url /local purl
][
    if file? url [return url]
    if not all [purl: decode-url url purl/host] [return none]

    rejoin [view-root/public slash purl/host slash any [purl/path ""] 
    any [purl/target ""]]
]
Pekr
2-Feb-2006
[4172]
I also don't believe RT fixed installation process, if it can ever 
be fixed. You install for one user, then for another, that is ok. 
Now one of them tries to uninstall. The icon in "control panel/uninstall 
sw" will be removed, so you can't clean the system from the cache 
of the secondary user ...
Anton
2-Feb-2006
[4173]
There you see "view-root/public". This is the basis for all the public 
cache functions, LOAD-THRU, READ-THRU, EXISTS-THRU? etc.