POV-Ray : Newsgroups : moray.win : Plugin idea : Re: Plugin idea Server Time
29 Jul 2024 14:23:58 EDT (-0400)
  Re: Plugin idea  
From: Ph Gibone
Date: 15 Mar 1999 17:39:32
Message: <36ed8c24.0@news.povray.org>
Hi TWYST

5 more things :

1) I'm not a Java Fan
2) The actual Plugin interface is pure genius, very easy to use as long as
you know C/C++, which is the least for a DLL
3) If you want to have a full featured language one day or another you will
need something as sophisticated as JavaScript (if we can say it is),
Personally I'm very glad with the actual interface, and I don't need
anything else.
4) A good idea for plugins would be for any of us that has an idea for a
good plugin : send a mail to Lutz so that he can publish your request, and
publish a request in this forum, I'm sure that some one will take it, and if
not, the language will not be the reason.
5) The following lines of codes are JavaScript, isn't it what you ask for ?
This is not a very rich example, and I agree that the presence of items like
this.form can sound cryptic. For me the *ONLY* advantage of JavaScript is :
it exists !

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Rick Johnson -->
<!-- Web Site:  http://members.tripod.com/~RickJohnson -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function a_plus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a+b
form.ans.value = c
}
function a_minus_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a-b
form.ans.value=c
}
function a_times_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a*b
form.ans.value=c
}
function a_div_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=a/b
form.ans.value = c
}
function a_pow_b(form) {
a=eval(form.a.value)
b=eval(form.b.value)
c=Math.pow(a, b)
form.ans.value = c
}
// End -->
</SCRIPT>

<!-- STEP TWO: Put this code into the BODY of your HTML document  -->

<BODY>
<CENTER>
<FORM name="formx"><input type=text size=4 value=12 name="a">
<input type="button" value="  +  " onClick="a_plus_b(this.form)">
<input type="button" value="  -  " onClick="a_minus_b(this.form)">
<input type="button" value="  x  " onClick="a_times_b(this.form)">
<input type="button" value="  /  " onClick="a_div_b(this.form)">
<input type="button" value="  ^  " onClick="a_pow_b(this.form)">
<input type="number" size=4 value=3 name="b"> = <input type "number" value=0
name="ans" size=9>
</FORM>
</CENTER>

<!-- Script Size:  1.72 KB  -->


Philippe


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.