Ferreteria/v0.5/@cls/cStati: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
(Created page with "{{fmt/title|Ferreteria class <code>ferret\{{l/ver/class|arr}}\cStati</code>}} {| style="border: solid 1px grey; background: #eef;" |- | [ {{l/ver/class|cLocal}} > ]...")
 
No edit summary
Line 10: Line 10:
This class is similar in form to {{l/ver/class|cLocal}} in that it wraps an array, but the value of each element must be a Status object ({{l/ver/class|status\caBase}} podling). It will automatically create Status objects for each element requested. There is a default class, which can be overridden by name (overrides are stored in an array).
This class is similar in form to {{l/ver/class|cLocal}} in that it wraps an array, but the value of each element must be a Status object ({{l/ver/class|status\caBase}} podling). It will automatically create Status objects for each element requested. There is a default class, which can be overridden by name (overrides are stored in an array).


This class used to ''descend'' from cLocal, but that caused problems with inconsistent usage (some callers put in values directly, rather than using status objects) and language structure made it easier to prevent this if it became a wrapper for a self-created private cLocal object instead.
This class uses {{l/ver/class|cLocal}} for a private object, but does not descend from it. This class ''used'' to descend from cLocal, but that caused problems with inconsistent usage (some callers put in values directly, rather than using status objects) and language structure made it easier to prevent this if it became a wrapper for a self-created private cLocal object instead.
 
* '''Purpose''': an array of Status objects
** If a cell has a value, that value is the Status object.
** The value ultimately being stored is the Status object's value.
** Accessing the value (if already set) then looks like this: [array]->GetCell(name)->GetIt()
==History==
* '''2022-07-28''' Created from just the generic parts (i.e. most) of cArgs.
** There was a class of this same name many months ago, but this one was created from scratch without referring to that old code.

Revision as of 16:33, 28 July 2022

Ferreteria class ferret\arr\cStati

[ cLocal > ] cStaticArgs

About

This class is similar in form to cLocal in that it wraps an array, but the value of each element must be a Status object (status\caBase podling). It will automatically create Status objects for each element requested. There is a default class, which can be overridden by name (overrides are stored in an array).

This class uses cLocal for a private object, but does not descend from it. This class used to descend from cLocal, but that caused problems with inconsistent usage (some callers put in values directly, rather than using status objects) and language structure made it easier to prevent this if it became a wrapper for a self-created private cLocal object instead.

  • Purpose: an array of Status objects
    • If a cell has a value, that value is the Status object.
    • The value ultimately being stored is the Status object's value.
    • Accessing the value (if already set) then looks like this: [array]->GetCell(name)->GetIt()

History

  • 2022-07-28 Created from just the generic parts (i.e. most) of cArgs.
    • There was a class of this same name many months ago, but this one was created from scratch without referring to that old code.