That's not a reason. It would be possible to turn on a 'framework
compliance' mode and have $ be called $moo, by wrapping the framework code
in a big closure.The main reason is that MooTools extends the native
Javascript objects, and so do many other frameworks, like Prototype.
The other important reason is that MooTools code is designed to be an *
elegant* and *compact *set of tools that extend JavaScript, so combining it
with another framework doesn't make any sense.

On Thu, Dec 18, 2008 at 8:29 AM, Iván Núñez Paz <[email protected]> wrote:

> $ is one (if not the most) of the most important functions in Mootools
> framework....
>
> Thats also one of the main reasons why you should/can NOT mix different
> frameworks (not the only reason, there are plenty more on why its such a bad
> idea... :-P )
>
> Cheeres
> Ivan
>
>
>
> On Thu, Dec 18, 2008 at 10:55 AM, Sir Galahad <[email protected]>wrote:
>
>>
>> Hi nutron,
>> thanks for your help.
>> In my code I include MooTools as first <script> tag.
>> Then I include the guilty code, wich cause other MooTools script to
>> fail.
>> So, $ function is defined and the code
>>
>> typeof $ != 'function'
>>
>> says "true", on every browser.
>> So, the function $ should not to be redefined, isn't it?
>>
>> I can not understand why this piece of script touch MooTools...
>>
>>
>>
>> On 17 Dic, 19:17, nutron <[email protected]> wrote:
>> > just intuition. seeing someone define $ is a red flag.
>> > If you want to use $ if it's not defined, just be 100% sure you have
>> this
>> > code AFTER MooTools.
>> >
>> > On Wed, Dec 17, 2008 at 10:09 AM, Matteo Pelucco (via Nabble) <
>> > [email protected]<ml-user%[email protected]>
>> <ml-user%[email protected]<ml-user%[email protected]>
>> >
>> >
>> >
>> >
>> > > wrote:
>> >
>> > > Great, your are my Personal Hero!
>> >
>> > > If I comment out that part of code, it works fine as expected.
>> >
>> > > Only one question, how can you debugged this? Or it has been only a
>> > > good intuition?
>> >
>> > > Thanks a lot, really!!!
>> > > matteo
>> >
>> > > On 17 Dic, 17:58, nutron <anut...@...<
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1669029&i=0>>
>> > > wrote:
>> >
>> > > > The only thing I see that looks like a probable culprit is this:
>> >
>> > > > /**
>> > > >  * Simple shortcut for document.getElementById()
>> > > >  */
>> > > > if (typeof $ != 'function') {
>> > > >     function $(element)
>> > > >     {
>> > > >         return document.getElementById(element);
>> > > >     }
>> >
>> > > > }
>> >
>> > > > If you define $ somehow after MooTools, you're going to cause
>> issues. You
>> >
>> > > > might add a debug line to your method above and see if it's being
>> used
>> > > > instead of MooTools' version.
>> >
>> > > > On Wed, Dec 17, 2008 at 2:37 AM, Matteo Pelucco (via Nabble) <
>> > > > ml-user+55796-1367181...@...<
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1669029&i=1>
>> > > <ml-user%2b55796-1367181...@...<
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1669029&i=2>>
>> >
>> > > > > wrote:
>> >
>> > > > > Hi all!
>> >
>> > > > > We have a problem with domready:
>> > > > > window.addEvent("domready", function(){
>> > > > > alert("");
>> > > > > })
>> >
>> > > > > We are using Magnolia CMS and when we turn on Magnolia Javascript
>> (a
>> > > > > sort of JS framework), the event is not more fired *except on
>> Firefox
>> > > > > 3*!!
>> >
>> > > > > Here you can see the practical example:
>> >
>> > > > > **http://tinyurl.com/5td6km**
>> >
>> > > > > In this example you can see:
>> > > > > Magnolia turned on + MooTools
>> > > > > Magnolia turned off + MooTools
>> > > > > Magnolia turned on + jQuery
>> > > > > Magnolia turned off + jQuery
>> >
>> > > > > Can you help me?
>> > > > > The problem happens even with jQuery...
>> >
>> > > > > Thanks a lot for your attention...
>> > > > > M.
>> >
>> > > > > ------------------------------
>> > > > >  View message @
>> > > > >
>> http://n2.nabble.com/MooTools-and-Magnolia-CMS-tp1667374p1667374.html
>> > > > > To start a new topic under MooTools Users, email
>> > > > > ml-node+660466-1583815...@...<
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1669029&i=3>
>> > > <ml-node%2b660466-1583815...@...<
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1669029&i=4>>
>> >
>> > > > > To unsubscribe from MooTools Users, click here< (link removed) >.
>> >
>> > > > -----
>> > > > The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
>> > > > Clientcide:  http://www.clientcide.comwww.clientcide.com
>> > > > --
>> > > > View this message in context:
>> > >http://n2.nabble.com/MooTools-and-Magnolia-CMS-tp1667374p1668757.html
>> > > > Sent from the MooTools Users mailing list archive at Nabble.com.
>> >
>> > > ------------------------------
>> > >  View message @
>> > >http://n2.nabble.com/MooTools-and-Magnolia-CMS-tp1667374p1669029.html
>> > > To start a new topic under MooTools Users, email
>> > > [email protected]<ml-node%[email protected]>
>> <ml-node%[email protected]<ml-node%[email protected]>
>> >
>> > > To unsubscribe from MooTools Users, click here< (link removed) >.
>> >
>> > -----
>> > The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
>> > Clientcide:  http://www.clientcide.comwww.clientcide.com
>> > --
>> > View this message in context:
>> http://n2.nabble.com/MooTools-and-Magnolia-CMS-tp1667374p1669069.html
>> > Sent from the MooTools Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> ◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
> Iván Núñez Paz | Comunica Online | Tel. 902 945 321
> http://comunicaonline.net/
>



-- 
Guillermo Rauch
http://devthought.com

Reply via email to