Ferreteria/v0.5/portrow/disp: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | portrow
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
==Required Methods==
==Required Methods==
(listing not necessarily complete)
(listing not necessarily complete)
* '''OnCreateElements(F\evint\caEvent $oe)''' : void
* Events:
* '''OnRunCalculations(F\evint\caEvent $oe)''' : void
** '''OnCreateElements(F\evint\caEvent $oe)''' : void
* '''Render(F\evint\caEvent $oe)''' : void
** '''OnRunCalculations(F\evint\caEvent $oe)''' : void
* '''CardClass()''' : string
** '''Render(F\evint\caEvent $oe)''' : void
* '''RenderRows_head()''' : string
* Config:
* '''ContentTemplateString()''' : string - must return a string template which shows how a given row's data should be presented
** '''CardClass()''' : string
** '''ContentTemplateString()''' : string - must return a string template which shows how a given row's data should be presented
** '''RenderRows_head()''' : string (this should probably be renamed...)
==Thinking==
The templating system is managed by the Rows classes rather than Card classes because we don't want to be creating the Template object over and over again when we're displaying multiple rows. Once you establish that, then it also makes sense for the template string to be defined by the Rows class as well.

Revision as of 15:42, 30 May 2022

Navigation: PortBank : PortRow :

Native
Display
Storage

About

As with the PortCard display classes, the PortRow display classes handle user I/O formats; see PortCard/disp for details.

Required Methods

(listing not necessarily complete)

  • Events:
    • OnCreateElements(F\evint\caEvent $oe) : void
    • OnRunCalculations(F\evint\caEvent $oe) : void
    • Render(F\evint\caEvent $oe) : void
  • Config:
    • CardClass() : string
    • ContentTemplateString() : string - must return a string template which shows how a given row's data should be presented
    • RenderRows_head() : string (this should probably be renamed...)

Thinking

The templating system is managed by the Rows classes rather than Card classes because we don't want to be creating the Template object over and over again when we're displaying multiple rows. Once you establish that, then it also makes sense for the template string to be defined by the Rows class as well.