Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Gusts Kaksis
Yes, just 2 private properties - applet's reference and id attribute (and maybe syncId too), and a few public methods. On 2012.08.07. 20:04, Robert Hanson wrote: OH, ok. You mean like as in JmolApplet.js. Sure. On Tue, Aug 7, 2012 at 11:51 AM, Gusts Kaksis > wro

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Robert Hanson
OH, ok. You mean like as in JmolApplet.js. Sure. On Tue, Aug 7, 2012 at 11:51 AM, Gusts Kaksis wrote: > Comments bellow... > > > > My new idea is to create an applet wrapper class, that gets created >> once the applet becomes ready. It will be thrown around in all the >> events/callbacks as t

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Gusts Kaksis
Comments bellow... My new idea is to create an applet wrapper class, that gets created once the applet becomes ready. It will be thrown around in all the events/callbacks as the first argument. And it will export applet's methods or store something in cache if applet (for some

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Robert Hanson
On Tue, Aug 7, 2012 at 10:28 AM, Gusts Kaksis wrote: > On 2012.08.07. 17:03, Robert Hanson wrote: > > syncScript is very special. It's for sending scripts to synchronized > applets. Not something a user would do themselves. See the documentation on > the SYNC command. > > So it's used in between

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Gusts Kaksis
On 2012.08.07. 17:03, Robert Hanson wrote: On Tue, Aug 7, 2012 at 6:40 AM, Gusts Kaksis > wrote: Hi, Bob! I've already started planing the next iteration of my jQuery plugin with a little bit different approach - trial and error is the way to go

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Robert Hanson
On Tue, Aug 7, 2012 at 6:40 AM, Gusts Kaksis wrote: > Hi, Bob! > > I've already started planing the next iteration of my jQuery plugin with > a little bit different approach - trial and error is the way to go :) I > wanted to ask a few questions about Jmol applet though, as I didn't > receive any

Re: [Jmol-developers] new jQuery plug-in

2012-08-07 Thread Gusts Kaksis
Hi, Bob! I've already started planing the next iteration of my jQuery plugin with a little bit different approach - trial and error is the way to go :) I wanted to ask a few questions about Jmol applet though, as I didn't receive any descriptions about the external methods (and there is no com

Re: [Jmol-developers] new jQuery plug-in

2012-08-06 Thread Robert Hanson
On Mon, Aug 6, 2012 at 8:46 AM, Gusts Kaksis wrote: > On 2012.08.06. 16:20, Robert Hanson wrote: > > > > On Mon, Aug 6, 2012 at 6:38 AM, Gusts Kaksis wrote: > >> On 2012.08.06. 14:07, Robert Hanson wrote: >> It's the same as why do you need an addButton method then :) If you're >> building a h

Re: [Jmol-developers] new jQuery plug-in

2012-08-06 Thread Gusts Kaksis
On 2012.08.06. 16:20, Robert Hanson wrote: On Mon, Aug 6, 2012 at 6:38 AM, Gusts Kaksis > wrote: On 2012.08.06. 14 :07, Robert Hanson wrote: It's the same as why do you need an addButton method then :) If you're building a helper library to aid devel

Re: [Jmol-developers] new jQuery plug-in

2012-08-06 Thread Robert Hanson
On Mon, Aug 6, 2012 at 6:38 AM, Gusts Kaksis wrote: > On 2012.08.06. 14:07, Robert Hanson wrote: > It's the same as why do you need an addButton method then :) If you're > building a helper library to aid development, it's for the best to add more > helpful functions than less. And it's still th

Re: [Jmol-developers] new jQuery plug-in

2012-08-06 Thread Gusts Kaksis
On 2012.08.06. 14:07, Robert Hanson wrote: On Sun, Aug 5, 2012 at 3:31 PM, Gusts Kaksis > wrote: On 2012.08.05. 22 :55, Robert Hanson wrote: If it's not a link, then data-script attribute will be used. What's the significance of the

Re: [Jmol-developers] new jQuery plug-in

2012-08-06 Thread Robert Hanson
On Sun, Aug 5, 2012 at 3:31 PM, Gusts Kaksis wrote: > On 2012.08.05. 22:55, Robert Hanson wrote: > > >> >> >> >> >>> If it's not a link, then data-script attribute will be used. >>> >> >> What's the significance of the difference there? Say, between a button >> and an anchor? >> >> Button does

Re: [Jmol-developers] new jQuery plug-in

2012-08-05 Thread Gusts Kaksis
On 2012.08.05. 22:55, Robert Hanson wrote: Gusts, good to hear from you. Sorry to hear about your "vacation" comments below. On Sun, Aug 5, 2012 at 1:59 PM, Gusts Kaksis > wrote: Hi, Bob! script(script_source) - execute a script. Same as

Re: [Jmol-developers] new jQuery plug-in

2012-08-05 Thread Robert Hanson
Gusts, good to hear from you. Sorry to hear about your "vacation" comments below. On Sun, Aug 5, 2012 at 1:59 PM, Gusts Kaksis wrote: > Hi, Bob! > > > script(script_source) - execute a script. Same as Jmol.script() in your >> solution >> >> 2nd level methods - abstract jQuery bind() metho

Re: [Jmol-developers] new jQuery plug-in

2012-08-05 Thread Gusts Kaksis
Hi, Bob! I've been on double vacation - one was kind of planed, the other one was forced on me by some flu (can you imagine, in the middle of the summer?) :( Anyhow, I've updated jQuery Jmol plugin accordingly: 1. Events now receive raw attributes as an array. Probably, we need to do some cle

Re: [Jmol-developers] new jQuery plug-in

2012-07-19 Thread Robert Hanson
On Thu, Jul 19, 2012 at 11:51 AM, Gusts Kaksis wrote: > Hi, Bob! > > I put together a little example on the same development PC ( > http://dev.gusc.lv/code/jmol/simple2.html) and documented it in the > source. It's not a JmolApi.js replacement yet, but there are some new ideas > I wanted you to l

Re: [Jmol-developers] new jQuery plug-in

2012-07-19 Thread Gusts Kaksis
Hi, Bob! I put together a little example on the same development PC (http://dev.gusc.lv/code/jmol/simple2.html) and documented it in the source. It's not a JmolApi.js replacement yet, but there are some new ideas I wanted you to look at and give me some feedback. Basically, there is a Jmol c

Re: [Jmol-developers] new jQuery plug-in

2012-07-19 Thread Robert Hanson
On Wed, Jul 18, 2012 at 6:30 AM, Gusts Kaksis wrote: > Hi, Bob! > > > On 2012.07.18. 6:52, Robert Hanson wrote: > > Pretty sure that's all discussed on the Jmol JsLibrary page referred to > earlier. If not, that's an omission. Take a look at > http://chemapps.stolaf.edu/jmol/docs/#setcallback an

Re: [Jmol-developers] new jQuery plug-in

2012-07-18 Thread Gusts Kaksis
Hi, Bob! On 2012.07.18. 6:52, Robert Hanson wrote: Comments below... Yes, then I'd have to turn of my parser. And you didn't answer my question about output formatting. So I'll repeat it here: I'm more intereseted weather the syntax of hover's 1st parameter will allways be "at

Re: [Jmol-developers] new jQuery plug-in

2012-07-17 Thread Robert Hanson
Comments below... > Yes, then I'd have to turn of my parser. And you didn't answer my question > about output formatting. So I'll repeat it here: > > I'm more intereseted weather the syntax of hover's 1st parameter will > allways be "atom atom_num x y z"? > > Sorry, thought I had answered that. I

Re: [Jmol-developers] new jQuery plug-in

2012-07-17 Thread Gusts Kaksis
I found the problem with IE and XHR. Funny thing about Microsoft. They invent things, then they break them, and then they invent new ones, without fixing the old ones :) Same pattern goes for the XHR, which was invented by MS. Starting from IE 8 they have a new XHR object called XDomainRequest,

Re: [Jmol-developers] new jQuery plug-in

2012-07-17 Thread Gusts Kaksis
On 2012.07.16. 21:55, Robert Hanson wrote: On Mon, Jul 16, 2012 at 12:47 PM, Gusts Kaksis > wrote: On 2012.07.16. 20 :03, Robert Hanson wrote: It's possible that it's no problem any longer. especially if you aren't actually calling JavaScript in an

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
On Mon, Jul 16, 2012 at 1:11 PM, Gusts Kaksis wrote: > On 2012.07.16. 20:49, Robert Hanson wrote: > > > > On Mon, Jul 16, 2012 at 11:31 AM, Gusts Kaksis wrote: > >> Bob, >> >> I threw together a simple2.html with my approach (Jmol part only): >> >> http://dev.gusc.lv/code/jmol/simple2.html - it's

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
On Mon, Jul 16, 2012 at 12:47 PM, Gusts Kaksis wrote: > On 2012.07.16. 20:03, Robert Hanson wrote: > > >> > It's possible that it's no problem any longer. especially if you aren't > actually calling JavaScript in an href tag. So, for example, we try to > avoid this: > > > my file > > Not on my wa

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
On 2012.07.16. 20:49, Robert Hanson wrote: On Mon, Jul 16, 2012 at 11:31 AM, Gusts Kaksis > wrote: Bob, I threw together a simple2.html with my approach (Jmol part only): http://dev.gusc.lv/code/jmol/simple2.html - it's on my devevelopment PC,

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
On Mon, Jul 16, 2012 at 11:31 AM, Gusts Kaksis wrote: > Bob, > > I threw together a simple2.html with my approach (Jmol part only): > > http://dev.gusc.lv/code/jmol/simple2.html - it's on my devevelopment PC, > so it might be a wee bit slow. > > Please take a look at the html source and at simple2

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
On 2012.07.16. 20:03, Robert Hanson wrote: So I say there is no problems with writing simple HTML with data attributes containing some hard core scripts. Maybe, if you have some really nasty examples, that have strict indenting and line breaks, that you could s

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
On Mon, Jul 16, 2012 at 9:35 AM, Gusts Kaksis wrote: > > > --I'm more than happy to share my experience with issues. Others on this > list know a lot about this as well. Some of these I'm sure jQuery > addresses; maybe some (like "a div containing an applet may not ever be set > to display:none")

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
Bob, I threw together a simple2.html with my approach (Jmol part only): http://dev.gusc.lv/code/jmol/simple2.html - it's on my devevelopment PC, so it might be a wee bit slow. Please take a look at the html source and at simple2.js file. From my point of view it's as simple as that, if you hav

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
On 2012.07.16. 17:20, Robert Hanson wrote: Leap-frogging here On Mon, Jul 16, 2012 at 6:31 AM, Gusts Kaksis > wrote: > > We need this class to overcome stupid "functionName"-as-a-string passed to Java Applet > > Note that JmolApi does acc

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
On 2012.07.16. 16:31, Robert Hanson wrote: Just to confirm, Gusts, I'm totally with you on this. I've wanted to learn more about jQuery for a long time, and this seems like a great opportunity. Superb, I'll be more than glad to help you there. My key points: --Anything you want to do in rela

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
Leap-frogging here On Mon, Jul 16, 2012 at 6:31 AM, Gusts Kaksis wrote: > > > > We need this class to overcome stupid "functionName"-as-a-string passed > to Java Applet > > > > Note that JmolApi does access the function directly, but I don't know > > that there is an alternative to sending

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Robert Hanson
Just to confirm, Gusts, I'm totally with you on this. I've wanted to learn more about jQuery for a long time, and this seems like a great opportunity. My key points: --Anything you want to do in relation to JmolCore/Applet/Api is great. Jmol.js is history. --We don't want to remove any of the f

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
> OK, taking a look now at http://gusc.lv/jmol/assets/js/jquery.jmol.js > > So I think this is based on Jmol.js, not JmolCore.js, right? In any > case, some advice: Well, it's kinda based, I just looked up a few things - like what methods are available through public interface from applet to Jav

Re: [Jmol-developers] new jQuery plug-in

2012-07-16 Thread Gusts Kaksis
Hi, I have to pardon my self, I wasn't looking carefully enough at Jmol.js and JmolCore.js, JmolApplet.js and JmolApi.js, and it looks that I kinda misjudged the applet initialiation process. Sorry about that :) As you alerady mentioned in your example "Jmol.setDocument(0);". So there seems t

Re: [Jmol-developers] new jQuery plug-in

2012-07-14 Thread Robert Hanson
Gusts, OK, taking a look now at http://gusc.lv/jmol/assets/js/jquery.jmol.js So I think this is based on Jmol.js, not JmolCore.js, right? In any case, some advice: We need this class to overcome stupid "functionName"-as-a-string passed to Java Applet Note that JmolApi does access the function d

Re: [Jmol-developers] new jQuery plug-in

2012-07-14 Thread Robert Hanson
Gusts, I'm excited about your contributions. jQuery has been mostly an enigma to me, and it would be good to learn more from someone who really groks it. History on this is that the original direction for OOP (earlier this year) had to do with getting something going on mobile and other Java-cha

Re: [Jmol-developers] new jQuery plug-in

2012-07-14 Thread Robert Hanson
On Wed, Jul 11, 2012 at 1:16 PM, Gusts Kaksis wrote: > Hello, it's me again! > > I just found out one interesting thing about Jmol applet and I wanted to > clear things up. As it seems, the appletReadyCallback delivers 4th and > undocumented attribute, which is an internal object of the applet > (

Re: [Jmol-developers] new jQuery plug-in

2012-07-11 Thread Gusts Kaksis
Hello, it's me again! I just found out one interesting thing about Jmol applet and I wanted to clear things up. As it seems, the appletReadyCallback delivers 4th and undocumented attribute, which is an internal object of the applet (applet wrapper) with all the public methods? Is it so? Well I

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Robert Hanson
Gusts, Very interesting idea. I guess our recent work had a different approach -- Use jQuery as an accompaniment to Jmol, ChemDoodle, JME, and JSpecView, but don't build Jmol INTO any of those. Please do check out http://chemapps.stolaf.edu/jmol/docs/examples-12 and related examples -- http://c

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Gusts Kaksis
Exactly. Less abstraction, means cleaner code. Cleaner code, means faster the code. The browser has to do a lot of parsing and compiling (v8 or *Monkey) or direct execution (lazy Microsoft JScript). So less work for them, the faster the web. As for the documentation, it only contains, what I think

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Michael Evans
> > > Jmol.js includes not just functions for building Jmol applets, but also > > buttons, checkboxes, etc. linked up to a Jmol applet on the page. Perhaps > > the plugin could implement these functions in some way, as in... > > > > $('#jmolButton').jmolButton(); > This is also one of the things th

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Gusts Kaksis
Hi, It's nice to see some response. :) But first things first. > Jmol.js includes not just functions for building Jmol applets, but also > buttons, checkboxes, etc. linked up to a Jmol applet on the page. Perhaps > the plugin could implement these functions in some way, as in... > > $('#jmolButto

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Gusts Kaksis
Hello Angel! > First, although Jmol.js is the standard way of using Jmol applets, there is a > recent > replacement that uses an object-based syntax. You should make sure to look at > it (only for > Jmol 12.3.x). It's made up with JmolCore.js, JmolApi.js, JmolApplet.js, > JmolControls.js, etc >

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Angel Herráez
Hello Gusts You will receive replies from more authoritative sources, but I will share my 2 cents. First, although Jmol.js is the standard way of using Jmol applets, there is a recent replacement that uses an object-based syntax. You should make sure to look at it (only for Jmol 12.3.x). It'

Re: [Jmol-developers] new jQuery plug-in

2012-07-10 Thread Michael Evans
Gusts—this is *awesome*. I have forked your GitHub repository and intend to integrate the plugin into my Jmol web app: http://www.metallacycle.com/uiji/ Jmol.js includes not just functions for building Jmol applets, but also buttons, checkboxes, etc. linked up to a Jmol applet on the page. Perhap

[Jmol-developers] new jQuery plug-in

2012-07-10 Thread Gusts Kaksis
Hello! I would like to propose a completely standalone jQuery plugin for Jmol. I searched the web and found only one solution that works as a wrapper for Jmol.js, so I took my time and wrote this alpha version, which does not use Jmol.js at all. I've hosted it on GitHub: https://github.com/gus