I've got a custom NSView that displays a visualization and some subviews that I placed using Interface Builder that overlay some text. This is used as a secondary window that updates when I select a name from a list in the primary window, and that works great. And it's easy enough to save the current visualization as an image.

Now, I have a Save All Visualizations command that attempts to create an offscreen instance of this custom view and iterate through all the names, placing the appropriate dynamic text in the subviews and saving each in turn. The visualization gets captured in the image, but the text in the subviews does not. I'm currently using dataWithPDFInsideRect, but I've also tried creating an offscreen NSBitmapImageRep, stuffing it in a new graphics context and running drawRect on my custom view.

Do I need to ditch IB and programmatically addSubview for each text field? I've wracked my brain and the archives trying to figure out this one. It may be that my understanding of NSView is poor.

Thanks,
John
_______________________________________________

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

Reply via email to