• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bizarre window frame saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bizarre window frame saving


  • Subject: Bizarre window frame saving
  • From: Nicholas Riley <email@hidden>
  • Date: Thu, 27 Jun 2002 05:37:46 -0500
  • Mail-followup-to: email@hidden

Hi,

Still working on window sizing issues. Since replacing the aspect
ratio stuff, my code looks like this:

NSLog(@"imageView is %@, bounds are %@, image is %@", imageView,
NSStringFromRect([imageView bounds]), [imageView image]);
[imageView setImage: nil];
[imageWindow setContentSize: imageSize];
frameSize = [imageWindow frame].size;
[imageWindow setMaxSize: frameSize];
[imageView setImage: image];
NSLog(@"imageView is %@, bounds are %@, image is %@", imageView,
NSStringFromRect([imageView bounds]), [imageView image]);

The window imageWindow just contains one NSImageView, imageView, which
has both internal springs set. I have an autosave name set for the
imageWindow. The first time running the program with the autosave
data cleared, I get:

2002-06-27 05:33:02.503 DockCam[6679] imageView is <NSImageView:
0x1be9a0>, bounds are {{0, 0}, {446, 326}}, image is (null)
2002-06-27 05:33:02.554 DockCam[6679] imageView is <NSImageView:
0x1be9a0>, bounds are {{0, 0}, {360, 244}}, image is NSImage 0x8a6c0
Size={360, 244} Reps=(
NSBitmapImageRep 0x26b45b0 Size={360, 244}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=360x244 Alpha=NO
)

Looks fine. I quit and this data is saved.

{"NSWindow Frame DockCam" = "10 824 360 266 0 0 1600 1178 "; }

Relaunching my app, I now get:

2002-06-27 05:33:46.981 DockCam[6799] imageView is <NSImageView:
0x1bea30>, bounds are {{0, 0}, {360, NaN}}, image is (null)
2002-06-27 05:33:47.033 DockCam[6799] imageView is <NSImageView:
0x1bea30>, bounds are {{0, 0}, {360, NaN}}, image is NSImage 0x784f0
Size={360, 244} Reps=(
NSBitmapImageRep 0x23f5320 Size={360, 244}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 Pixels=360x244 Alpha=NO
)

The image is no longer visible. NaN? How is this appearing? Is this
my bug or Cocoa's? I've never seen anything like this with autosaving
in my other apps.

Thanks,

--
=Nicholas Riley <email@hidden> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: RE: NSHost and the IP addresses ...
  • Next by Date: Re: NSHost and the IP addresses ...
  • Previous by thread: Re: NSHost and the IP addresses ...
  • Next by thread: NSDate vs. CFDate
  • Index(es):
    • Date
    • Thread