That is a problem; I think this is a pdfkit bug, and I need to register it 
(slowly figuring these things out). What I did to isolate the problem was 
create a project with a window in which I just dropped a pdfview and 
pdfthumbview on (didn't even bother to change the sizing. Hardcoded an URL to a 
pdf; created a PDFDocument init'd with the url and then did [mypdfview 
setDocument: myURL]. All of that in the windowcontrollerDidLoadNib method.

same problem. pdfviews can't be set in the init'd in the 
windowControllerDidLoadNib; but I think the problem is bigger.

I relocated the load code so it was activated by a button rather than the 
windowController: same problem. There's a definite pdfview problem...

Solutions?


On Jun 14, 2012, at 5:08 PM, Graham Cox wrote:

> 
> On 15/06/2012, at 8:15 AM, Matthew Weinstein wrote:
> 
>> It almost feels like the windowControllerDidLoadNib is happening too quickly 
>> (or something).
> 
> 
> Note what that method literally tells you - the window controller loaded the 
> nib. That doesn't mean that the actual window was instantiated yet (with all 
> its views). A window controller lazily loads the window when it is actually 
> required, which is a bit later. You can use the controller's windowDidLoad 
> method to find out when that has happened.
> 
> The probable reason this is different on Lion is because NSDocument is a very 
> different beast on Lion. It is often invoked on a background thread and 
> various interface-less document objects are made to support Versions and 
> Autosaving. It's a rather complex situation on Lion which *appears* to assume 
> a very great deal about how your app has subclassed NSDocument. For example, 
> when browsing Versions, each version you see is an actual instance of your 
> NSDocument subclass complete with its window - it's not just the snapshot 
> image you might have thought. Scary stuff.
> 
> --Graham

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to