another thought: This is the sort of error that would come from
multithreading -- two threads processing the same code block at the same
time. That's not supposed to be possible in JavaScript, but..... maybe
Safari....
On Sat, Nov 2, 2013 at 11:16 PM, Robert Hanson <[email protected]> wrote:
>
>
>
> On Sat, Nov 2, 2013 at 9:27 PM, Otis Rothenberger
> <[email protected]>wrote:
>
>> Bob,
>>
>> I got it. I don't know what to do with it, but I got it. The following
>> starts to work properly in Safari on a bond selection bond rotation:
>>
>> set Picking OFF;set Picking ON;set BondPicking TRUE;set
>> allowRotateSelected TRUE;unbind "SHIFT-SINGLE-LEFT-DRAG";bind
>> "SHIFT-SINGLE-LEFT-DRAG" "select WITHIN(BRANCH,{atomno=rot1},
>> {atomno=rot2}); if (_X < 250){select WITHIN(BRANCH,{atomno=rot2},
>> {atomno=rot1});} rotateSelected {atomno=rot1} {atomno=rot2}
>> @{_DELTAY};";hover off;
>>
>>
> Since rot1 and rot2 are predetermined, I would suggest not saving them per
> se, but, rather, saving the atom selections (and use atomIndex!)
>
> rot1 = .....
> rot2 = .....
>
> a1 = {atomIndex=rot1};
> a2 = {atomIndex=rot2};
> b1 = {WITHIN(BRANCH,a1,a2)};
> b2 = {WITHIN(BRANCH,a2, a1)};
>
> and the binding is more like:
>
> "if (_X < 250){select b2} else {select b1};rotateSelected @a1 @a2"
>
> certainly makes it more readable!
>
> Note that if you are going to dig into it,
>
> 1) use
>
> Jmol.debugCode = true
>
> in your HTML, and then track down problems in j2s or js directories. Then
> you aren't looking at minimized code. Also you can do more than just alert
> values:
>
> alert("here at " + Clazz.getStackTrace())
>
> gives you a listing of the function calls leading to this point. Could be
> useful. Also, better than alerts for things like this:
>
> System.out.println("......")
>
> sends messages to that information console "behind" the applet that you
> see at start-up and that is viewable with:
>
> jmolApplet0._showInfo(true)
>
>
>
>
>> I can play with rotations on both sides of the screen, then suddenly
>> continued dragging throws about 20 of these:
>>
>> script ERROR: TypeError: 'undefined' is not an object (evaluating
>> 'this.parameterExpression(a,b,null,!0,!1,-1,!1,
>> null,null).booleanValue')
>>
>>
> This is a very good find. There's only one place in the code that occurs.
> It's processing your IF statement, I think.
>
>
>
>
>
>> If I continue to drag, JSmol locks up. I've seen this error before, but I
>> did not associate it with dragging under the above bind.
>>
>> Any thoughts/suggestions would be appreciated
>>
>>
> invoke
>
> set debugScript true
>
> possibly even
>
> set debug true
>
> then check the Jmol script console for reports. I think it will report the
> callbacks as well.
>
>
> Bob
>
>
>
>> Otis
>>
>> --
>> Otis Rothenberger
>> [email protected]
>> http://chemagic.com
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Android is increasing in popularity, but the open development platform
>> that
>> developers love is also attractive to malware creators. Download this
>> white
>> paper to learn more about secure code signing practices that can help keep
>> Android apps secure.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users