Message from discussion
Reasons for considering LowPro...am I in the right place?
Received: by 10.115.47.1 with SMTP id z1mr1552988waj.9.1201627379631;
Tue, 29 Jan 2008 09:22:59 -0800 (PST)
Return-Path: <d...@danwebb.net>
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181])
by mx.google.com with ESMTP id k36si8345718waf.0.2008.01.29.09.22.59;
Tue, 29 Jan 2008 09:22:59 -0800 (PST)
Received-SPF: neutral (google.com: 209.85.146.181 is neither permitted nor denied by best guess record for domain of d...@danwebb.net) client-ip=209.85.146.181;
Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.146.181 is neither permitted nor denied by best guess record for domain of d...@danwebb.net) smtp.mail=...@danwebb.net
Received: by wa-out-1112.google.com with SMTP id k22so4040305waf.18
for <low-pro@googlegroups.com>; Tue, 29 Jan 2008 09:22:59 -0800 (PST)
Received: by 10.114.150.1 with SMTP id x1mr5291855wad.145.1201627379123;
Tue, 29 Jan 2008 09:22:59 -0800 (PST)
Received: by 10.114.174.8 with HTTP; Tue, 29 Jan 2008 09:22:59 -0800 (PST)
Message-ID: <5b3e279f0801290922v44ec2241ib0ce95b11790492c@mail.gmail.com>
Date: Tue, 29 Jan 2008 17:22:59 +0000
From: "Dan Webb" <d...@danwebb.net>
To: low-pro@googlegroups.com
Subject: Re: Reasons for considering LowPro...am I in the right place?
In-Reply-To: <aee0ef4e-2f3e-43e4-a992-9566bad1777b@v46g2000hsv.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
References: <aee0ef4e-2f3e-43e4-a992-9566bad1777b@v46g2000hsv.googlegroups.com>
The InPlaceEditor behavior is something that I've intended to be a
rewrite of the Scripty version in a more Low Pro way but I've not
started yet. Although, I keep a few behaivors in subversion they are
mostly to test and investigate the possiblities - Low Pro is a
framework for attaching behaviors to elements not a widget library as
such and I don't intend to write lots of behaviors with Low Pro.
However, you can create a behavior wrapper around the scripty
InPlaceEditor really easily that will allow you to attach it with
Event.addBehavior:
InPlaceEditor = Behavior.create({
initialize: function(url, options) {
this.ipe = new Ajax.InPlaceEditor( this.element, url, options || {});
}
});
Then attach with:
Event.addBehavior({
'h2.editable': InPlaceEditor('/products', { method: 'post' });
});
You can do a similar thing with all the scripty widgets as well.
Cheers,
Dan
On 1/29/08, Chris Cruft <c...@hapgoods.com> wrote:
>
> I've recently been foiled by the pluginification of InPlaceEditor and
> AutoCompleter in RoR and their incompatibilities with the current
> Scriptaculous and Prototype. In the past, being very comfortable in
> Ruby, I would have simply monkey patched the in_place_editor (for
> example) to pass the htmlResponse variable. But after doing some
> research, I'm convinced that the Rails helpers are evil: I buy into
> the behavior/content/style separation argument and I'm convinced that
> the differing dev cycles on the three projects means the helpers will
> forever be out of sync.
>
> What's a developer to do? I looked at jQuery, but I'm not ready to
> ditch Prototype and Scriptaculous. Then I found LowPro. And while I
> really don't like the idea of yet another library, I would consider a
> small one if it is slick.
>
> My first stab a LowPro involved removing the Rails JS helper
> in_place_editor and adding code to application.js to add this behavior
> to the relevant elements. But WHERE is the InPlaceEditor behavior?
> This behavior file in the lowpro subversion repository is only a
> skeleton. And the AutoCompleter is totally empty! What gives? Am I
> expected to stitch Scriptaculous' AutoCompleter into LowPro myself?
> If so, can anyone point me to an example?
>
> -Chris
> >
>
--
Dan Webb
http://www.danwebb.net
aim: danwrong123
skype: danwrong