[Borges-users] Window.rb Rubyfication

Kaspar Schiess eule at space.ch
Thu Apr 22 09:15:49 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

I translated Window.rb into Ruby from Smalltalk; I am using it for one
of my projects.

Usage is as follows:
c = MyComponent.new
w = Window.new
w.title 'My Window'
w.content = c

call w

But you can also

class MyComponent < Borges::Window

	def render_on(r)
		r.text 'window content here'
	end
end
call MyComponent.new

I am not happy with that second variant, since overriding render_on
instead of render_content_on seems somewhat unintuitive.

Feedback ?
kaspar - code philosopher

- -- stolen off the net --
"Reincarnation works backward in time... People who 'remember' the past
are all deluded -- the only ones who really remember past incarnations
remember the future, and they become science fiction writers."
		-- The Illuminatus! Trilogy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAh8WFFifl4CA0ImQRAnQ2AJ0cP7C4GABeLTYw8Vs6ZfVMywBSJQCgqoWn
gVCjsAAswW93BvkUpmSu2cM=
=OT65
-----END PGP SIGNATURE-----


More information about the Borges-users mailing list