Path: utzoo!attcan!uunet!mcvax!ukc!strath-cs!glasgow!cathy From: cathy@cs.glasgow.ac.uk (Catherine Anne Wood) Newsgroups: comp.windows.news Subject: Help required with damaged events Keywords: Damaged Events, Repair of Canvases etc Message-ID: <2726@crete.cs.glasgow.ac.uk> Date: 4 Apr 89 21:58:07 GMT Organization: Computing Sci, Glasgow Univ, Scotland Lines: 51 This time I think I am really going crazy .... After discovering to my cost that depending on retained canvas for fixing damage to items in a window is a BAD idea, I have been trying to catch Damaged events to do my own damage repair. However, it seems that Damaged events are not being generated ... or if they are they are too elusive for me to catch ! The test program I am using is simply displaying two ButtonItems which are overlapped, and then unmapping one. It remains visible until I repaint the whole window and its contents. Using eventlog, it appears that Damaged events are not generated for the ButtonItems, (but are being generated for the window's canvas when it is damaged). I am expressing interest in damaged events for the ItemCanvas of ButtonItems (I think!) and the ItemCanvases are opaque. I inserted the interest in the TrackInterests dictionary (the same place as the interests EnterEvent ExitEvent etc are set up in liteitem.ps) ... see code below. /TrackInterests 10 dict begin % Code for Enter interests etc ..... /ClientDamaged /Damaged {ItemBegin RepairDamage ItemEnd} null ItemCanvas eventmgrinterest def end def } def TrackInterests is then passed to forkeventmgr i.e. /ItemEventMgr TrackInterests forkeventmgr def RepairDamage (at the moment) just prints out a message on the console to say it has been called .. this never happens. I guess I am doing something wrong somewhere .. can anyone help me please ? Thanks, Cathy. ARPANet: cathy%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk JANET : cathy@uk.ac.glasgow.cs UseNet: mcvax!ukc!cs.glasgow.ac.uk!cathy Mail : Cathy Wood, Computer Science, 17 Lilybank Gardens, GB-GLASGOW G12 8QQ : 041 339-8855 ext 6040