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

World: r3wp

[View] discuss view related issues

Henrik
25-Jan-2010
[9553]
when I type and then highlight without changing the focus, and then 
click the button, the field is unfocused and the highlight is none. 
this actually seems like correct behavior, although you would want 
to retain the highlight.
Josh
25-Jan-2010
[9554]
try it more than once
Henrik
25-Jan-2010
[9555]
yes, I did. there is clearly a pattern there.
Maxim
25-Jan-2010
[9556]
I didn't even know about  'local-request-file
Izkata
25-Jan-2010
[9557]
Doesn't work everywhere, though - 2.7.6 on Ubuntu Hardy:
>> local-request-file []
** Script Error: Feature not available in this REBOL
** Near: local-request-file []
WuJian
25-Jan-2010
[9558]
read this link:       http://www.mail-archive.com/[rebol-list-:-rebol-:-com]/msg12381.html
but in my REBOL, 2.7.7.3.1

'local-request-file always returns 'true and 'false,   what does 
this mean.
Ashley
25-Jan-2010
[9559]
local-request-file is only available for Windows and Mac ... and 
the Mac version supports a subset of the functionality available 
on Windows (e.g. no multi-item selection). Two simple examples of 
usuage:

	open-file: make function! [
		/dir path [file!] "Default file name"
	][
		all [ 

   local-request-file path: reduce ["Open" "" clean-path %. either dir 
   [compose [(path)]] [copy []][][] false false]
			join third path first fourth path
		]
	]

	save-file: make function! [
		/dir path [file!] "Default file name"
	][
		all [ 

   local-request-file path: reduce ["Save" "" clean-path %. either dir 
   [compose [(path)]] [copy []][][] false true]
			join third path first fourth path
		]
	]
Rebolek
31-Jan-2010
[9560]
Floyd-Steinberg dithering:
do http://box.lebeda.ws/~rebolek/rebol/dither-fs.r
Not the fastest thing around, I know.
Henrik
31-Jan-2010
[9561x2]
R3? It complains about map!
>> do http://box.lebeda.ws/~rebolek/rebol/dither-fs.r

Script: "Floyd-Steinberg dithering" Version: 0.0.1 Date: 30-Jan-2010

** Script error: invalid argument: [0.0.0 63.63.63 127.127.127 191.191.191 
255.2
55.255]
** Where: make catch either either applier do

** Near: make map! [0.0.0 63.63.63 127.127.127 191.191.191 255.255.25...
Rebolek
31-Jan-2010
[9563x2]
Ah, I'm testing it under 2.7.7
I'll change it to hash! that should be OK then.
Henrik
31-Jan-2010
[9565]
ah, ok. I don't use 2.7.7 as I have a big project that relies on 
2.7.6 and don't want to mess it up.
Rebolek
31-Jan-2010
[9566]
Reuploaded and tested under 2.7.6
Henrik
31-Jan-2010
[9567x2]
cool it works. what do you mean by "slow"? :-) well, it was done 
when I came back to the desk.
I think you should post it on rebol.org as an educational script.
Rebolek
31-Jan-2010
[9569]
Good idea, I'll improve it a bit and post it.
Maxim
31-Jan-2010
[9570]
the BW version is quite fast... good enough for print preprocessing 
 :-)
Graham
13-Feb-2010
[9571]
facet question http://synapse-ehr.com/forums/showthread.php?15-REBOL-DOCUMENTAION-suggestions-for-improvement/page2#post133
Henrik
13-Feb-2010
[9572]
Posted a response.
Graham
13-Feb-2010
[9573x2]
This "with	The with block allows you to specify any other type of 
face characteristic using standard REBOL object format."


is therefore incorrect as it does not allow one to set the offset.
http://www.rebol.com/docs/view-guide.html#section-78
Henrik
13-Feb-2010
[9575x2]
it's not incorrect. it's specifying offset alright. it's just being 
overridden later in the face setup during layout. :-)
one could imagine an additional layout mode, where the cursor doesn't 
move, and therefore the offset from 'with would be applied correctly, 
but really, 'at is the shortest option to type of all.
Graham
13-Feb-2010
[9577]
I would have thought the layout engine sets the offset before it 
sees the 'with ...
Henrik
13-Feb-2010
[9578]
it does so internally for the cursor, but the cursor position is 
not applied to the face until after the specs are in place.
Graham
13-Feb-2010
[9579]
VID was a revolution at the time of its invention .. but we hope 
that it will be soon superceded by R3 GUI  and we won't have to worry 
anymore :)
Henrik
13-Feb-2010
[9580]
yes, true
Graham
13-Feb-2010
[9581]
Few languages can lay claim to inventing new ways of doing things 
..  we just still need to prove it's viable :)
Henrik
13-Feb-2010
[9582]
VID was never really finished. That's its only problem.
Graham
13-Feb-2010
[9583]
That could indicate a deficiency in the method of dialecting visual 
interfaces .. it's just not flexible enough
Henrik
13-Feb-2010
[9584]
No, the dialect is simply a tool for building a face tree and it 
can be as complex as we want. Same in the R3 GUI.


How that face tree is otherwise managed during runtime (resizing, 
events, etc.) is up to other functions that exist elsewhere in VID, 
long after the role of the dialect is gone. What the VID Extension 
Kit does is add keywords for resizing and a few other elements, so 
the face tree holds a bit more information.


The resizing system is then used later to perform adjustments to 
the face tree, when you resize the window. That's just one example 
of doing only minor modifications to the dialect itself.
Graham
13-Feb-2010
[9585x2]
So, where is it failing?
Pareto failure?
Henrik
13-Feb-2010
[9587]
It's all the "meat" that comes after using the dialect to generate 
the face tree. There just isn't enough functions to manipulate the 
face tree. VID is almost a misnomer in this sense, because the dialect 
only performs the very first part of controlling the UI. The rest 
is up to the meat.
Graham
13-Feb-2010
[9588x2]
I wonder why we can't build eg native windows guis the same way
It's been many years since I've used an IDE, but I recall selecting 
widgets and placing them on a screen, setting the Z order, and various 
properties for certain events.  Isn't VID just a RAD tool for doing 
this in a dialect ...
Henrik
13-Feb-2010
[9590]
yes, and also for doing layouts programmatically, which you can't 
with a point'n'click IDE.
Graham
13-Feb-2010
[9591]
How often are you doing that though?
Henrik
13-Feb-2010
[9592]
it's a very nice feature for doing certain lists and face-constructs 
(part of the VID Extension Kit)
Graham
13-Feb-2010
[9593]
Presumably in a completed GUI we wouldn't need to generate anything 
on the fly
Henrik
13-Feb-2010
[9594]
Actually you would, and I'd hate to lose that ability.


http://rebol.hmkdesign.dk/files/admin.png<- the view in the center 
is built like that as well as the dynamic lists in the right hand 
side with the popups in them.
Graham
13-Feb-2010
[9595]
You're saying that you couldn't prebuid that?
Henrik
13-Feb-2010
[9596x2]
that would be a complete nightmare to do
This is not obvious with VID, because you might build such a layout 
in a special setup, but in the VID Extension Kit, you have face constructs. 
A face construct is simply a style that accepts a particular dialect 
as input. The dialect is parsed into VID which then in turn generates 
an internal face tree. This means you can build styles that do something 
like:

view layout [
	paper [
		size a4
		dpi 300
		at 20x20 image bay.jpg
	]
]


The point is that every time you feed the paper new data, using SET-FACE, 
it's re-rendered from scratch using VID.


You can also build very complicated list views that dramatically 
change appearance and number of faces, every time you feed it new 
data.
Graham
13-Feb-2010
[9598x2]
The issue is that VID makes many things simple and so is very enabling 
in that respect.  But difficult things are close to impossible for 
seasoned users ...
Even now I see that having a true rich text we can type with is not 
possible in R3 gui
Henrik
13-Feb-2010
[9600]
That's incorrect. Who's spreading this information?
Pekr
13-Feb-2010
[9601]
I think noone is. It is just a guess, based upon a fact, that none 
such usable rich-text editor appeared yet :-)
Henrik
13-Feb-2010
[9602]
I'm getting tired of hearing that if something is currently not there 
in the R3 GUI, it's completely impossible to do. Sorry.