From: Tom Sawyer Date: 2002-07-17T01:49:49+09:00 Subject: Re: TkText no -textvariable workaround? actually, Dossy, your post was a bit helpful. what i'm after also sort of relates to the observer pattern. but in attempting to get ruby to help me out with this i've stumbled upon an interesting question in its own right (IMHO): in this simple example: a = 1 who is the receiver and what is the method? ...*long pause*... i wondered this b/c i had the bright idea that i'd just modify the Object class with an obverser pattern of sorts, to solve my problem, but, well obviously that didn't go as planned and hence this question. ~transami On Tue, 2002-07-16 at 10:23, Dossy wrote: > On 2002.07.17, Tom Sawyer wrote: > > > > i still wonder if a ruby callback of some sort could pull it off. is > > there a way to callback on method invocations? > > What you're looking to implement is the Controller portion of the > Model-View-Controller pattern. > > In Tcl/Tk, they simplified this by putting the Controller in the > View using the -textvariable argument to denote the Model that the > View should use. > > When Tk was implemented for Ruby, I guess making this work wasn't > as straightforward? So, you'll have to implement the Controller > seperately, I guess. > > -- Dossy > > -- > Dossy Shiobara mail: dossy@panoptic.com > Panoptic Computer Network web: http://www.panoptic.com/ > "He realized the fastest way to change is to laugh at your own > folly -- then you can let go and quickly move on." (p. 70) > -- ~transami _(")_ dobee dobee do... \v/ ^ ^