Re: Phix+EuGTK

new topic     » goto parent     » topic index » view thread      » older message » newer message

Actually, this might will be more to your liking

class Widget 
  public atom handle  
end class  
 
integer hdict = new_dict("handle lookup") 
  
class Window extends Widget  
  function Window()  
    this.handle = 17 
    setd(this.handle,this,hdict) 
    return this  
  end function  
  procedure ~Window()  
    deld(this.handle,hdict) 
  end procedure  
end class 
  
function get_by_handle(integer handle) 
    return getd(handle,hdict) 
end function 
 
Window w = new() 
 
?w 
?get_by_handle(17) 
 
?dict_size(hdict) -- 1 
delete(w) 
?dict_size(hdict) -- 0 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu