Problems with Seaside 2.9 libraries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with Seaside 2.9 libraries

John Chludzinski
I'm porting code from 2.8 to 2.9.  I have a chat app (currently model on CTChat) using Comet.  I also have an app that uses SUTreeReport (using Scriptaculous).  If I add the libraries in the following order, the app using SUTreeReport works:

addLibrary: CTLibrary;
addLibrary: MMAFileLibrary;
addLibrary: MMALibrary;
addLibrary: JQDevelopmentLibrary;
addLibrary: PTDevelopmentLibrary;
addLibrary: SUComponentLibrary;
addLibrary: SUDevelopmentLibrary;

If I add libraries in the following order my chat app works:

addLibrary: PTDeploymentLibrary;
addLibrary: CTLibrary;
addLibrary: JQDeploymentLibrary;
addLibrary: MMAFileLibrary;
addLibrary: SUDeploymentLibrary;
addLibrary: SUComponentLibrary;
addLibrary: MMALibrary;

It looks like PTDeploymentLibrary clashes with something else, likely JQDeploymentLibrary.

---John 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Seaside 2.9 libraries

Lukas Renggli
> addLibrary: MMAFileLibrary;
> addLibrary: MMALibrary;

I don't know the above libraries.

> addLibrary: JQDevelopmentLibrary; "JQuery"
> addLibrary: PTDevelopmentLibrary; "Protype and ..."
> addLibrary: SUComponentLibrary;   "Scriptaculous"
> addLibrary: SUDevelopmentLibrary;

JQuery and Prototype/Scriptaculous do not work together, unless you
take extra precautions
<http://docs.jquery.com/Using_jQuery_with_Other_Libraries>. If you are
porting an existing application you presumably only use
Prototype/Scriptaculous, so you should not include
JQDevelopmentLibrary; similar if you use JQuery you don't want to
include PTDevelopmentLibrary, SUComponentLibrary and
SUDevelopmentLibrary.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Seaside 2.9 libraries

John Chludzinski
In reply to this post by John Chludzinski
> JQuery and Prototype/Scriptaculous do not work together, unless you
> take extra precautions
> <http://docs.jquery.com/Using_jQuery_with_Other_Libraries>. If you are
> porting an existing application you presumably only use
> Prototype/Scriptaculous, so you should not include
> JQDevelopmentLibrary; similar if you use JQuery you don't want to
> include PTDevelopmentLibrary, SUComponentLibrary and
> SUDevelopmentLibrary.
>
> Lukas

I have an app which is a suite of "applets" (simple applications subclassed from WAComponent).  One applet allows users to view his buddies as a hierarchy of groups (e.g., football>pro>team or football>college>team).  This uses Scriptaculous (SUTreeReport).  Another applet allows a group of users to concurrently view a presentation (of slides).  This uses Comet.  If I include PTDevelopmentLibrary to make the Scriptaculous work, then Comet fails.  If I exclude PTDevelopmentLibrary, then Scriptaculous fails.

Is there a way to re-architect this suite of applets into a suite of apps, each of which can include whatever libraries it needs (or exclude libraries it is in conflict with)?

---John

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: Problems with Seaside 2.9 libraries

Lukas Renggli
>  This uses Scriptaculous (SUTreeReport).  Another applet allows a group of
> users to concurrently view a presentation (of slides).  This uses Comet.  If
> I include PTDevelopmentLibrary to make the Scriptaculous work, then Comet
> fails.  If I exclude PTDevelopmentLibrary, then Scriptaculous fails.

The Comet Javascript support code in Seaside 2.9 does not depend or
conflict with Prototype or JQuery. It is useable with either of the
two, or any other Javascript library of your choice.

The examples that currently come with the Comet package use JQuery,
but this is just a personal choice of mine. In Seaside 2.8
Scriptaculous was used for the same demos.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Seaside 2.9 libraries

John Chludzinski
In reply to this post by John Chludzinski
Thanks Lukas for the clues.  I went back to my previous implementation, for example:

   self pusher javascript: [ :script |
      ...
      script element
         id: #WWW;
         writeAttribute: 'src' value: MMAFileLibrary / self getCurrentPageFile.

versus:

   self pusher javascript: [ :script |
      ...
       script << (script jQuery: #WWW)
          attributeAt: 'src' put: MMAFileLibrary / self getCurrentPageFile.

Removed all references to jQuery from my code, deleted JQDevelopmentLibrary, kept PTDevelopmentLibrary, and all now works.

---John

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside