[Laszlo-user] API change proposal for states and apply
Henry Minsky
hminsky at laszlosystems.com
Wed May 14 16:54:37 PDT 2008
I endorse this proposal.
On Wed, May 14, 2008 at 7:23 PM, P T Withington <ptw at pobox.com> wrote:
> We need to clean up the API for states. Right now states have both an
> attribute _and_ a method named `apply`. This just makes no sense. It is
> implemented by a horrendous kludge that we will not be able to carry forward
> into Javascript 2 runtimes. Here's my proposal:
>
> 1) Deprecate `apply` the attribute. Replace it with `applied`, which is a
> read/write attribute whose value reflects whether or not the state is
> currently applied. (There is currently a property `isapplied` that is
> read-only that tells the state of a state, but this name is inconsistent
> with our name conventions. As a part of this proposal, deprecate
> `isapplied` and replace it with `applied`.
>
> The `apply` method (and it's counterpart `remove`) remain, but the
> preferred method for controlling a state is to constrain the `applied`
> property.
>
> We can add to the 4.x upgrade script a template that looks for `apply` in
> the open tag of a state and replaces it with `applied`.
>
> Comments?
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080514/c9898ce8/attachment.html
More information about the Laszlo-user
mailing list