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

World: r3wp

[Plugin-2] Browser Plugins

JoshM
6-Jun-2006
[985x2]
Reichart: Actually, when I click on a .r file for download and press 
"Open", it launches View but doesn't open the file. Why? I have no 
idea. It looks like two things need to happen:

 1. Download should not trigger Open or Save -- this can be accomplished 
 by registering a MIME-Type handler upon EXE install.

 2. It should actually open the file -- maybe the EXE's not picking 
 up on the Open request for some reason.


These are legitmate issues, but they all relate to the REBOL EXE. 
I'm sorry, but it's just not my area. You'll have to pass this feedback 
along to Carl or whoever owns the Windows EXE development for R3.0.
Or maybe you mean clicking on a .r file on the local computer? Again, 
that's the responsibility of the EXE to register itself as the MIME-type 
handler.
Volker
6-Jun-2006
[987]
On network its related to the server too. usually it says *.r is 
text/plain. with application/x-rebol it launches rebol IIRC (clicked 
here and there and now does something else anyway).
JoshM
6-Jun-2006
[988]
Yes, again, please pass that feedback on to whoever owns the EXE.
Volker
6-Jun-2006
[989]
yup, wrong group.
Pekr
6-Jun-2006
[990]
as for browser mime-types, e.g. in Mozilla, you can add your own 
ones, e.g. application/x-rebol and point it to exe. Then it will 
work imo ONLY when web server sends it with that mime type. In other 
case, it will imo provide you with save-as dialog box ...
Volker
6-Jun-2006
[991x2]
usually shows source. you get save-as/execute with application/x-rebol.
(but view-group? its exe)
[unknown: 9]
6-Jun-2006
[993]
Lets come back to my original statement "I can't wait to be able 
to click on a ".r" file and have it just pop up and go."


You seem to be getting side tracked with assumptions or something.


Q: Reichart: Actually, when I click on a .r file for download and 
press "Open", it launches View but doesn't open the file. Why? I 
have no idea. It looks like two things need to happen:


A: And what should happen, and what 60-90 people will expect to happen 
if this is to be "part of the web" is that it does exactly what Flash 
did (which is now part of FF), and most other plug-ins do, which 
is ask you if you want to install a Rebol plug in.


If the person says yes, then it does its thing, goes back to the 
original .R file, and pulls it in and runs it.


If you are a nerd, you can go screw with your settings to make it 
first ask you if you want to:
O View source 
O Run now


Q: These are legitmate issues, but they all relate to the REBOL EXE. 
I'm sorry, but it's just not my area. 
A: No, it seems this is 100% the plug-in. 


Let me ask a different "set" of questions that might make this all 
easier?


When will we all be able to click on a ".r" file (and by .r I mean 
a link that is actually a wrapper with all the crap needed to know 
what to do), and it will ask you to install the plug-in, handle all 
that crap, and it will go back and get the .r file and run it?
Volker
6-Jun-2006
[994x3]
launches View but doesn't open the file

 here it launches, IIRc it did that immediate without me setting something 
 (now i prefer editor by  default, so cant check).

and by .r I mean a link that is actually a wrapper with all the crap 
needed to know what to do

 AFAK that is some html-markup, not *.r-created. On IE the plugin 
 installs automatically, on firefox that will come.

And plugins and mime are two things, plugins run inside the browser 
and need some marku (AFAIK), mime-types are launched by  external 
apps (rebol if the server says its application/x-rebol)
from http://www.rebol.net/plugin/tests/test.html: <OBJECT ID="RPluginIE" 
CLASSID="CLSID:9DDFB297-9ED8-421d-B2AC-372A0F36E6C5"

CODEBASE="http://www.rebol.com/plugin/rebolb5.cab#Version=0,5,0,0"
WIDTH="360" HEIGHT="444">

   <PARAM NAME="LaunchURL" value="http://www.rebol.net/plugin/tests/test.r">
   </OBJECT>
although, thinking about  it, i guess a plugin can catch mime-types 
too.
JoshM
6-Jun-2006
[997x2]
Reichart, I think I understand where our confusion lies.
There are two distinct issues that we need to seperate:
	1. "Automatic" installation of the plugin.

 2. Detecting and running a .r file. And by ".r" file, I mean a link 
 to a REBOL source file -- NOT a wrapper page or anything else (that 
 is really HTML and not a .r file).
[unknown: 9]
6-Jun-2006
[999]
Yup....now, when will we have flash like complete plug-in support?
JoshM
6-Jun-2006
[1000]
To simplify the issue, let me pose a scneario. Joe has a fresh copy 
of XP, no REBOL nothing. He clicks on a .r file. You want the plugin 
to install itself and open the .r file inside the browser window. 
Am I understanding your goal?
[unknown: 9]
6-Jun-2006
[1001]
To simplify the issue, let me pose a scneario. Joe has a fresh copy 
of XP, no REBOL nothing. He clicks on a .r file. You want the plugin 
to install itself and open the .r file inside the browser window. 
Am I understanding your goal?


No, I want it wrapped.  The ".r" is simply a reference point, since 
we don't have a word for a Rebol executable script.  Want to call 
it ".rrs" (Rebol run script) or something?  Flash calls theirs SWF, 
FLV, etc.
JoshM
6-Jun-2006
[1002x2]
Ahh OK I understand. Well....we can look at developing something 
like that.
However, I don't understand why the current approach doesn't work 
for you. Why not just make a HTML page that has the plugin OBJECT 
tag, it will download, install automatically, and then run the .r 
script.
[unknown: 9]
6-Jun-2006
[1004]
Do you have a link to a page where I can test this now?
JoshM
6-Jun-2006
[1005]
Every plugin page works that way. When you include the OBJECT tag 
mentioned above, it downloads, installs automatically (with user 
permission), and runs the .r file in LaunchURL.
Davide
6-Jun-2006
[1006x2]
Using Object or Embed tag is the only way to tell the browser to 
download plugins. This is the default behaviour and IMHO Rebol plugin 
should follow it. No more, no less.
If newer versions of the plugin aren't compatible with previous, 
should have different classid. So I can (as webmaster) decide which 
version use.
JoshM
6-Jun-2006
[1008]
Davide: Agreed. That is our approach. I'm open, however, to alternative 
ideas, if there is a realistic justifiable scenario.
Davide
6-Jun-2006
[1009]
Josh is it possible to call rebol function from javascript ? i.e. 
expose a function "eval" so when I click an html button I can call 
a rebol function.
JoshM
6-Jun-2006
[1010]
Davide: Interesting idea. Didn't think of that direction. We'll add 
it to the proposed feature list....if others want this feature please 
chime in.
Davide
6-Jun-2006
[1011]
If this is possible, I could build html interface and use rebol instead 
of javascript and ajax.
JoshM
6-Jun-2006
[1012]
Can you give me a little more detail on a proposed scenario so we 
can see how compelling this is?
[unknown: 9]
6-Jun-2006
[1013]
Do you have a link to a page where I can test this now?
JoshM
6-Jun-2006
[1014]
Reichart: http://www.rebol.net/plugin/tests/test.html
Terry
6-Jun-2006
[1015]
how about Firefox? Safari?
Davide
6-Jun-2006
[1016]
Using Internet Explorer 

Init with:

var rebPlug = new ActiveXObject("Rebol.Application");
rebPlug.LaunchURL="http://site/script.r";

After use it in html something like:


<input type="button" value ="Execute" onliclick="rebPlug.eval('myrebcode 
[a b c]') />
JoshM
6-Jun-2006
[1017]
An improved Mozilla installation experience is coming, no promises 
on when. The effort we put into this is directly determined by how 
many "novice" Mozilla users there are. Most Mozilla users tend to 
be computer-savvy, so it might not be worth the effort for a super-seamless 
install. Thoughts?
Terry
6-Jun-2006
[1018x2]
Simple installation is foremost .. that's the main reason of having 
a plugin
otherwise they could just download and run the actual application
JoshM
6-Jun-2006
[1020x2]
True. OK, we'll look more into this.
Davide: that Javascript is interesting, did you get that to work 
now?? (I'm just curious :))
Davide
6-Jun-2006
[1022]
.. actually I didn't tried, I used object tag and polling from rebol 
to detect keypress in html :-)
JoshM
6-Jun-2006
[1023]
Okay, we'll toss that Javascript -> REBOL idea in the cooker. Thanks 
for bringing it up.
Davide
6-Jun-2006
[1024x2]
I hope that it will works because MS is changing the way object tag 
works in IE, isn't it ?
thanks to you Josh
[unknown: 9]
6-Jun-2006
[1026x3]
An improved Mozilla installation experience is coming,


Ok.................so this answers my entire set of questions................... 
 my entire team uses FF.
For some reason I was under the impression that this whole thread 
was about making Rebol finally work on IE FF SA and OP.
Like Flash.
JoshM
6-Jun-2006
[1029x2]
Aaahhh gotcha. Sorry for the confusion.
Yes, we're working on Mozilla support.
[unknown: 9]
6-Jun-2006
[1031]
Being out of sync with each other can account for a lot misunderstanding..


I have but one interest, for Rebol to be a self standing usable glue 
for cool little apps on the web the same way Flash is for little 
animated vignettes.


For this to happen we HAVE to support the top 4 (IE FF SA and OP). 
 And Opera is about to GROW, and Rebol and Opera may turn out to 
be a match made in heaven.  Opera is the dominate browser of imbedded 
systems.  It will start making news in the next 4-6 months.
JoshM
6-Jun-2006
[1032x3]
Hmm interesting you say that. I was thinking about that myself, as 
I have also fallen in love with Opera, but it currently has pathetic 
plugin support (it doesn't even support the Mozilla standard, only 
the ancient Netscape 4 API).
So, we're going to have to make a decision of whether to support 
Opera or not.....
And that's good feedback to have.