Re: Adding to the library
Wayne Douglas <wayne <at> web-demon.co.uk>
2006-01-02 20:47:56 GMT
OK, not so cool.
This might be a real simple thing but I cant figure it.
I have dropped the mochikit folder inside the src folder, what else do I
need to do to get it to work? I thought that was it?
I have the dojo.require("MochiKit.DOM");
In my page.
Cheers
w
Michael Schall wrote:
>Instead of working in the dojo root, why not create your own directory
>to work from. Dojo allows you to create js files outside of the dojo
>root for this very purpose.
>
>I have created my own root called judo with directory structure.
>
>dojo
> src
>judo
> widget
>mochikit
>
>dojo.hostenv.setModulePrefix('judo', '../judo');
>dojo.require('dojo.widget.*');
>dojo.widget.manager.registerWidgetPackage('judo.widget');
>
>dojo.require('judo.date');
>dojo.require('judo.widget.TextBox')
>
>This way all my code stays outside the dojo code so I can just refresh
>that by itself. You can also do this with MochiKit.
>
>Hope this helps.
>Mike
>On 12/31/05, Wayne Douglas <wayne <at> web-demon.co.uk> wrote:
>
>
>>Hi Dylan
>>
>>Thanks for that. The reference to external definitions stuff was exactly
>>what I was looking for regarding the maintenance of my library.
>>
>>I am particularly happy with this as I have already started down that
>>path with dojo.KMI.* !! ;)
>>
>>I am going to spend some time in jan looking at the functions in MK that
>>I could do with having in Dojo, in particular I think there are some of
>>the MochiKit.DOM MochiKit.Base functions that caught my eye. I did
>>notice the if (typeof(dojo) != 'undefined') {[...]} in the files and
>>suspected as much, does this mean I can just drop it in and hey presto I
>>have the namespace available?
>>
>>Thanks again
>>
>>w
>>
>>
>>
>>Dylan Schiemann wrote:
>>
>>
>>
>>>-----BEGIN PGP SIGNED MESSAGE-----
>>>Hash: SHA1
>>>
>>>Wayne,
>>>
>>>You don't need Dojo's approval for that... it's sort of the reason Dojo
>>>was designed with namespace.
>>>
>>>If you maintain your own subversion repository for your own company
>>>namespace, you should check out subversion's external definitions:
>>>http://svnbook.red-bean.com/en/1.1/ch07s04.html which makes it easy to
>>>maintain multiple checkouts in a directory hierarchy.
>>>
>>>Now, if you wanted to contribute your code to Dojo itself, we'd probably
>>>prefer that those contributions be added to the appropriate dojo
>>>namespace. The first step to contributing code is the CYA step: filling
>>>out either a contributor license agreement for you and/or your company:
>>>http://dojotoolkit.org/icla.txt
>>>http://dojotoolkit.org/ccla.txt
>>>The next step is to contribute patches and have them reviewed by Dojo
>>>contributors.
>>>
>>>As far as MochiKit goes, Bob made MochiKit compatible with Dojo's
>>>package system, and many people already use them together. Bob has also
>>>given us consent to port as much of MochiKit to Dojo as we see fit.
>>>Some of this has already happened, and more of this effort is ongoing.
>>>
>>>HTH,
>>>- -Dylan
>>>
>>>Wayne Douglas wrote:
>>>
>>>
>>>
>>>
>>>>Yo
>>>>
>>>>HAPPY NY!!!! WOOOOOHOOOOOOOO!!!!
>>>>
>>>>OK back to work :)
>>>>
>>>>Hypothetically speaking, if I for instance liked very much this
>>>>dojo.require business as it provides a nice structure to an otherwise
>>>>unstructured env, and say I wanted to create, within the dojo namespace,
>>>>my own little area where I can keep all my co's js as in
>>>>dojo.company_name.this_rocks, would that be cool and the gang with the
>>>>foundation and also the licensing coolios?
>>>>
>>>>Extending that further, say for instance, but in another instance, I
>>>>liked some of the DOM (or whatever) functions provided by MochKit, would
>>>>it be a dirty, nasty thing to try to melt the two together in the Dojo
>>>>namespace?
>>>>
>>>>Ta very much, in advance and for all your excellent, beautiful,
>>>>extremely cool work.
>>>>
>>>>Have a happy new year. I'm off to the cottage now for some hardcore
>>>>snowboarding/drinking/falling over!! :)
>>>>
>>>>w
>>>>
>>>>_______________________________________________
>>>>Dojo-interest mailing list
>>>>Dojo-interest <at> dojotoolkit.org
>>>>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>-----BEGIN PGP SIGNATURE-----
>>>Version: GnuPG v1.2.4 (Darwin)
>>>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>>iD8DBQFDtsJz8nLgh/JJsxERAiolAJ9ft/j8OG+4stdyL1rRSI3lv5IDaACfb2cH
>>>sCqQ37RW0/TPInOQeeSNWfA=
>>>=yfE8
>>>-----END PGP SIGNATURE-----
>>>_______________________________________________
>>>Dojo-interest mailing list
>>>Dojo-interest <at> dojotoolkit.org
>>>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>Dojo-interest mailing list
>>Dojo-interest <at> dojotoolkit.org
>>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
>>
>_______________________________________________
>Dojo-interest mailing list
>Dojo-interest <at> dojotoolkit.org
>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>