View Single Post
  #9  
Old 05-18-2007, 11:08 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
now i remember! I wanted some OO functionality without using classes.
If I did this:

PHP Code:
public function increment() {
this.count++;
}

function 
onCreated() {
 
= new TStaticVar;
 
x.increment this.increment;
 
x.count 1;
 
x.increment();  //x.count = 2?

Will x.count get incremented when x.increment() is called or will count get incremented in the script which created x?
__________________

Coming soon (Hopefully:P)
Reply With Quote