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

World: r3wp

[View] discuss view related issues

Steeve
29-Sep-2009
[9193]
face/edge is an object, not a block
BenBran
29-Sep-2009
[9194x2]
Thanks Steeve.  That did the trick.
question:  Why did I not have to 'make the edge initally?
Steeve
29-Sep-2009
[9196x2]
ahah, i was waiting for that question
because the lo block you constructed contains a dialect, not rebol 
code.

When you call the layout function, the dialect is processed and the 
values [edge [...]] are translated to code [face/edge: make face/edge 
[...]]
BenBran
29-Sep-2009
[9198]
Thanks.  I'll let the brain gears process this for a while.
Steeve
29-Sep-2009
[9199]
you can see the source of the layout function to have an idea of 
how the dialect is processed.

But layout is an obfuscated function with too much dependencies with 
other hidden functions.

It's rather difficult to have a whole understanding of how it works.
It reclaims several years of training.
BenBran
29-Sep-2009
[9200]
Then is something like this possible? or does the layout function 
always take input either at that location or the 'edge word as dialect? 
 I guess the question could be... how do we know if we are creating 
code or dialect and does it matter?


view layout [text 100x100 "Hello" edge: make/edge [size: 25x25 color: 
0.0.255 effect: 'bevel]]
Steeve
29-Sep-2009
[9201]
To see if you can, just try it (in your case it fails).
Henrik
29-Sep-2009
[9202]
it won't work, because the edge is not a dialect keyword outside 
of 'with.
BenBran
29-Sep-2009
[9203x2]
Sorry.... should have put the ';; <---- fails' comment next to the 
line.   Hence the rambling questions....
Henrik, that makes sense.  I'll look for docs on the 'with word. 
Thanks.
Henrik
29-Sep-2009
[9205]
Ben, see private message.
james_nak
29-Sep-2009
[9206]
Thanks. That opens my eyes to what I refer to as Rebol Voodoo. One 
can easily forget the relationship between a dialect and Rebol. Good 
stuff.
Steeve
29-Sep-2009
[9207]
It's the central point with Rebol, when a function is accepting a 
block as input, you can't  guess if it will be processed as pure 
rebol code, list of data, or as a dialect (mixed data and commands).
Data is code, Code is data. Never forget.
james_nak
29-Sep-2009
[9208]
Are you kidding? It took me a long time before I stopped turning 
everything into a string with my own functions! :-)
Steeve
29-Sep-2009
[9209x2]
i meant you can't guess until you read the documentation of a specific 
function.
'help and 'source are they magic keys.
*the magical key
james_nak
29-Sep-2009
[9211]
Oh, I like the feeling when I can say "Oh, that's how it works." 
And then there's anamonitor. I can't tell you how many times I've 
gone back and forth with that tool. :-)
BenBran
29-Sep-2009
[9212]
source.... I keep forgetting about that command.  thanks for the 
reminder.
amacleod
4-Oct-2009
[9213]
Having trouble changing the data in a drop-down list...

mylist/list-data: new_stuff 
show mylist

works the first time but not there after
Maxim
4-Oct-2009
[9214]
you must clear /append in the same original block  :-)
amacleod
4-Oct-2009
[9215]
Sorry, not sure what you mean
Maxim
4-Oct-2009
[9216]
you should clear the original block you supplied to the drop down 
list, and then append new items to it.  that should work.
amacleod
4-Oct-2009
[9217]
new_stuff: copy []
foreach book books [append new_stuff book]

If this is what you mean, I'm doing it...
Maxim
4-Oct-2009
[9218]
I'll write you up an example... its easy you'll see.
Graham
4-Oct-2009
[9219]
insert clear head mylist/list-data new-data
Maxim
4-Oct-2009
[9220x4]
it uses texts...
rebol []

items: []


dark-colors: ["Blach" "Navy Blue" "Blood red"]
light-colors: ["Gray" "Cyan" "Pink"]

append items dark-colors


view layout [
	drpdn: choice with [texts: items]
	do [
		probe drpdn/init
		probe drpdn/words
		probe drpdn/multi
		probe drpdn/feel
	]
	toggle "hi" "low" [
		clear items 
		append items either face/data [light-colors][dark-colors]
	]
]
you can also replace face/texts directly I think...
I left the old "do" trick which allows one to easily scan a face 
to look up how it works... not sure many realize they can do this.
amacleod
4-Oct-2009
[9224]
I was hoping to use the 'drop-down' style (not choice)...is there 
a difference with the function?
Maxim
4-Oct-2009
[9225]
same thing... just replace choice by drop down
amacleod
4-Oct-2009
[9226x3]
bingo! Thanks...

why does newstuff: copy [] not work here?
never mind
I got it
Janeks
22-Oct-2009
[9229]
Hi!

I am trying to get running SoftInnov's captcha on my Linux.
Documentation tels that it is :

DRAW based : doesn't require View engine, just DRAW (can run with 
/Command on UNIX without Xlibs installed). 

But it seem is not right commandline switch - I am getting any way 
library errors.
Is it the right commandline switch?
Or do I need any way those linux libraries?
P.S. I also tried -v
Dockimbel
22-Oct-2009
[9230]
/Command is not a command line switch, it's a REBOL product : http://rebol.com/command.html.
/Command is also included in REBOL/SDK.
Janeks
22-Oct-2009
[9231]
So it could not run with rebview?
:(
Henrik
22-Oct-2009
[9232]
you need a range of libraries to run it with View. it works fine 
with View.
Dockimbel
22-Oct-2009
[9233]
Sure it can run with rebview but rebview requires Xlibs to be installed.
Janeks
22-Oct-2009
[9234x2]
I already added all libs, but it says "Could not connect to X server"
:(
On my server there are no X, they have even no any hardware video 
connectors.
Henrik
22-Oct-2009
[9236]
that shouldn't be necessary. I run it fine on a headless Linode server.
Janeks
22-Oct-2009
[9237x2]
So I have all needed libs:

ldd /usr/bin/rebol

        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0ff67000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x0fe34000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x0fe00000)
        libXt.so.6 => /usr/lib/libXt.so.6 (0x0fd7f000)
        libXaw.so.6 => /usr/lib/libXaw.so.6 (0x0fd16000)
        libXmu.so.6 => /usr/lib/libXmu.so.6 (0x0fcdc000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x0fbf3000)
        libm.so.6 => /lib/tls/libm.so.6 (0x0fb5a000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0x0fb36000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0fb03000)
        libc.so.6 => /lib/tls/libc.so.6 (0x0f98f000)
        libz.so.1 => /usr/lib/libz.so.1 (0x0f959000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x0f936000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0f910000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x0f8e6000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x0f8ac000)
        /lib/ld.so.1 (0x48000000)

Now when i fire it:
rebol -v
** User Error: REBOL: Cannot connect to X server

** Near: size-text self

The same with -cs - in that case it just gives second line...
could it be connected with that fact, that it is ppc version of Rebol 
& Linux?
Henrik
22-Oct-2009
[9239x2]
I don't think that's the problem
the problem could be that REBOL is trying to open the desktop
Janeks
22-Oct-2009
[9241]
Does the command switch -v and -c does not prevent that?
Henrik
22-Oct-2009
[9242]
Can't see the command line switches...