0 Replies Latest reply on Jan 14, 2008 8:51 AM by Alexander McLeod

    TileList itemRenderer causes resort to not show

    Alexander McLeod
      I have a ViewStack with 2 views, a DataView and a TileList both of which which share a single DataProvider. The TileList uses a very simple itemRenderer. When the sort order of the DataGrid is altered (by clicking on the column header) the sort order as depicted in the TileList is incorrect.

      I've tracked the issue down to something very specific within the TileList's itemRender (see attached mxml) where by altering a few lines I can make this work as expected. However, the manner in which I originally coded this was intended to provide a base class which could be reused by over riding a few basic methods to provide customization; this won't be possible unless I can determine why the issue I'm having with sorting exists.

      The code is attached however the basic issue in the TileList's itemRenderer is as follows:

      If the data's 'name' attribute is read directly in the MXML as follows, the sorting works

      <mx:Label text="{data.name}"/>

      If the same attribute is read via a function as follows the sorting does not work

      <mx:Label text="{thumbLabel}"/>

      where the following is defined

      public function get thumbLabel(): String {
      return data.name;
      }

      Note that attempting to apply [Bindable] to the get thumbLabel function generates the following warning

      [Bindable] on read-only getter is unnecessary and will be ignored.

      PS: I have stripped the source from a large, complex application to a small sample application which illustrates the issue, if this is needed please let me know.