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

World: r3wp

[View] discuss view related issues

Anton
22-Jun-2006
[5186x2]
Example?
Ok I see it. Click and drag away from the tog and the gold outline 
remains.
Henrik
22-Jun-2006
[5188x2]
yes
it should probably respond to 'drag as well as 'up
Anton
22-Jun-2006
[5190x2]
(damn! I knew that frivolous stuff would cause trouble.)
I think all the supporters of hover effects should get together now 
and fix this bug. I'm not touching it.
Henrik
22-Jun-2006
[5192]
it's that dangerous? :-)
Anton
22-Jun-2006
[5193]
I should probably chill out a bit. Been working too hard lately.
Henrik
26-Jun-2006
[5194x3]
hmm... are there circumstances where function! will become undefined 
when using stylize/master? I'm doing a bit of optimization by replacing 
DOES, HAS and FUNC with MAKE FUNCTION!
and when I define the third face, FUNCTION! is suddently undefined.
....
    data: 0
    row: 0
    source function! ;<--- defined
  ]
  list-view: BOX with [
    source function! ; <--- undefined
    hdr: hdr-btn: hdr-fill-btn: hdr-corner-btn:
    lst: lst-fld: scr: edt: pup: pdn: none
....
DideC
26-Jun-2006
[5197x2]
This works nice in a fresh console :
l: layout [ box with [source 'function!]]
Henrik
26-Jun-2006
[5199x2]
tried that here too and works. what about 3-4 different faces in 
the same block?
the funny thing is that it's rendered undefined at the same point 
every time the code is loaded.
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
[5234x2]
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[..]