• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[Rebol School] REBOL School

afsanehsamim
23-Nov-2012
[1543x3]
i want to say if they are same print otherwise alert to user
yes
correct
Ladislav
23-Nov-2012
[1546x3]
So, you are doing something like:

foreach record results [
    if first record = second record [...]
]
Is that it?
correcting myself:

foreach record results [
    if (first record) = (second record) [...]
]
afsanehsamim
23-Nov-2012
[1549]
yes ,your right ... :) now if i want send meesage to user that value 
is correct or no ...should i use alert?
Ladislav
23-Nov-2012
[1550x2]
This is more likely the code you might use:

foreach record results [

    either (first record) = (second record) [print ["they are equal:" 
    first record]] [print ["Alert!"]]
]
ALERT is not meant for CGI, it is a GUI function.
afsanehsamim
23-Nov-2012
[1552x5]
yes
what are you suggesting in GUI?
sorry
CGI
?
Ladislav
23-Nov-2012
[1557x2]
So, no, if you are creating a CGI script, don't use ALERT
For CGI? I do not know, how about some blinking text, or red text, 
or, I do not know what people use...
afsanehsamim
23-Nov-2012
[1559]
okay...anyway tnx a lot for helping me.
Endo
11-Dec-2012
[1560]
I execute the following line and capture the HTTP packets using Capsa 
(or wireshark) I don't see any header information in the packets 
sent:
read/custom http://moldibi.com[header "X-hello:1"]


but when I run curl with same parameters, I can see the extra header 
information,
curl http://moldibi.com-H "X-hello:1"


does it mean I cannot add extra header information using REBOL or 
am I doing something wrong? (I'm using R2/View)
GrahamC
11-Dec-2012
[1561x4]
Use the 'header directive :)
oh .. you are!
http://www.compkarori.co.nz:8000/Protocols/Http

 read URL [ header [ Cookie: "authtoken=anotherfoo" ]]
Header expects a block
Endo
11-Dec-2012
[1565]
in default HTTP protocol or your version?
GrahamC
11-Dec-2012
[1566]
default http
Endo
11-Dec-2012
[1567x3]
oh yes!!! now I can see when trace/net on.
Thanks a lot!! Tomorrow I'll try with salesforce, I hope this is 
the only problem.
It's not written in any where in the REBOL documents. Even in Core 
PDF.
GrahamC
11-Dec-2012
[1570x3]
from my page "NB: Rebol2's existing prot-http currently supports 
this undocumented method using a 'header keyword"  :)
I think Gabriele mentioned this many years ago on the mailing list
That's why it is so frustrating having static documents .. that only 
one person can change. Wiki is better.
Endo
11-Dec-2012
[1573]
That's right. I read your page now. Thanks a lot, it will save my 
day.
Maxim
11-Dec-2012
[1574]
Endo,  a lot of stuff in rebol is learned by scanning the source 
code... and probing or using help on system and its members.


you can probe all the port handlers to see how they work, I still 
do this all the time... most of the very skilled Rebolers know , 
above all else, how to browse the rebol source included in the interpreter 
itself.
Endo
12-Dec-2012
[1575]
Finally I got it work with Salesforce, when I complete my work, I'll 
write a document for it, so I can save someone's hours.
Maxim
12-Dec-2012
[1576]
thanks, I might need to connect to salesforce myself in a few weeks. 
 :-)
GrahamC
12-Dec-2012
[1577]
Good idea .. share the knowledge
Geomol
20-Dec-2012
[1578x8]
I was asked for examples of the DRAW, I used to create the graphi
graphi
graphics in GCam.

The start of a button is:
img: make image! 88x88
img/alpha: 255

draw img [
	pen none
	fill-pen linear 0x0 0.0 88.0 90.0 1.0 1.0
		0.0.0 16.16.16 32.32.32
	box 0x0 88x88 14.0

	fill-pen linear 5x5 0.0 78.0 90.0 1.0 1.0
		102.102.102 10.10.10 10.10.10 10.10.10 0.0.0
	box 5x5 83x83 14.0
]

view layout [
	image img
]
The exposure symbol can be added with:
exposure: [
	translate -0.5 -0.5
	pen none
	fill-pen radial 44x44 0.0 44.0 0.0 1.0 1.0
		255.255.255
		249.249.249
		224.224.224 224.224.224
]
loop 8 [
	append exposure [
		shape [
			move 37x25
			curv 52x22 62x25
			curv 57x16 48x17
		]
		translate 44.5 44.5
		rotate 45.0
		translate -44.5 -44.5
	]
]
draw img exposure
It's the small detail, that makes it look prof. Next would be adding 
some blur maybe.
I'm not a graphical artist, and I have never used applications like 
Adobe Illustrator or similar. But I found, I can create ok graphics 
by programming it in e.g. DRAW and be very careful with the details. 
I do use GIMP for some tasks.
Kaj
20-Dec-2012
[1586]
Cool, an eye opener that it can be so short
Cyphre
20-Dec-2012
[1587]
Nice stuff Geomol...Most people doesn't even know what could be done 
with DRAW. DRAW has most of the capabilities advanced  vector(SVG) 
editors have under the hood. For R3 DRAW we need to make sure converting 
any complex SVG art is possible to render.
Henrik
20-Dec-2012
[1588]
There are still a few last bits in DRAW that are missing. I wonder 
if these are possible to add now? Something like making a gradient 
on a line would be very useful.
Gregg
20-Dec-2012
[1589]
That's wonderful John.
Endo
20-Dec-2012
[1590]
That is great Geomol, thank you for sharing it.
Cyphre
20-Dec-2012
[1591]
Henrik, I don't know how hard is to add gradient on line but you 
can 'emulate' it using textures. See this R2 example:


g: draw 100x10 [pen none fill-pen linear 0x0 0 100 0 1 1 red green 
blue yellow box 0x0 100x10]

view layout [origin 0 box 300x300 black effect [draw [pen g spline 
0x0 100x100 200x30 300x300 16]]]
Henrik
20-Dec-2012
[1592]
Cyphre, aha, thanks.