NSImageView broken

  • Hi

    I have a sub-class of an NSImageView within an NSScrollView. The user
    can set various magnifications, scroll, and then click and drag to
    crop a rectangle and save a thumbnail in a CoreData database. So for a
    happy family picture the user can crop mugshots for each person and
    save them against that person. Still works fine in Tiger but in
    Leopard, as soon as the user clicks on the imageView it is immediately
    re-rendered as a a very low resolution image. I am using Xcode3 set to
    be 2.4 compatible and Target SDK = 10.4 Universal.

    I suspect it may have something to do with the new animation functions
    in Leopard and can send the app if you need to see what is happening.

    How do I fix it - I tried returning NO for animation but it had no
    effect.

    Keith
  • I have more on this one. If I rotate the image 90/180/270 degrees then
    it all works fine - but I doubt the user wants all his mugshots upside
    down - down-under we can handle that but ...

    Keith
  • Here I am answering my own question.  It looks like image caching in
    Leopard is different from in Tiger. When I rotated the image it was
    cached.  So what's the new rules about image caching?

    Keith
  • In Tiger I relied on the NSImageView to retain the image data - after
    all it is doing the drawing so it should.  I have added

    [image setDataRetained:YES];

    before I do the setImage: for the NSImageView and all works fine. But
    I should not need to do that - or should I?

    Keith
  • This one is interesting because after transferring the nib file from
    Tiger and recompiling on Leopard it worked fine - it was only after I
    made small change to the nib file that the NSImageView started
    behaving badly.

    Keith
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today