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

[REBOL] Re: Adding an action to an existing event

From: brett:codeconscious at: 10-Aug-2002 11:57

Hi Thorsten,
> I looked into the feel-object of the field-style. I found out that the > up-action i need for my purpose is not used. > > how can i add my up-action to the existing engage-event of the field-style > whitout writing it completely new?
The easy part is to say, make a clone the object (so you do not affect normal fields). Engage is just a function. So if it makes sense you could save the old one and write a new one that will do what you want, but call the old one (only if a condition is met perhaps) - in a way chaining them. Maybe this will work for you: stylize/master [ special-field: field with [ feel: make ctx-text/edit [ engage: func [face act event][ either 'up = act [ print "MOUSE UP" ][ ctx-text/edit/engage face act event ] ] ] ] ] view layout [special-field] Brett.