Dear Jonathan,
In the end will you make the extension? when you have something ready I am 
willing to test it.
Thanks , Piero
--
Please consider the environment before printing this e-mail.

Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
-----------------------------------------------------------

________________________________
From: Jonathan Gutow [gu...@uwosh.edu]
Sent: Tuesday, July 13, 2010 11:05 PM
To: jmol-users@lists.sourceforge.net
Subject: Re: [Jmol-users] problem setting element colors with JmolColorPickerBox

Actually it would not be hard to make an extended version of the ColorPickerBox 
that doesn't take a script but a name of a function which would generate the 
scriptstr with $COLOR$ in the appropriate place.  Is that what you need?

Jonathan
On Jul 13, 2010, at 12:54 PM, 
jmol-users-requ...@lists.sourceforge.net<mailto:jmol-users-requ...@lists.sourceforge.net>
 wrote:

Piero,

Please include the part where you call the ColorPickerBox.  You are supposed to 
pass the ColorPickerBox the string, which in the formulation you provide may 
not have the necessary space before the color.

I'm unclear on exactly what you are trying to do.  The ColorPickerBox 
substitutes the color the user chooses for $COLOR$ in the script you provide.  
Another possibility is that you are running up against the fact that 
JmolColorPickerBox is writing html and javascript to your page dynamically, but 
does not have a mechanism for updating the script once the box is created.  If 
that is the problem I will have to think on it a little.  We can also consider 
making a version that passes the color to a function of your choosing.  Then 
you could send a script that is modified on the fly.

Jonathan
On Jul 13, 2010, at 8:03 AM, 
jmol-users-requ...@lists.sourceforge.net<mailto:jmol-users-requ...@lists.sourceforge.net>
 wrote:

Date: Tue, 13 Jul 2010 11:44:57 +0100
From: P.Canepa <pc...@kent.ac.uk<mailto:pc...@kent.ac.uk>>
Subject: [Jmol-users] problem setting element colors with
JmolColorPickerBox
To: "jmol-users@lists.sourceforge.net<mailto:jmol-users@lists.sourceforge.net>"
<jmol-users@lists.sourceforge.net<mailto:jmol-users@lists.sourceforge.net>>
Message-ID:
<42054e10c02cd44d81ef510077a30a073829ed4...@mapi.ad.kent.ac.uk<mailto:42054e10c02cd44d81ef510077a30a073829ed4...@mapi.ad.kent.ac.uk>>
Content-Type: text/plain; charset="us-ascii"

Dear all,

do you know why  JmolColorPickerBox( doesn't work ? The string  scriptColor = 
"' color " + element + " $COLOR$'"; s correctly written.



var scriptColor =  "";
function elementSelected(element){

 scriptColor = "' color " + element + " $COLOR$'";
 return scriptColor;
}

                         Dr. Jonathan H. Gutow
Chemistry Department                                
gu...@uwosh.edu<mailto:gu...@uwosh.edu>
UW-Oshkosh                                          Office: 920-424-1326
800 Algoma Boulevard                                FAX:920-424-2042
Oshkosh, WI 54901
                http://www.uwosh.edu/facstaff/gutow

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to