Hello,
I have a Web View that loads a HTML form and I am getting the content of the Web View and creating a PDF from it. My app however keeps crashing after creating the NSData object using dataWithPDFInsideRect. Basically whenever I try to do anything with the Web View, I get an error. Here is the order of events:
Create a PDF data object and save the PDF to disk: (this works fine)
set pdfData to webView's mainFrame's frameView's documentView's dataWithPDFInsideRect_((webView's mainFrame's frameView's documentView's frame()))
tell current application's class "PDFDocument" to set pdfDocument to alloc()'s initWithData_(pdfData)
pdfDocument's writeToFile_(outputPath)
If I then try to do pretty much anything else with the variable webView, my app crashes. Even just trying to recall the window that the webView is in crashes the app. I can, however, do something like
webView's setMainFrameURL_("http://www.apple.com")
But again, if I try something like makeKeyAndOrderFront on the window containing the Web View or try isLoading on the Web View itself, I get an errors such as the following:
Any ideas? Thank you in advance!