I am trying to work out how to flash two rects in a frame. I have it working with one rect using the view cacheImageInRect method but this only works on one rect. I tried putting two such calls in serial but the second one doesn't work for some (optimisation?) reason. Then I tried copying and modifying the code from the GNUstep implementation of the method but this is too hard for me since I'm not a serious ObjC or Cocoa programmer - the method is designed to be run as an instance method and the code wasn't suitable for just calling directly in a routine. I never got it to work. So, I subclassed NSWindow and tried adding a "cacheImagesInRects" method but again, I couldn't get this to work - the "restoreImagesInRects" never seemed to restore anything.
I also tried just colouring the rects with NSRectFillListWithColorsUsingOperation, hoping to be able to use NSCompositeLighter and then NSCompositeDarker to reverse the change. Again, no luck - it almost looked right with a simple DeviceWhite 50% alpha fill and then Lighter/Darker change but not quite. Any other colour (which I needed) just failed to reverse and the rects stayed in the "on" flash state. I've spent far, far too much time on this now and I realise I'm just not knowledgeable enough in ObjC or Cocoa. So, any hints on how to approach flashing two rectangles at the same time? This was so easy in Carbon - InvRect(). PK _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com