Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Catching layout face events

From: brett:codeconscious at: 22-Jan-2002 21:17

> Just looking for alternatives really, and thinking about how best to set > things up in cases where you have multiple layouts to deal with. I.e. do
> handle these things locally, in each layout, do you have a general
> you use with insert-event-func and check the face, or do you set up unique > functions for each layout and insert them all with insert-event-func? That > kind of stuff.
I see what you mean. I'm guessing that, with your reference to resize, that the things you refer to are things you want to do over and over again. Similar thoughts occurred to me when I was thinking about what a View gui development framework could look like. I like the concept of "delegation". It is where the thing that needs some functionality delegates the workload to another. Pretty obvious eh? Anyways... Feel objects demonstrate an elegant way to reuse behaviour through delegation. For example FIELD and TEXT both use the same feel (that living in ctx-text/swipe). [You can see the feel identified (where it lives) and the code that defines it for each style if you right click on the style in my vid-ancestry program (rebsite: Code C. / Docs / VIDAncestry).] I've worked with Powerbuilder's PFC framework. It uses a service based architecture. Reusable behaviour is put into a delegation class (object) or service class. It works really well. PFC has a "Resize" service too. Now Rebol is not constrained by brittle old compiled classes, but I think the service based architecture idea is powerful. Sounds pretty good to me. All that's left is to work out how a service based architecture can work on top of View. Might go and have a play now :) Brett.