Re: Problems with Universal Build...
Re: Problems with Universal Build...
- Subject: Re: Problems with Universal Build...
- From: Jerry LeVan <email@hidden>
- Date: Sun, 23 Dec 2007 21:13:36 -0500
On Dec 23, 2007, at 7:55 PM, Mike Abdullah wrote:
On 24 Dec 2007, at 00:39, Jerry LeVan wrote:
Hi,
I have a Universal build for my little app. It works fine on my
intel box but....
Running on my wife's PPC is turning out to be a disaster.
When running on the PPC box ( Quicksilver 2002 latest version of
tiger
with all the patches).
1) NSLog messages are not appearing in system.log
I believe they actually go in console.log
2) NSTemporaryDirectory() returns a / as the last character on the
Intel
side but not on the PPC box.
Why is this a problem? All the NSString methods for manipulating
paths are perfectly happy with either scheme.
3) the PDFDocument method writeToFile works fine on the Intel side
but goes off to la la land on the PPC box ie it never returns and
does not write the file. The app is still functional... It took
a while to figure this out since NSLog does not appear to be
working.
I run a NSRunAlertPanel just before the writeToFile call and
immediately
after the writeToFile returns. The first alert appears but the
second
one does not.?.?
Doh,
Any suggestions?
Jerry
You are right about the first two questions, checking the console I
find that the
following error appears immediately after the attempt to write the pdf
2007-12-23 20:12:35.052 ImageBrowser[2490] *** -[NSCFNumber isLocked]:
selector not recognized [self = 0x3efd00]
2007-12-23 20:12:35.053 ImageBrowser[2490] *** -[NSCFNumber isLocked]:
selector not recognized [self = 0x3efd00]
Since it works fine on Intel I am suspecting an error somewhere in the
ppc libraries...
Jerry
[ a little later...]
It appears that the code that works on the intel box to create a
multipage pdf
gets wonky on the ppc.
Here is the loop that creates the multipage pdf. ( I earlier created
an empty pdf )
If I test for i==0 instead of i==1 below the write works when I test
for 1
above two messages appear and control does not return from the
writeToFile.
(But the app is still responsive).
----------------------------
int fcnt = [fileNameList count];
int i;
for(i=0;i< cnt;i++) {
theImage =[ [NSImage alloc] initWithContentsOfFile: [fileNameList
objectAtIndex:i]];
NSImageView *pdfView = [[NSImageView alloc]
initWithFrame:NSMakeRect(0,0,
[theImage size].width,
[theImage size].height)];
[pdfView setImage:theImage];
NSData *pdfData;
pdfData = [pdfView dataWithPDFInsideRect:[pdfView bounds]];
PDFDocument * tmpPage = [[PDFDocument alloc] initWithData: pdfData];
[myBook insertPage:[ tmpPage pageAtIndex: 0] atIndex: i];
if( i==1) [myBook writeToFile:@"/Users/marijo/Desktop/bar.pdf"];
<--- NEVER RETURNS IF I=1
[pdfView release];
[tmpPage release];
[theImage release];
[filesLeft setIntValue: --fcnt];
[filesLeft displayIfNeeded];
}
------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden