Remaining API changes

From HalyardWiki

Jump to: navigation, search

We will soon be stabilizing the Halyard APIs to a significant extent. But before we do this, we need to clean up a few legacy APIs.

Contents

[edit] Upgrade to PLT 4

Sometime early in the 0.7 development series, we hope to upgrade to PLT 4.0. We don't know how disruptive this will be, but there are a number of important changes (most for the better, of course). There are some porting notes online; does anyone remember the URL?

[edit] Card drawing

Right now, elements are drawing using invalidate and draw handlers, but cards still have an old-style top-level DC. For consistency, and the sake of a GUI editor, cards should probably work much more like elements.

Porting cost: Only cards and templates that draw directly to the stage will be affected. These will generally just need a draw handler, as with elements.

[edit] Uniform time representation

We have quite a few functions which take a unit of time as an argument:

nap
wait
sleep-milliseconds
animate

But there's no real consistency here. Do we want milliseconds everywhere? Floating point seconds?

Porting cost: Fairly straightforward grepping should handle 98% of this.

[edit] "@" paths

See Path system for a (probably not up-to-date) proposal.

Porting cost: Search and replace, possible with human intervention and decision-making in some cases. Will need to review with porting team.

[edit] Recursive show/hide

Hiding a widget should hide all of its children, and showing a widget should show most of its children. Specifically, if we have four widgets:

  1. Widget A, a container, currently shown.
  2. Widget B, a child of A, currently shown.
  3. Widget C, a child of A, currently hidden.
  4. Widget D, an audio track and child of A, not showable.

...then hiding A should also hide B. Showing A again should restore the previous state, with B visible, and C and D invisible.

Porting cost: Believed to be small, because almost all code uses recursive show/hide helper functions. But we need to be slightly careful, because the current recursive show helper function doesn't preserve the state of child elements as described above. Can we provide backwards compatibility functions which implement the old behavior without messing up the implementation?

Personal tools