View Single Post
  #4  
Old 07-01-2006, 01:18 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Novo
How about this?

PHP Code:
function onCreated()
  {
  
temp.rank createSubObjectgang_Test"rank." );
  }

function 
createSubObjectobjstrPart )
  {
  
temp.oobj = new TStaticVar();
  
temp.vars getObjKeysobjstrPart );
  for ( 
temp.var: temp.vars )
    
makevar"temp.oobj."temp.var ) = makevar"obj.rank."temp.var );
  return 
temp.oobj;
  }

public function 
getObjKeysobjstrNeedle 
  { 
  if ( 
obj.type() != )
    return 
getstringkeysobj );

  
temp.vars obj.savevarstoarrayfalse ); 
  for ( 
temp.var: temp.vars 
    if ( 
temp.var.startsstrNeedle ) ) 
      
temp.keys.addtemp.var.substringstrNeedle.length(), temp.var.pos("=") - strNeedle.length()) );

  return 
temp.keys;
  } 
w-hat? If you're going to use spaces in your style, atleast be consistant with it. But anyways:

If that 'getObjKeys' function is what I think it is, it's redundant. You can just use this.objectname.getvarnames() to return an array with the list of members in it.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote