[#192] auto-loaded script? — Julian Fondren <julian@...>
Does ruby load any particular scripts upon startup?
13 messages
1999/01/17
[#193] Re: auto-loaded script?
— gotoken@... (GOTO Kentaro)
1999/01/17
In message "[ruby-talk:00192] auto-loaded script?"
[#194] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> >Does ruby load any particular scripts upon startup?
[#195] Re: auto-loaded script?
— matz@... (Yukihiro Matsumoto)
1999/01/18
Hi.
[#197] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> rb_load_file("/home/julian/.rubyrc"); /* this line added */
[#210] Get character with no wait — Gabriel <gabriel@...>
What is the best way to do a getc without waiting; so I can try to grab
8 messages
1999/01/25
[ruby-talk:00183] finalizer help please
From:
"Bryce" <crowdog@...>
Date:
1999-01-15 02:52:02 UTC
List:
ruby-talk #183
Here is my code:
!!! start here
require 'WINGKR'
require 'final'
require 'delegate'
class WinControl
def initialize ()
@createdFromHandle = false
@handle = 0
@autoDestroy = false
@destructor = WinControl.destructor ( self )
ObjectSpace.define_finalizer(self, @destructor )
end
def WinControl.destructor ( obj )
lambda {
require 'WINGKRUser32'
print "\n\r destructor"
print "\n\r obj is: ", obj.type
print "\n\r obj value is: ", obj
print "\n\r obj handle is: ", obj.handle
if @handle != 0 then
if DestroyWindow ( @handle ) != 0 then
print "\n\r Destroyed: ", @handle
else
print "\n\r Could NOT destroy: ", @handle
end
end
}
end
!!! end here
My problem is that the DestroyWindow function
does not get called and I get :
undefined method 'DestroyWindow' for WinControl
However, the method DestroyWindow is defined in the
WINGKRUser32 module which I did 'require' in the
lambda {...} section of the 'destructor'.
Could someone help on this please?
Thanks.
Bryce