Rebol.org plugin testing
[1/7] from: SunandaDH::aol::com at: 7-Sep-2004 7:42
A follow-up to last week's thread ("Plugin question")
You can now run script in the Library under the REBOL browser plugin, eg:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/run-plugin.r?script-name=anamonitor
..r
or
http://www.rebol.org/cgi-bin/cgiwrap/rebol/run-plugin.r?script-name=easy-vid.r
Currently, that is restricted to Library members (you have to be logged in).
And it'll attempt *any* script -- whether or not it runs under View; and it
defaults the window size to 640x480, which is not the best starting size for
many scripts -- so not yet ready for prime time yet.
But have a play, please; and let me know of any problems,
Thanks -- and thanks too to all the people who have played with and
commented on the pre-beta version.
Sunanda
[2/7] from: jasonic::nomadics::org at: 7-Sep-2004 9:24
Hi Sunanda
http://www.rebol.org/cgi-bin/cgiwrap/rebol/run-plugin.r?script-name=easy-vid.r
Thanks. 'Tis a thing of beauty already...
But easy-vid needs an appropriately sized window.
Currently text falls off the edges and scroll bar ends are not accessible
etc.
We have our first candidate for a scirpt which needs to define its own
plugin window size.
I tested on WinXP. Identical behavior seen in:
Firefox 0.9.3
IE 6.0.2800
- Jason
[3/7] from: SunandaDH:aol at: 7-Sep-2004 12:31
Jason:
> But easy-vid needs an appropriately sized window.
> We have our first candidate for a scirpt which needs to define its own
> plugin window size.
Thanks.
That's one of the problems relating to trying to run an arbitrary script.
Uncovering such problems is why we're beta-ing rather than releasing this.
The size issue is probably rue for most plugin-able scripts in the Library --
the default 640x480 window size is not appropriate for most of them.
There is no way the Library can guess the size a script needs
And there is no way (I know of) a script running under the plugin can tell
the browser to resize the window . And, even if there were, none of the scripts
in the Library have that code.
The solution I currently see is that we extend the Library header to say
explicitly what dimensions a script needs when run under the plugin. So, for
example, the Library header for easy-viid.r becomes something like:
library: [
level: 'intermediate
platform: [plugin] ;; -- explicitly state it can run under the
plugin
plugin: [window: 700x500 needs: version-no] ;; state window size and
version
type: 'tutorial
domain: [GUI]
tested-under: none
support: none
license: none
see-also: none
]
We'll need version of plugin to use: one day, there'll be a range of releases
of the plugin and some scripts may only work on the latest (or the earliest).
A better solution will be welcomed!
Sunanda.
[4/7] from: greggirwin:mindspring at: 7-Sep-2004 11:07
Hi Sunanda,
Sac> There is no way the Library can guess the size a script needs
I guess it depends on how much effort we want to expend on it. We
should be able to parse the script and find the largest layout, though
that won't always provide an optimal solution either.
I think the header solution, while requiring an explicit change, is
probably the best solution right now. If it isn't there, we can use a
default/fallback solution.
-- Gregg
[5/7] from: SunandaDH::aol::com at: 7-Sep-2004 14:48
Gregg:
> I think the header solution, while requiring an explicit change, is
> probably the best solution right now. If it isn't there, we can use a
> default/fallback solution.
Also note we've added a sub-optimal solution for now. Scroll to the bottom of
the plug-in page, and there's a form letting you specify the window
size....It's better than nothing, I guess.
Sunanda
[6/7] from: hallvard::ystad::oops-as::no at: 7-Sep-2004 21:40
Dixit Sunanda:
>And there is no way (I know of) a script running under the plugin can tell the browser
to resize the window .
Oh, but there is! A javascript can do the trick. I explained how in a previous thread:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlYKNQ
But information about the size needed for a /view script would still have to be given
by the script itself...
HY
[7/7] from: SunandaDH::aol::com at: 14-Sep-2004 16:33
Gregg:
> I think the header solution, while requiring an explicit change, is
> probably the best solution right now. If it isn't there, we can use a
> default/fallback solution.
Thanks, that's what we've gone for -- at least until someone has a better
idea.
There're now a couple of extra fields on a Library header, and the
run-plugin.r script checks for them.
-----
EVERYONE PLEASE: if you own any scripts in the Library that can run under the
plugin **please** try to find the time in the next week or two to update them
to have the new Library header fields. Details are below.....
......Because, soon, those fields will be compulsory -- we won't offer a "run
plugin" option for scripts which are not explicitly "certified" by their owner
as runnable under the plugin.
Example of a script with the new header fields:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/run-plugin.r?script-name=ascii-char
t.r
Previously it was clipped to the default 640x480 window size so you couldn't
see the whole layout.
-------
LIBRARY HEADER CHANGES
1. platform
If you want your script to run under the plugin, add 'plugin to this existing
entry. eg:
platform: [win plugin]
or
platform: [amiga mac plugin]
or
platform: [all plugin]
(That last one is inelegantly phrased. "all" now has to mean "all known
desktops" rather than "all possible environments").
2 Plugin:
If you add 'plugin to the platform header, then you need a new header field:
plugin: [size: 800x400]
where the size parameter defines, in pixels, the width and height of the
window needed to run your script.
More help on that here:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/one-click-submission-help.r?help=pl
ugin
------
We've still got some other changes to make before fully unleashing the plugin
(so anyone can run a script under the plugin -- right now it is limited to
Library members). So if you can find the time to update your scripts now, you'll
be all set for when the next phase is completed.
Thanks everybody,
Sunanda.