PDFKit pdf version

2011-08-11 Thread Florian Soenens
Hi list, i've seen this discussion before around 2006 but found no relevant answer, here goes: We have a Foundation tool which adds annotations to a pdf and saves the pdf to disk again. We use the PDFKit classes for that. Now, when processing a pdf that has pdf-version 1.5 (Created from InDesi

Re: Flipped horizontal NSRulerView?

2011-08-11 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/10/11 9:47 PM, Graham Cox wrote: > Yes, I think so - subclass & override -drawHashMarksAndLabelsInRect. > I think the comment that the horizontal ruler already assumes a > flipped coordinate system refers to the fact that it draws text, > which li

Drag & Drop/Pasteboard issue in Lion

2011-08-11 Thread Half Activist
Hello, I'm working on a project where i can drag items from the Address Book (persons) and drop them on a view to add them (actually read the vCard). Everything worked fine up to Lion. Now, the pasteboard gives me the type public.vcard as available, but no data is availabl

Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?

2011-08-11 Thread Daniel Vollmer
On 4 Aug 2011, at 20:25, Quincey Morris wrote: > On Aug 4, 2011, at 03:12, Daniel Vollmer wrote: > >> On 3 Aug 2011, at 19:20, Quincey Morris wrote: >> >>> By modifying the frame of what? You should be changing the scroll view >>> frame, but you make it sound like you're changing the table vie

Re: Saving a rotated image

2011-08-11 Thread charisse napeÿfffff1as
I can already rotate an image. But I don't know how to save it in that current state. From: Mike Abdullah To: charisse napeÿf1as Cc: "cocoa-dev@lists.apple.com" Sent: Wednesday, August 10, 2011 11:23 PM Subject: Re: Saving a rotated image Break the probl

Re: Saving a rotated image

2011-08-11 Thread Roland King
Something like that will work to write the contents of image, whatever it is, to a file. NSData *data = UIImagePNGRepresentation( image ); [ data writeToURL:fileURL atomically:YES ]; But how are you rotating the image, are you actually making a bitmap context an

Strange window behavior

2011-08-11 Thread McLaughlin, Michael P.
I have a window showing a custom NSView that I move off and on the screen at different times via orderOut and makeKeyAndOrderFront. The window, created in Xcode 4, is set to be fixed from top and left. However, every time it is reshown, it is staggered a bit down and to the right. Is t

Re: Strange window behavior

2011-08-11 Thread Jens Alfke
On Aug 11, 2011, at 7:51 AM, McLaughlin, Michael P. wrote: > The window, created in Xcode 4, is set to be fixed from top and left. > However, every time it is reshown, it is staggered a bit down and to the > right. Does the window have an NSWindowController? If so, you’re probably running int

Re: Main menu update problem

2011-08-11 Thread Michael Domino
Laurent, The doc for showWindow says: "If the window is an NSPanel object and has its becomesKeyOnlyIfNeeded flag set to YES, the window is displayed in front of all other windows but is not made key; otherwise it is displayed in front and is made key." My window is an NSWindow, so showW

Re: Main menu update problem (SOLUTION)

2011-08-11 Thread Michael Domino
This works to update the main menu. Kind of a kludge, since the menu is already set as visible, but it must also force a redraw. [NSMenu setMenuBarVisible:YES]; [MyWindowController showWindow:self]; On Aug 10, 2011, at 5:42 PM, Laurent Daudelin wrote: On Aug 10, 2011, at 14:25, Michael Domin

Re: Strange window behavior

2011-08-11 Thread McLaughlin, Michael P.
Thanks for the tip! I do not have my own window controller but I do call - (void)windowControllerDidLoadNib:(NSWindowController *) aController whereupon I can call [aController setShouldCascadeWindows:NO]; When I do that, the windows do not move :-) On the other hand, after adjusting their

Re: Strange window behavior

2011-08-11 Thread Kyle Sluder
On Thu, Aug 11, 2011 at 10:21 AM, McLaughlin, Michael P. wrote: > On the other hand, after adjusting their initial positions, the windows (with > two overlapping) now stretch across 1300 pixels.  I hope there are no > displays narrower than that. There are. The MacBook and original MacBook Air

Drawing Chinese text to PDF

2011-08-11 Thread Stevo Brock
Hi All, We have an existing PDF Report creation module in one of our apps that is working great... for English text. This is what we are doing: NSFont* font = [NSFont fontWithName:@"Helvetica" size:12.0]; CGContextSelectFont(state->mContextRef, [[font fontName] UTF8String], [f

Re: Saving a rotated image

2011-08-11 Thread David Duncan
Are you rotating a UIImage, or rotating a UIImageView? The former implies you are drawing the image to a destination, in which case the answer is to capture that drawing. The latter implies that you are rotating *the presentation* of the image, which is a different operation from rotating the im

Re: Drawing Chinese text to PDF

2011-08-11 Thread David Duncan
On Aug 11, 2011, at 10:57 AM, Stevo Brock wrote: > We have an existing PDF Report creation module in one of our apps that is > working great... for English text. This is what we are doing: > > NSFont* font = [NSFont fontWithName:@"Helvetica" size:12.0]; > CGContextSelectFont(state-

Drag and Drop to Finder, destination location

2011-08-11 Thread Chris Paveglio
I've been trying to wrap my head around how to drag a file reference out of my application's table, and onto the Desktop or Finder window, and have that file be either moved or copied there. I've read a lot of posts here which are mostly old, on the topic, and not many give code examples of what

Re: Drawing Chinese text to PDF

2011-08-11 Thread Stevo Brock
Hi David, Thanks so much for the bump in the right direction. We're now using NSGraphicsContext + NSString drawAtPoint for a quick and simple solution and it seems to be working great. -Stevo On Aug 11, 2011, at 11:04 AM, David Duncan wrote: > On Aug 11, 2011, at 10:57 AM, Stevo Brock wrote

Re: Drag and Drop to Finder, destination location

2011-08-11 Thread Nick Zitzmann
On Aug 11, 2011, at 12:57 PM, Chris Paveglio wrote: > I've been trying to wrap my head around how to drag a file reference out of > my application's table, and onto the Desktop or Finder window, and have that > file be either moved or copied there. I've read a lot of posts here which are > mos

migration to 10.6 SDK, loadNib problems

2011-08-11 Thread Philip White
Hello, I'm migrating my apps to the App Store and my projects to Xcode 4 and the 10.6 SDK. Now my app is crashing when I try to load the window nib that contains my preferences window. I'm getting infinite recursion as shown in this sample of the stack trace. I take it this is a KVO problem bu

Re: Drag and Drop to Finder, destination location

2011-08-11 Thread Jens Alfke
On Aug 11, 2011, at 11:57 AM, Chris Paveglio wrote: > The problem I have is that I cannot figure out how to get the reference to > the place where I am dropping the files in the Finder. What method returns > the file path string or NSURL of the drop location? You use what’s called a “promised”

Re: Crasher due to unsafe block implementation in -[NSTextView checkTextInRange:types:options:]?

2011-08-11 Thread Kyle Sluder
On Wed, Aug 3, 2011 at 3:32 PM, Aki Inoue wrote: > Another approach is to use multiple field editor objects so that you keep the > first editor content unmodified. That's not really an option in this situation. Our users' documents often consist of thousands of rich text cells. Creating one fiel

Re: UINavigationBar button look?

2011-08-11 Thread Rick Mann
In the end, this doesn't work. The black toolbar does not match the black nav bar. On Aug 10, 2011, at 22:10 , Luther Baker wrote: > http://touchthatfruit.posterous.com/multiple-uibarbuttonitems-in-uinavigationbar > > On Wed, Aug 10, 2011 at 11:33 PM, Rick Mann wrote: > >> Is there any way to

Re: UINavigationBar button look?

2011-08-11 Thread Luther Baker
I'm sure you tried it - but did you set them both to the same style? http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitDataTypesReference/Reference/reference.html#//apple_ref/c/tdef/UIBarStyle and same translucency? http://developer.apple.com/library/ios/#documentation/u

Re: UINavigationBar button look?

2011-08-11 Thread Rick Mann
Yeah, I tried both black opaque and translucent (against a black opaque nav bar). The UIToolbar is a different graphic (has no thin light line along the bottom), and in fact, in your blog post, you can see it eats out a section of the nav bar. The center line (where the gradient changes) is als

Re: Drag & Drop/Pasteboard issue in Lion

2011-08-11 Thread Raleigh Ledet
Sounds like you need to file a radar. raleigh On Aug 11, 2011, at 3:14 AM, Half Activist wrote: > Hello, > I'm working on a project where i can drag items from the Address Book > (persons) and drop them on a view to add them (actually read the vCard). > Everything worked fine up to L

connections appears to be not closing

2011-08-11 Thread Wilker
Hi guys, I'm having a little complicated problem here... The main task of my software is do some complex operations on big lists. For managing the operations I'm using NSOperationQueue, so I'm limiting to 5 operations at once (these operations use a lot of HTTP connections). So, since I wanna hav

confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Luther Baker
What is this statement actually doing? static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = & AVPlayerDemoPlaybackViewControllerRateObservationContext; Isn't the right side evaluated first? But it doesn't yet exist? It compiles ... but seems to be a recursive definition?? http

File Copy With Progress?

2011-08-11 Thread Todd Freese
Is there a Cocoa way in 10.6+ to copy a file with a progress call back? I would love to rid my code of calls to FSCopyObjectASync and all of it's non-sense. Thanks! Todd Freese The Filmworkers Club __ This email has been scann

Re: connections appears to be not closing

2011-08-11 Thread Jens Alfke
On Aug 11, 2011, at 4:06 PM, Wilker wrote: > it seems that the upload connections are being retained after I > finish it, so, the connections are alive, blocking new ones... Weird. You should be able to issue as many requests as you want, and CFNetwork will reuse a pool of connections for them.

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Jens Alfke
On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: > static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = & > AVPlayerDemoPlaybackViewControllerRateObservationContext; It’s initializing the variable to point to itself. Which seems sort of pointless, but I don’t know the context

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Luther Baker
I see. In this case, it is passed in as the context of a KVO registration ... and as such, it facilitates a direct equality test in the KVO handler. - (void)observeValueForKeyPath:(NSString*)path ofObject:(id)object change:( NSDictionary*)change *context:(void*)context* { if (context == AVPla

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Kyle Sluder
On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote: > > On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: > >> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = & >> AVPlayerDemoPlaybackViewControllerRateObservationContext; > > It’s initializing the variable to point to itself.

Re: File Copy With Progress?

2011-08-11 Thread Gary L. Wade
Not that I've found, and since that API leaked memory from 10.6 to 10.6.6 (fixed in 10.6.7), I even considered writing an observer thread to track progress—thousands of copy operations add up. - Gary L. Wade (Sent from my iPhone) On Aug 11, 2011, at 6:22 PM, Todd Freese wrote: > Is there a Co

Re: connections appears to be not closing

2011-08-11 Thread Wilker
Hi, I discovered the problem... Is not my issue, the problem is with a third service that the server users... Its limiting the request and server is responding bad because of that... At least my code is fine, just need to update server :) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Con

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread William Squires
It's a (pointer) variable whose contents is its own memory address (the '&' operator.) Because the declaration includes 'static', the compiler simply pulls the info from the symbol tree so it already knows what a 'ANPlayerDemoPlaybackViewControllerRateObservationContext' is (it's a 'void *'),

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread William Squires
On Aug 11, 2011, at 6:36 PM, Luther Baker wrote: > I see. > > In this case, it is passed in as the context of a KVO registration ... and > as such, it facilitates a direct equality test in the KVO handler. > > - (void)observeValueForKeyPath:(NSString*)path ofObject:(id)object change:( > NSDicti

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread William Squires
On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote: > On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote: >> >> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: >> >>> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext = & >>> AVPlayerDemoPlaybackViewControllerRateObservationCont

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread William Squires
Oops, my typo: of course I meant to type 'AVPlayerDemoPlaybackViewControllerRateObservationContext'... a 'N' got in there somehow! :) On Aug 11, 2011, at 9:18 PM, William Squires wrote: > It's a (pointer) variable whose contents is its own memory address (the '&' > operator.) Because the decl

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Ken Thomases
On Aug 11, 2011, at 9:27 PM, William Squires wrote: > On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote: > >> On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote: >>> >>> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: >>> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext

Application crashes after launching Open/Save dialogs

2011-08-11 Thread Sanyam Jain
Hi, I have a Carbon based application, in which platform Open/save dialogs are based on NSOpenPanel and NSSavePanel. Since, am accessing Cocoa stuff inside Carbon app, I did NSApplicationLoad() as suggested in one of Apple's document. Whenever another dialog window is launched after the Open/Sa

Glyphs/icons like in Mail.app

2011-08-11 Thread Geert-Jan Korsbø Nilsen
The icons in mail.app are somewhat discussed in the WWDC session 113 video, but there is not much documentation regarding this. Im using Adobe Illustrator to make vector icons, and save them as PDF, and use the naming convention iconn...@template.pdf. But Im not completely satisfied with the res

Re: Application crashes after launching Open/Save dialogs

2011-08-11 Thread Jens Alfke
On Aug 8, 2011, at 2:34 AM, Sanyam Jain wrote: > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libobjc.A.dylib 0x92dd3eec objc_msgSend + 44 A crash in objc_msgsend means a message was sent to a bad object pointer. Usually this means the object has a

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Jim Correia
On Aug 11, 2011, at 7:27 PM, William Squires wrote: > On Aug 11, 2011, at 6:51 PM, Kyle Sluder wrote: > >> On Thu, Aug 11, 2011 at 4:26 PM, Jens Alfke wrote: >>> >>> On Aug 11, 2011, at 4:10 PM, Luther Baker wrote: >>> static void *AVPlayerDemoPlaybackViewControllerRateObservationContext

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Jens Alfke
On Aug 11, 2011, at 8:59 PM, Jim Correia wrote: > For KVO contexts, you don't care about the value, but you do care that it is > unique. I generally use a selector for this purpose. It doesn’t require a separate definition, and it’s also easy to use it to tell the observer to delegate to the

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Kyle Sluder
On Thu, Aug 11, 2011 at 9:11 PM, Jens Alfke wrote: > > On Aug 11, 2011, at 8:59 PM, Jim Correia wrote: > >> For KVO contexts, you don't care about the value, but you do care that it is >> unique. > > I generally use a selector for this purpose. It doesn’t require a separate > definition, and it’

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Luther Baker
On Thu, Aug 11, 2011 at 9:26 PM, William Squires wrote: > ... > I believe you have two erroneous '*'s in there! '*context:' doesn't make > sense as part of a method signature in ObjC, and there shouldn't be an > asterisk after 'context' but before the opening '{' (an '*' comes before an > identif

Re: confused by what seems to be a recursive declaration/definition

2011-08-11 Thread Greg Parker
On Aug 11, 2011, at 9:11 PM, Jens Alfke wrote: > On Aug 11, 2011, at 8:59 PM, Jim Correia wrote: >> For KVO contexts, you don't care about the value, but you do care that it is >> unique. > > I generally use a selector for this purpose. It doesn’t require a separate > definition, and it’s also e

Totally baffled by Xcode 4

2011-08-11 Thread Graham Cox
I have a framework project and several apps that use it. Looked to me like the new workspace feature was a good idea - I can add all these related projects to the one workspace and have the framework built and kept up to date for any one of them. Xcode 4 claims that these interdependencies tare

drop folders on dock

2011-08-11 Thread Wilker
Hi, I'm trying to accept folder drops on dock icon, but I can't find how to do it... I'm already receiving some file types (I just had to declare them on Document Types), but I can't find where I configure it for accepting folders too... Any thoughts? --- Wilker Lúcio http://about.me/wilkerlucio/

RE: Application crashes after launching Open/Save dialogs

2011-08-11 Thread Sanyam Jain
Thanks a lot for the reply. I was able to figure out the problem. I was doing following sequence of things - - NSOpenPanel* openPanelRef = [[NSOpenPanel alloc] init]; // created an instance of open panel - MyCustomDelegate* openPanelDelegate = [[MyCustomDelegate alloc] init];

Re: Application crashes after launching Open/Save dialogs

2011-08-11 Thread Kyle Sluder
On Thu, Aug 11, 2011 at 10:35 PM, Sanyam Jain wrote: > Still I was wondering, System should not have send some message to the > delegate once the dialog is dismissed. > That's strange behavior. It's quite common, and something the documentation explicitly calls out. See the last paragraph of "Us