24.10.2014 Views

TMS iCL DEVELOPERS GUIDE - TMS Software

TMS iCL DEVELOPERS GUIDE - TMS Software

TMS iCL DEVELOPERS GUIDE - TMS Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>TMS</strong> SOFTWARE<br />

<strong>TMS</strong> <strong>iCL</strong><br />

<strong>DEVELOPERS</strong> <strong>GUIDE</strong><br />

Custom Collection<br />

If the data structure of your application contains extra properties that needs to be displayed in the<br />

item and the properties of the base collection are not sufficient, the TableView exposes 2 virtual<br />

functions that can be overridden to add additional properties. The CustomCells demo that is<br />

included in the distribution makes use of a <strong>TMS</strong>FMXNativeUITableViewMail instance that inherits<br />

from the <strong>TMS</strong>FMXNativeUITableView and overrides the virtual functions that create the section and<br />

item collection. When examining the code of this class, you will notice that the<br />

<strong>TMS</strong>FMXNativeUITableViewMailItem collection item class is used to add additional properties such as<br />

Sender, Date, Title, Description and Unread.<br />

The <strong>TMS</strong>FMXNativeUITableViewMail inherits from <strong>TMS</strong>FMXNativeUITableView and overrides the<br />

CreateSections function that returns the custom section collection<br />

<strong>TMS</strong>FMXNativeUITableViewMailSections. As each section has an items collection, the CreateItems<br />

function needs to be overridden to return the <strong>TMS</strong>FMXNativeUITableViewMailItems collection that<br />

holds the customized items.<br />

The creation of a custom collection can be sufficient to persist non-visual data in your application.<br />

If you need additional visual representation in an item, then the Custom Items chapter will explain<br />

how you can override the default layout of a TableView item and display custom data.<br />

The Source of the <strong>TMS</strong>FMXNativeUITableView can be found below in the “Resources” chapter<br />

41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!