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

World: r3wp

[View] discuss view related issues

Gabriele
3-Apr-2007
[6888x2]
i haven't checked the recent versions... but browse used to just 
call /usr/bin/netscape (or variants of that) on unix.
you could strace rebol while using browse to figure out what's going 
on.
btiffin
3-Apr-2007
[6890]
Gabriele: Thanks... trying...
strace -f didn't show me much.
I then tried

cp konqueror netscape   in /usr/bin/  as root  and it definetly changed 
something cause now I'm getting 
sh: -c: line 0: unexpected EOF while looking for matching `"'

On the right track it seems...
Thanks.
Alan
3-Apr-2007
[6891]
doing a search found this : Brian: browser for  Rebol/View >1.2.1 
set-browser-path "path/to/firebird -url "

for Rebol/View 1.21 (may not work on linux): append clear netscan/def-browser 
"path/to/firebird -url "
btiffin
3-Apr-2007
[6892]
Alan;  I think set-browser-path has been deprecated (or at least 
hidden from public REBOL word lists) for security reasons.  My 2.7.5.4.2 
doesn't expose that word.  But thanks.  All pointers will help.
Alan
3-Apr-2007
[6893]
guess so as I have not been able to get it working on the Amiga either 
:(
btiffin
3-Apr-2007
[6894]
I'm lucky and have a fire-and-forget brain.  I solved this problem 
(with the help of others) on an older Debian 3.1 box.  And I forget 
how it was done.  If we are patient, one of the guru's will give 
us that little tidbit that gets the problem solved.   For what it 
is worth this is the hack I've been using.

linux?: equal? fourth system/version 4
if linux? [
    attempt [unprotect 'browse]
    browse: func [value [any-string!] /only] [
	    call reform ["konqueror " rejoin [{"} value {"}]]
    ]
]
Alan
4-Apr-2007
[6895]
thanks will try that with the Amiga/Mandriva
Henrik
9-Apr-2007
[6896]
does anyone ever get "Bad font style!" when setting fonts in a VID 
layout under Windows? The same layout does not cause errors under 
MacOSX.
Ammon
9-Apr-2007
[6897]
I've seen that error but I don't recall the solution. :(
Anton
9-Apr-2007
[6898]
what is the font style ?
Ashley
10-Apr-2007
[6899]
Note that there is a subtle difference between:

	style: none

and:

	style: 'none

I've been caught by this a few times.
Henrik
10-Apr-2007
[6900x5]
view layout [backdrop white at 100x664 pad 0x-28 text "Xcv"
    left
    400 font [
        style: [none none]
        name: "Arial"
        size: 40
        offset: 0x0
    ] para [origin: 0x0 margin: 0x0 indent: 0x0] pad 0x28
    at 0x0 box 0x0 effect [draw []]
]
OSX doesn't seem to bother with it and provides the correct layout.
I know the style block seems it may not be reduced, but the original 
code is:

font-block: compose/deep [
  style: [(all [italic 'italic]) (all [bold 'bold])]
  name: (name)
  size: (size)
  offset: 0x0
]
it is the style that's causing it, but still don't understand why 
it works correctly under OSX...
is it possible to merge the face text with an effect to, say, rotate 
the text 90 degrees?
Rebolek
10-Apr-2007
[6905]
only AGG text. Or you have to render text to bitmap (to image! face 
...) and then use the bitmap.
Henrik
10-Apr-2007
[6906]
OK, that does it. I'm going to try imagemagick anyway and see if 
I can get that working.
Gregg
10-Apr-2007
[6907]
ImageMagick works well. I've only needed and done simple stuff with 
it--it's so feature rich and complex, I don't have time to dig in 
and do fancy stuff.
Henrik
10-Apr-2007
[6908]
well, it won't work here now since I read it requires ghostscript 
to do what I need. I'm not going to balloon a 130 k script to 30 
Megs, just for that :-)
Gregg
10-Apr-2007
[6909]
Yeah, that's a pain. Actually, the only reason I use IM is because 
REBOL can't save JPGs out and they don't want to use PNGs.
Anton
10-Apr-2007
[6910x4]
Henrik, maybe try putting bold before italic.
Actually, I get this on WinXP:
>> view layout [text font [style: [none]] "hello there"]
Bad font style!
Bad font style!
Bad font style!
Bad font style!
When using COMPOSE, a paren shrinks to nothing when it returns UNSET! 
 This is what you need to avoid those 'none words appearing in the 
result block.
bold: true    italic: false 

compose/deep [style: [(either bold ['bold][]) (either italic ['italic][])]]
;== [style: [bold]]
Maxim
20-Apr-2007
[6914x3]
I just discovered that a face with a rate, once shown, will trigger 
time events even if its not within any face, and even calling hide 
on it does not seem to stop its events!  you need to set its rate 
to none and call show on it (even though its not visible in anyway, 
since its not within any window !)
this is a bit strange.
and I am sure it has been the source of many dumbfounded looks for 
many of us in the past!
Pekr
20-Apr-2007
[6917]
Maxim - isn't that a known fact? But for those things, talk to Cyphre, 
he has some experience there iirc.
Maxim
20-Apr-2007
[6918]
it might be known.. but its not obvious or common... I was simply 
stating it here, for those who might not be aware.
Cyphre
20-Apr-2007
[6919x3]
Maxim: this is a known fact. I think it is better to have full control 
on timer than not be able to have backgound timers running.
Here is an example of proper timer handling:
view l: layout [
	b: box red with [
		rate: 1
		feel: make feel [
			engage: func [f a e][
				if e/time [
					print ["tick" now/time]
				]
			]
		]
	]
	button "hide" [
		print "hide"
		hide b
	]
	button "show" [
		print "show"
		show b
	]
	button "remove" [
		print "remove"
		if face: find l/pane b [hide face/1 remove face show l]
	]
	button "add" [
		unless find l/pane b [
			print "add"
			append l/pane b
			b/show?: true
			show l
		]
	]
]
Maxim
20-Apr-2007
[6922x2]
its just that I am working with a multi-pane application which have 
timers and (obviously) we only want to refresh what is actually withing 
windows... what happens is that eventually, all the panes start kicking 
out timers!  (and I need the time event to be local to the actual 
face to relate its animation ... otherwise, I'd cross the animation 
from one pane to another ! :-)
so I just added a little bit of "stop timer" handling on top of the 
"show pane" handling.. it works.. its just not obvious that an invisible 
pane (actually not within a window's pane structure) can still receive 
events. 


 I agree that the feature IS usefull.  maybe it should be more obviously 
 documented (next to the note in the docs that a show is required) 
 that timers trigger even if faces are hidden and event if not actually 
 displayed...
Anton
22-Apr-2007
[6924x3]
I didn't think it would be so much effort to implement a "simple" 
menu.
do http://anton.wildit.net.au/rebol/gui/demo-menu.r
Menues have so many little features in them... With this one I made 
a decision to severely limit the layout possibilities. It's a "standard" 
menu based on the one I can see in Crimson Editor here on XP.
Gregg
22-Apr-2007
[6927]
I get this:

connecting to: www.lexicon.net

Include: Couldn't load-thru http://www.lexicon.net/antonr/rebol/gui/menu.r
** Script Error: menu-style has no value
** Where: do-facets
** Near: menu-style
Graham
22-Apr-2007
[6928x3]
he's not at lexicon.net anymore ... must be old cold
code
a domain costs US$5/year ... sometimes it's worth it!!
Anton
22-Apr-2007
[6931x6]
I'm with you, Graham.
Chris had same trouble. Problem is at rebol.net. I think since the 
server crash, the Sites rebsite index reverted to an old one. I also 
can't update it at the moment because the cgi updater hasn't been 
restored yet either.
This fixes the rebsite index temporarily:
; Needed until rebol.net Sites rebsite index is updateable and updated.
old: as-string read-thru http://www.rebol.net/reb/index.r

replace (new: copy old) "www.lexicon.net/antonr" "anton.wildit.net.au"
write/binary path-thru http://www.rebol.net/reb/index.rnew
Now try again.
do http://anton.wildit.net.au/rebol/gui/demo-menu.r
Gregg
23-Apr-2007
[6937]
Same error here.