Thread: Universal class
View Single Post
  #1  
Old 06-23-2006, 11:19 AM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
Universal class

Perhaps it would be interesting to make a universal class, joined by every object...

Such would allow functions such as these:

PHP Code:
public function isNumeric()
  {
  if ( 
this.objectType() != "TGraalVar" )
    return 
false;

  
// Missing count .'s [ 1.2.25 != Numeric, but still passes this Numeric check]
  
for ( 0this.length(); ++ )
    if ( !(
this.substring(i,1in {"1","2","3","4","5","6","7","8","9","0","."} ))
      return 
false;

  return 
true;
  } 
Maybe name the class 'global', 'universal', or... Maybe have it based on the Object Type?

TGraalVar would join class TGraalVar... TStaticVar would join class TStaticVar?

Maybe make an init phase so that you could do something like:

PHP Code:
class TStaticVar:

function 
onClassJoined()
  {
  
join"TGraalVar" );
  } 
OR! Make it follow the Object Tree given in:
http://wiki.graal.net/index.php/Crea...F_Object_Types

Example:

GuiArrayControl would join classes:
GuiArrayControl, GuiControl, and TGraalVar
Reply With Quote