Widgets in mochikit-patches

4 views
Skip to first unread message

David Barnett

unread,
May 24, 2009, 1:41:31 AM5/24/09
to moch...@googlegroups.com
Hi,

I've been desperately needing some standard widgets on top of mochikit, and I found the widgets under mochikit-patches just recently. I'm wondering what their current status is, if many people use them, and what most people do for widgets (e.g. using jQuery over mochikit).

David

Per Cederberg

unread,
May 24, 2009, 7:34:13 AM5/24/09
to moch...@googlegroups.com
Hi David,

Nice to see someone using my widgets for MochiKit!

The Git repository has been out of date for a while, since nobody has
been asking for updates. But now that you've patched the code, I've
also updated my copies to the latest version. Will try to merge in
your stuff as well.

It was my original intention to push for inclusion into 1.5, but the
response was quite muted here on the list last time around. So I've
concentrated on other stuff instead. But if GitHub works for you, we
might keep it there for now?

Please let me know if you have any issues or questions regarding the widgets!

Cheers,

/Per

David Barnett

unread,
May 24, 2009, 3:59:01 PM5/24/09
to moch...@googlegroups.com
Per,

Yeah, I'm just glad to see some standardized building blocks. It's hard to develop very quickly when you have to work down in the nuts and bolts, and we keep getting ugly bugs because our widget/presentation code is so coupled to our other code, so I've been hoping for something better for some time...

I do have a few questions so far:
1) I'm not having any luck with "scripts/pack.sh". I've just been updating the packed version by hand. Maybe I'm running it wrong, but I get this error:
Invalid option "-c"
Usage: java org.mozilla.javascript.tools.shell.Main [options...] [files]
2) Is there a "right way" yet to use the built-in popups on TextFields? It looks like calling the showPopup method directly is the best way to populate the popup list, but obviously it would be better to populate the list without manually showing it. Should there be an additional method to populate the list, and some of that be pulled out of showPopup? Also, is there any way to make a popup show just below the TextField widget instead of covering it up?

That's pretty much it. I'm planning on looking into the FormValidators next, so *if* you happen to get a chance, it would be great to have an example of how those work, or at least any caveats for using them that come to mind. I'll probably try to add a validation example if you don't get around to it.

David

Christian Zagrodnick

unread,
May 30, 2009, 4:48:18 AM5/30/09
to moch...@googlegroups.com
Call me blind, but where are those?



--
Christian Zagrodnick · c...@gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1
Zope and Plone consulting and development


Per Cederberg

unread,
May 30, 2009, 4:56:42 AM5/30/09
to Christian Zagrodnick, moch...@googlegroups.com
On Sat, May 30, 2009 at 10:48, Christian Zagrodnick <c...@gocept.com> wrote:
>
> Call me blind, but where are those?

Here:

http://github.com/cederberg/mochikit-patches/tree/master

Press the "download" link to get a file with everything in it. There
are a few examples that you can run locally. I know it would be better
with a demo site and all, but... :-)

Cheers,

/Per

Christian Zagrodnick

unread,
May 30, 2009, 5:30:57 AM5/30/09
to moch...@googlegroups.com

Thanks, will have a look into it.

Regards,

Ryan Wilcox

unread,
May 31, 2009, 5:23:01 PM5/31/09
to MochiKit
On May 24, 7:34 am, Per Cederberg <cederb...@gmail.com> wrote:

> It was my original intention to push for inclusion into 1.5, but the
> response was quite muted here on the list last time around. So I've
> concentrated on other stuff instead. But if GitHub works for you, we
> might keep it there for now?

Per,

If not in the standard MochiKit package, maybe in a centralized place/
repo "blessed" by the MochiKit team as the "Widgets 4 MochiKit"
project, for example??

I'd be willing to contribute a few controls (a multi-select/shuffle
take-options-from-this-select-and-put-in-that-one widget, for example.
Available at <http://bitbucket.org/rwilcox/
mochikit_multiselecttransfer/>).

Usually I'll use YUI framework for the big-gun widgets, but yes a
MochiKit widgets package would be _excellent_. It feels annoying, for
example, when I see a widget that's just perfect for what I need,
except it requires JQuery (and I don't want to pull in a second or
third JS library into the mix...)

So, +1 from me,
_Ryan Wilcox



Per Cederberg

unread,
May 31, 2009, 6:23:26 PM5/31/09
to Ryan Wilcox, MochiKit
I think the current location is quite fine, if not in the MochiKit
repo itself. Should perhaps add a link from the Wiki pages, though...

If you'd like to contribute new widgets, I'd love to include them!
Just fork the git repo and send me a pull request when done.

Regarding other widget solutions, my personal motivations for
implementing yet-another-JavaScript-widget-library are:

1. Using a mix-in approach instead of wrapper objects, the code
becomes more light-weight.
2. Creating a UI from XML instead of code makes for easier maintenance.
3. With a nice default look and simple API:s, the widgets become easy to use.
4. Unlimited open source license to avoid legal and commercial hassles.

All of the above can be argued back and forth, of course. I see #1
above as the main point with this effort, since both the others could
equally well be patched into some other widget library. And I see no
point in doing something that isn't sufficiently different from other
efforts in this area. I know lots of you just want to avoid using
another JS library for your widgets, but is that really such a big
problem? In fact, YUI is pretty configurable in that way if I recall
correctly.

Which kind of resonates with my reasons for staying with MochiKit in
spite of the jQuery popularity surge (and actually using it a bit at
work from time to time). That it does things differently from other JS
libraries. For good or bad.

Anyway. These are just my ramblings on the JS widget topic. Feel free
to disagree.

Cheers,

/Per

Reply all
Reply to author
Forward
0 new messages