13 Commits

Author SHA1 Message Date
Hixie
74575775bd Introduce an explicit Key type.
This fixes some theoretical bugs whereby we were using hashCode to try
to get unique keys for objects, but really we wanted object identity.
It also lays the groundwork for a new GlobalKey concept.

I tried to keep the impact on the code minimal, which is why the "Key"
constructor is actually a factory that returns a StringKey. The code
has this class hierarchy:

```
   KeyBase
    |
   Key--------------+---------------+
    |               |               |
   StringKey    ObjectKey       UniqueKey
```

...where the constructors are Key and Key.stringify (StringKey),
Key.fromObjectIdentity (ObjectKey), and Key.unique (UniqueKey).

We could instead of factory methods use regular constructors with the
following hierarchy:

```
   KeyBase
    |
   LocalKey---------+---------------+
    |               |               |
   Key      ObjectIdentityKey   UniqueKey
```

...with constructors Key, Key.stringify, ObjectIdentityKey, and
UniqueKey, but I felt that that was maybe a more confusing hierarchy.
I don't have a strong opinion on this.
2015-07-22 09:14:06 -07:00
Hixie
6d304c03ac Remove redundant operator== and hashCode functions in card example.
It turns out that we aren't really using these. The identity logic is sufficient.

Also, add some asserts for a crash I had once but couldn't reproduce, in case that helps catch it next time.
2015-07-21 15:26:54 -07:00
Adam Barth
6b748e653e Fix more analyzer warnings 2015-07-21 13:59:18 -07:00
Adam Barth
53efc748e1 Merge pull request #191 from abarth/image_height_width
Separate width and height parameters for Image widgets
2015-07-21 13:54:56 -07:00
Adam Barth
d5f3168982 Merge pull request #192 from abarth/fix_warnings
Fix analyzer warnings
2015-07-21 13:52:37 -07:00
Adam Barth
3ac4c6c998 Fix analyzer warnings 2015-07-21 13:51:27 -07:00
Adam Barth
012b915704 Separate width and height parameters for Image widgets
This change makes it easier to defined only the width or the height of an image
and let the other value be filled in from the image's intrinsic aspect ratio.

Fixes #175
2015-07-21 13:46:10 -07:00
Matt Perry
0fd3302ebe Renamed AnimatedType to AnimatedValue 2015-07-21 12:55:16 -07:00
Hans Muller
b954e020c6 Make it possible to identify BlockViewport children whose size or type has changed 2015-07-20 15:41:21 -07:00
Collin Jackson
cc29757eee Navigator improvements, avoid building invisible routes 2015-07-17 09:38:22 -07:00
Collin Jackson
e075988fe0 Make example look more beautiful 2015-07-16 17:36:25 -07:00
Collin Jackson
38cbf9b5d3 Support for settings fly-in animation 2015-07-16 17:22:20 -07:00
Collin Jackson
633b65010c After running filter-branch, move root directory into sky/ 2015-07-16 11:54:25 -07:00