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

World: r3wp

[Plugin-2] Browser Plugins

Janeks
27-Sep-2006
[1776]
I can't get  to run new version of my script in my web page.

I am changeing version numbers to the same at the both ends (html 
page and script) - no success.?
What else could I missed.
Anton
27-Sep-2006
[1777]
(That took me a while... I don't have ActiveX controls enabled in 
Firefox, so I had to install the plugin manually from the zip provided 
for Opera.)
Cyphre
27-Sep-2006
[1778]
Janeks: read this page carefully:
http://www.rebol.com/plugin/install.html


and try to install the latest plugin automatically. Let us know if 
you have any problems.
Janeks
28-Sep-2006
[1779]
I reinstall plugin but it is the same - here some more explanation:

I can not to get to run the new version of script in rebol plugin 
- always getting old version, despite I changed version values in 
both files (web page and script)

Yestrday I solved it so that I saved script with new name - than 
it worked - I could by changing version values run new version of 
script in plugin.
But today with the same file can not.

I have web page for plugin:
>>>>>>snip<<<<<<<<<<<<<
<html>
  <head>

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-10">
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PRIVATE">
  </head>
  <body bgcolor="#FFFFFF">

<OBJECT
ID="RPluginIE"
CLASSID="CLSID:9DDFB297-9ED8-421d-B2AC-372A0F36E6C5"

CODEBASE="http://www.rebol.com/plugin/rebolb7.cab#Version=1,0,0,0"
WIDTH="240"
HEIGHT="85"
BORDER="1"
ALT="REBOL/Plugin"></center>
<PARAM NAME="LaunchURL" value="rmapsconsole03.r">
<PARAM NAME="Version" VALUE="1.5.0">
</OBJECT>
  </body>
</html>
>>>>>>>>>>>>>>snap<<<<<<<<<<<<<<<<

and script in the same directory

>>>>>>>>>>>>>>snip<<<<<<<<<<<<<<<
REBOL [
	Title: "Rebol Web Kartes"
	Version: 1.5.0
	Author: "Janeks Kamerovskis"
]

mapsize: 400x300
imgType: "JPEG"

mainWin: layout [
	t1: text "AAA"
	button 200x20 "Atvçrt" [
		do smoething
	]
	do [
		t1/text: "Text changed"
		show t1
	]
]

view mainWin
>>>>>>>>>>>>>>snap<<<<<<<<<<<<<<
Oldes
28-Sep-2006
[1780]
the new plugin has problems with relative paths - try to add full 
path to your script
Janeks
28-Sep-2006
[1781]
Ups - finaly I got what was wrong - if you used in the past larger 
verion numbers - it is not good idea to reset them back to smaller.
Soory for disturbance!
Gregg
28-Sep-2006
[1782x2]
You mean the version in your script header?
Or the version in your HTML page?
Louis
12-Oct-2006
[1784x2]
I get the following error message:

** Syntax Error: Script is missing a REBOL header
** Where: do-thru
** Near: do/args url arg
>>

but there is a valid rebol header. What could be causing this?
Here is the script that is being called:

REBOL []
print "What?"
ask "Continue?"
Allen
12-Oct-2006
[1786]
How is it being called? Why is it going via do-thru?, is the script 
(cached by do-thru) exactly the same as the remote one?
Louis
12-Oct-2006
[1787x5]
Here is the script that calls it:

<HTML><HEAD><TITLE>Test - REBOL Plugin Demo</TITLE>

<script language='javascript' src='http://127.0.0.1:1026/js.cgi?pca&r=28703'></script>
</HEAD>
<CENTER>
<H1>Test - REBOL Plugin Demo</H1>

<OBJECT ID="REBOL_IE" CLASSID="CLSID:9DDFB297-9ED8-421d-B2AC-372A0F36E6C5"

    CODEBASE="http://www.rebol.com/plugin/rebolb7.cab#Version=1,0,0,0"
WIDTH="360" HEIGHT="442" BORDER="1" ALT="REBOL/Plugin">

<PARAM NAME="LaunchURL" value="http://localhost/slideshow/test.r">
<PARAM NAME="bgcolor" value="#ffffff">
<PARAM NAME="version" value="1.0.2">
</OBJECT></CENTER></BODY></HTML>
<script language='javascript'>postamble();</script>
I'm running Cheyenne so I can test the plug in on my local computer.
I don't know about the caching question. How do I check that?
Sorry for the delays in answering. I'm paying by the minute, so have 
to log off while waiting for people to answer.
I just deleted all off-line content cached by Internet Explorer. 
The problem remains.
Anton
12-Oct-2006
[1792]
You would examine the cached file using:
	editor path-thru http://localhost/slideshow/test.r
But let us see what this returns:
	print read http://localhost/slideshow/test.r
Louis
12-Oct-2006
[1793x2]
editor path-thru http://localhost/slideshow/test.r


brings up an erro message saying the file cannot be read (perhaps 
because it doesn't exist?)

print read http://localhost/slideshow/test.rreturns 

>> print read http://localhost/slideshow/test.r
connecting to: localhost
What?
Continue?
>>

>> print read http://localhost/slideshow/test.r
connecting to: localhost
What?
Continue?
>>>> print read http://localhost/slideshow/test.r
connecting to: localhost
What?
Continue?
>>>> print read http://localhost/slideshow/test.r
connecting to: localhost
What?
Continue?
>>
Whoops! a few repeats there; I pasted too many times.
Anton
12-Oct-2006
[1795x3]
exists? path-thru http://....
probe info? path-thru http://...
But that "What? Continue?" doesn't look right to me :)

Try 127.0.0.1 instead of localhost and see if that makes a difference.
Louis
12-Oct-2006
[1798x2]
>> exists? path-thru http://localhost/slideshow/test.r
== false
>> probe info? http://localhost/slideshow/test.r
connecting to: localhost
make object! [
    size: 15
    date: none
    type: 'file
]
>>
127.0.0.1 makes no difference.
Anton
12-Oct-2006
[1800]
Right, well, it looks like it is not a plugin issue, but a url or 
webserver issue.
Louis
12-Oct-2006
[1801]
OK, thanks.
Anton
12-Oct-2006
[1802]
Have you tried opening that url in a browser ?
Louis
12-Oct-2006
[1803]
Yes, that is when I get the error message. First the web page displays 
with a box containing the message REBOL/Plugin 2.6.6.3.1, then a 
REBOL/ViewDLL window pops up with the error message.
Anton
12-Oct-2006
[1804x2]
No I mean directly opening that url in a browser, eg:

browse http://localhost/slideshow/test.r
It seems to me that reading this url is not getting the rebol script 
that you are expecting, so of course the plugin is going to fail 
when you direct it to it.
Anton
13-Oct-2006
[1806x3]
I expected your console session to look like this:

>> print read http://localhost/slideshow/test.r
connecting to: localhost
REBOL []
print "What?"
ask "Continue?"
>>

and not this:

>> print read http://localhost/slideshow/test.r
connecting to: localhost
What?
Continue?
>>
You're using Cheyenne as the web server, so probably Cheyenne is 
doing the rebol script as it would to support Rebol Server Pages.
You should look into Cheyenne's options regarding Rebol Server Pages 
and see it there's a way to disable it for certain scripts.
Louis
13-Oct-2006
[1809x2]
Anton said: 

No I mean directly opening that url in a browser, eg:

browse http://localhost/slideshow/test.r


OK, that works! Would you believe it? I was doing the same thing 
wrong that I did earlier.  I misunderstood the reason behind it. 
Anyway this does not appear to have been caused by Cheyenne, but 
merely by my ignorance. Anton, thanks again for your help!
No, I spoke too soon. http://localhost/slideshow/test.ris the plug 
in script.  

http://localhost/slideshow/SlideShow2.htmlstill gives the error.
Anton
13-Oct-2006
[1811]
What does 
	browse http://localhost/slideshow/test.r
give you ? What is shown in the browser ?
Louis
13-Oct-2006
[1812]
What? Continue?
Dockimbel
13-Oct-2006
[1813x5]
.r files are treated as CGI script by default in Cheyenne. To change 
that, you have to edit the httpd.cfg file and change the following 
line :
bind-extern CGI to [ .cgi .r ]
to
bind-extern CGI to [.cgi]
So .r files will be treated as static ressources.
Graham
13-Oct-2006
[1818]
so change the extension ?
Louis
13-Oct-2006
[1819x7]
Doc, thanks. My test script now runs.
However, when I try to run my slideshow script, the plugin is unable 
to load the data file.
Ok, I put the data into the script as a block of blocks, but now 
the plugin cannot load the image files.


Am I at a deadend here? or is there still a way to make this work?
Simplicity is turning complicated.
If I use to-binary to convert an image to a binary string that can 
be stored in the View script, how can I then display it? 

image to-image binary-string 

doesn't work.
I remember seeing a script that did this once, but I don't remember 
which script it was. One of Carl's perhaps.
build-pack.r from the library seems to be just what I need.