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

World: r3wp

[View] discuss view related issues

DideC
26-Jun-2006
[5201]
faces or facets ?
Henrik
26-Jun-2006
[5202]
from the same console
DideC
26-Jun-2006
[5203x2]
l: layout [field text "toto" text-list  box with [source function!]]]
; works too
I guess a typo somewhere in your code, search for "function" in all.
Henrik
26-Jun-2006
[5205x3]
>> do %/c/rebol/list-view.r
Script: "VID LIST-VIEW Face" (19-May-2006)
function!: function!
function!: undefined
** Script Error: function! has no value
** Where: stylize

** Near: color: make function! [] [select colors either fill ['even] 
['background]]
>> source function!
function!: function!
>>
found it
thanks
DideC
26-Jun-2006
[5208]
typo?
Henrik
26-Jun-2006
[5209]
acquire-func: [] was turned into acquire-make function!: []

the joys of search and replace :-)
DideC
26-Jun-2006
[5210]
:-)
Henrik
26-Jun-2006
[5211]
it was not where I expected it though. the make function! that came 
immediately after it seemed to work. oh, whatever :-)
BrianH
26-Jun-2006
[5212]
make function! is an optimization compared to has, does and function, 
but not so much so compared to func. For now (REBOL 2) func is a 
simple wrapper around make function! that does nothing to its arguments 
- the only overhead added is that of a single function call.


You should also keep in mind that the syntax of make function! will 
be changing in REBOL 3, so all code that uses it will require some 
changes. The syntax of func, has, does and function will remain the 
same.
Henrik
26-Jun-2006
[5213]
thanks, I'll keep that in mind
james_nak
26-Jun-2006
[5214]
Hmmm. I thought they were basically the same. Good info.
Cyphre
26-Jun-2006
[5215x2]
Yes, I think it is not worth to use make function! as the 'speedup' 
could be noticable only if you are creating many functions in a loop 
at runtime. The functions are usu created only during loading of 
your script  so I don't see any optimization gain here.
usu=usually
BrianH
26-Jun-2006
[5217x3]
I usually use func because it has the least overhead.
REBOL 2:
    make function! [args /local locals] [code]
REBOL 3:
    make function! [[args /local locals] [code]]
Not much of a change, really, but code using func will still work.
Ashley
26-Jun-2006
[5220]
I think it is not worth to use make function! ...

 For anything less than a large app/framework I tend to agree. However, 
 in the later case the sum of many minor improvements can make a noticeable/measurable 
 improvement; but it all depends on what we are optimizing for (code, 
 load time, run time, memory, etc).
DideC
27-Jun-2006
[5221]
Does anybody have the Cyphre's View console script somewhere on it's 
HD ?
Can't find it in rebol.org
Graham
27-Jun-2006
[5222x2]
go to cyphre's rebsite
It's there.
DideC
27-Jun-2006
[5224]
Ah, thanks
Cyphre
27-Jun-2006
[5225]
Ashley: yes, this can be noticable for really large frameworks...say 
with ten thousands functions and more. There you can gain few miliseconds 
with this optimization during the load time.
Pekr
27-Jun-2006
[5226]
few milliseconds during the load time? Is it even noticable? :-)
Cyphre
27-Jun-2006
[5227]
that was my point ;) Well if you create about 1milion functions then 
you can gain for about 50% of time on my CPU during code loading(4seconds 
instead of 8). But I haven't seen a Rebol project with so many functions.(but 
I'm not saying it cannot be developed ;))
Janeks
29-Jun-2006
[5228]
Q: Is it possible to create an app that at the same time reads two 
data/ports.

F.ex. load an image from net and at the same time read data from 
GPS and display it on old image?
Graham
29-Jun-2006
[5229]
use async for this
Volker
29-Jun-2006
[5230]
a simple "aktiv: wait[port1 port2]" would be enough, with open/diirect 
or open/no-wait. or such. Never remember what these all do ;)
Janeks
29-Jun-2006
[5231x2]
So am I right:

I need to define before ports:

gps-port:  open ....

url-port: open ... ??? ( read  doesnot fit here?)

user-port: ??? also is needed 

and then loop with wait [ gps-port url-port user-port ] [
	do I need here to catch what port it is 
	and do apropriate actions
]
Gone to Async group!
Anton
29-Jun-2006
[5233]
That's right, READ and WRITE are like a wrappers for OPEN and CLOSE. 
 eg. 
	READ url 
is equivalent to:
	OPEN port
	.... copy data here ....
	CLOSE port
Volker
29-Jun-2006
[5234x4]
some-port: open/no-wait/binary tcp://something
forever[
 active: wait REDUCE[ gps-port url-port user-port ] [
  new-data: copy active
 ; new-data is some #{...}
]
and decide what to do based on active,
 if same? avtive gps-port[..]
there are also some automatics which accosiate a function with a 
port, but i find this way easier to trace to get started.
and then here is async, which is a bit faster. Because /no-wait still 
does some waiting for error-checks. for async you need a library, 
by gabriele, romano or DocKimbel. Or deep knowledge.
[unknown: 10]
30-Jun-2006
[5238]
perhpas a silly question, but how do I determine the name of a function 
mi currently in ?

As in, Im creating functions with a random-name and I would like 
to know in what function-name
im currently in... Is this possible ??? Like a 'SELF or 'ME ?
Volker
30-Jun-2006
[5239]
Not officially. IIRC there is some trick with triggering an error, 
somewhere on the ML.
Anton
1-Jul-2006
[5240]
That's not easy to figure out.
Janeks
18-Jul-2006
[5241]
Where to find some documentation about systray in Rebol?
Graham
18-Jul-2006
[5242x2]
rebol.com
http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?find=systray&form=yes
Janeks
18-Jul-2006
[5244]
Thanks - already found!

What I am missing is what else words I could use for tray controls 
and messages received?
F.ex.
Can I activate tray meny un left click?
Is it possible to make submenus for systary icons?
Graham
18-Jul-2006
[5245x2]
double click works for me
Cyphre is working on systray enhancements .. stay tuned
Pekr
18-Jul-2006
[5247]
there is one bug found with systray :-( you get events only if console 
window is visible ....
Cyphre
18-Jul-2006
[5248]
This bug is not related to systray directly (ie the current Systray 
support works fine) but it is related to system port.
Janeks
18-Jul-2006
[5249x2]
Regarding bug:

Script of Gabriele works fine for me even no console window is visible. 

Then the question is - does it (systray opeartions) affects other 
event waiting on ports (f.ex. interface events, loading file from 
internet)
Is it possible to change tray icon?