Re: Formatting elapsed time

2012-09-07 Thread Dave DeLong
This isn't quite correct. "j:mm" is a template, not an actual format string. When you run it through every possible locale, you get this output: http://pastie.org/4683032 The presence of the colon in the template is incidental. It would work just fine if you used "jmm" as well. With the res

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Eric Wing
On 9/7/12, Uli Kusterer wrote: > On 06.09.2012, at 09:48, Eric Wing wrote: >> I want the thing I'm rotating to stay centered relative to its >> original screen position, so when I resize the window, I need the view to >> not shift in absolute terms despite the fact that the window's origin >> (lo

Re: Formatting elapsed time

2012-09-07 Thread Gary L. Wade
If you want this localized, you don't want to assume the use of colons, the presence of an "a" or even the physical placement within the string for "am"—it could be at the start. Look at NSLocale and some of the lower-level frameworks like those in CoreFoundation and ICU to get something you'll

Re: Formatting elapsed time

2012-09-07 Thread Dave DeLong
Run @"j:mm" through +[NSDateFormatter dateFormatFromTemplate:options:locale:] and the strip the "a" character out of the resulting string. Dave Sent from Jane On Sep 7, 2012, at 3:33 PM, Jens Alfke wrote: > > On Sep 7, 2012, at 3:00 PM, Dennis wrote: > >> How do you eliminate the am/pm? T

Re: Formatting elapsed time

2012-09-07 Thread Dennis
On Sep 7, 2012, at 3:33 PM, Jens Alfke wrote: > On Sep 7, 2012, at 3:00 PM, Dennis wrote: > >> How do you eliminate the am/pm? There does not appear to be a built-in date >> formatter style that does that. > > If you don’t use the built-in styles you can specify an exact format string. > But

Re: Formatting elapsed time

2012-09-07 Thread Jens Alfke
On Sep 7, 2012, at 3:00 PM, Dennis wrote: > How do you eliminate the am/pm? There does not appear to be a built-in date > formatter style that does that. If you don’t use the built-in styles you can specify an exact format string. But I suppose then you’ve lost localizability. Hm. There may n

Re: Formatting elapsed time

2012-09-07 Thread Dennis
How do you eliminate the am/pm? There does not appear to be a built-in date formatter style that does that. On Sep 7, 2012, at 2:57 PM, Jens Alfke wrote: > > On Sep 7, 2012, at 11:37 AM, Dennis wrote: > >> I'm getting stuck trying to format a variable quantity of elapsed time for >> the user

Re: Formatting elapsed time

2012-09-07 Thread Dennis
I imagine it is tedious! I would think that even formatting for different locales could be rather involved. On Sep 7, 2012, at 2:45 PM, Rick Mann wrote: > I've had to write my own code to do this. It's not at all hard, but gets > tedious when you decide to expand relative times to things like "

Re: Formatting elapsed time

2012-09-07 Thread Jens Alfke
On Sep 7, 2012, at 11:37 AM, Dennis wrote: > I'm getting stuck trying to format a variable quantity of elapsed time for > the user's locale. The NSDateFormatter class seems to only provide formats > for actual times (e.g. "1:30 AM"). What I need to do is turn 1 hour and 30 > minutes into "1:3

Re: Malloc Error: pointer being freed was not allocated

2012-09-07 Thread Jens Alfke
On Sep 7, 2012, at 12:01 PM, Richard Somers wrote: > MyApp(469,0x1009fbcc0) malloc: *** error for object 0x12f6b19a0: pointer > being freed was not allocated *** set a breakpoint in malloc_error_break to > debug > Following the instructions and adding a symbolic break point > (malloc_error_br

Re: Formatting elapsed time

2012-09-07 Thread Rick Mann
I've had to write my own code to do this. It's not at all hard, but gets tedious when you decide to expand relative times to things like "about an hour ago," "tomorrow," etc. -- Rick On Sep 7, 2012, at 11:37 , Dennis wrote: > I'm getting stuck trying to format a variable quantity of elapsed

Re: What is NSView's anchorPoint/origin/axis for setFrameCenterRotation?

2012-09-07 Thread Eric Wing
On 9/6/12, Eric Wing wrote: > I want to rotate an NSView around its center. (Example: Imagine me > rotating a magnetic compass around so the North pointer rotates around > to the bottom. > > I thought setFrameCenterRotation would do this for me. But when I try > it (10.8), it always rotates about

Re: autosavesInPlace and sandbox

2012-09-07 Thread Lee Ann Rucker
On Sep 7, 2012, at 10:54 AM, Kyle Sluder wrote: > On Fri, Sep 7, 2012, at 10:49 AM, Charles Srstka wrote: >> On Sep 7, 2012, at 10:01 AM, Kyle Sluder wrote: >> >>> I must stress that this is nothing more than an educated guess on my part. >>> But if people find Lion Autosave confusing enough b

Re: autosavesInPlace and sandbox

2012-09-07 Thread Charles Srstka
On Sep 7, 2012, at 1:15 PM, Kyle Sluder wrote: > I guess the question is, "why are you saving a 4GB file?" Media editors > don't do that; they split the file into chunks and bundle them in a > project folder. For other apps, we have document wrappers. Here's a contrived, but possible, scenario:

Malloc Error: pointer being freed was not allocated

2012-09-07 Thread Richard Somers
I have an intermittent error that I can not make any progress on solving so I thought I would ask for some help from someone more experienced than myself in debugging. Program execution halts in Xcode with the following error: MyApp(469,0x1009fbcc0) malloc: *** error for object 0x12f6b19a0: poi

Re: autosavesInPlace and sandbox

2012-09-07 Thread Erik Stainsby
What autosave really needs is a reliable differential incremental save engine. This could cache diffs and perform a merge during "slow moments" of user inactivity. I wonder if this is where Apple might be heading with this technology. ~ Erik Sent from my iCapsule somewhere in orbit On 2012-0

Formatting elapsed time

2012-09-07 Thread Dennis
I'm getting stuck trying to format a variable quantity of elapsed time for the user's locale. The NSDateFormatter class seems to only provide formats for actual times (e.g. "1:30 AM"). What I need to do is turn 1 hour and 30 minutes into "1:30" for my US English settings, and the appropriate str

Re: autosavesInPlace and sandbox

2012-09-07 Thread Marco S Hyman
> Basically, there is no case in which the old save paradigm makes sense > and the new autosave paradigm does not. Autosave does not make sense for those users who create new documents by editing an existing doc then doing a save-as. OK, it works if they remember to do the save-as before making an

Re: autosavesInPlace and sandbox

2012-09-07 Thread Kyle Sluder
On Fri, Sep 7, 2012, at 11:05 AM, Charles Srstka wrote: > On Sep 7, 2012, at 12:54 PM, Kyle Sluder wrote: > > >> - An app that opens a particularly large or complex document type such > >> that the save operation would take a large amount of time won't work very > >> well in the autosave paradigm

Re: autosavesInPlace and sandbox

2012-09-07 Thread Charles Srstka
On Sep 7, 2012, at 12:54 PM, Kyle Sluder wrote: >> - An app that opens a particularly large or complex document type such >> that the save operation would take a large amount of time won't work very >> well in the autosave paradigm. > > This problem already exists with the old timer-based autosa

Re: autosavesInPlace and sandbox

2012-09-07 Thread Kyle Sluder
On Fri, Sep 7, 2012, at 10:49 AM, Charles Srstka wrote: > On Sep 7, 2012, at 10:01 AM, Kyle Sluder wrote: > > > I must stress that this is nothing more than an educated guess on my part. > > But if people find Lion Autosave confusing enough by itself, do you think > > Apple really wants two sav

Re: autosavesInPlace and sandbox

2012-09-07 Thread Charles Srstka
On Sep 7, 2012, at 10:01 AM, Kyle Sluder wrote: > I must stress that this is nothing more than an educated guess on my part. > But if people find Lion Autosave confusing enough by itself, do you think > Apple really wants two saving paradigms forever? There are certain types of apps for which

Re: iOS popovers - View lifecycle.

2012-09-07 Thread Mikkel Islay
On 7 Sep 2012, at 17:48, Alex Zavatone wrote: > Well, wouldn't we expect that the popover controller would message the events > to the view within it? It seems strange that view controller events are > completely thwarted by using the popover controller. If no view is added to the VC view-hier

Re: iOS popovers - View lifecycle.

2012-09-07 Thread Alex Zavatone
Well, wouldn't we expect that the popover controller would message the events to the view within it? It seems strange that view controller events are completely thwarted by using the popover controller. So, using Xcode 4.2, I can't look inside popoverViewController and even see what the relatio

Re: View based outline view and custom NSTableCellViews

2012-09-07 Thread Jean Suisse
Hi, Thank you for your reply. Yes, I have been thinking for a long time that I should take a really good look to bindings. I should invest some time in it. Thank you for your help. Cheers, Jean On 7 sept. 2012, at 11:00, Uli Kusterer wrote: > Jean, > > I think your problem isn't the table,

Re: iOS popovers - View lifecycle.

2012-09-07 Thread Alex Zavatone
TY. To help clarify the object relationships, is there anything in Xcode 4.x that is even remotely like the object hierarchy inspector/graph that we had in 3.1.3? Sent from my iPad On Sep 7, 2012, at 10:46 AM, Mikkel Islay wrote: > > On 7 Sep 2012, at 16:39, Alex Zavatone wrote: > >> I just

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-07 Thread Uli Kusterer
On Sep 7, 2012, at 4:19 PM, MeldaProduction wrote: > I'm afraid this is not possible. The executables must be the same. You must > understand that building 70 plugins is quite demanding and currently the 3 > interfaces would need 3x more time and space (which means 1.2GB compressed > !! ) just bec

Re: autosavesInPlace and sandbox

2012-09-07 Thread Kyle Sluder
On Sep 7, 2012, at 7:45 AM, Markus Spoettl wrote: > On 9/7/12 3:36 PM, Mike Abdullah wrote: >>> you are not asked if you want to keep it >> >> So here's the real problem it seems; you run into customers accidentally >> modifying documents. Normally they would be warned as they quit or close the

Re: iOS popovers - View lifecycle.

2012-09-07 Thread Mikkel Islay
On 7 Sep 2012, at 16:39, Alex Zavatone wrote: > I just noticed that when we open a popover ala a segue, that after it is > dismissed, when it is opened again, none of the view lifecycle methods are > called. > > viewWillAppear, viewDidAppear both don't get called, but it appears just fine. >

Re: autosavesInPlace and sandbox

2012-09-07 Thread Markus Spoettl
On 9/7/12 3:36 PM, Mike Abdullah wrote: you are not asked if you want to keep it So here's the real problem it seems; you run into customers accidentally modifying documents. Normally they would be warned as they quit or close the doc, but with autosave-in-place, that doesn't happen. Some good

iOS popovers - View lifecycle.

2012-09-07 Thread Alex Zavatone
iOS 5.0.1 I just noticed that when we open a popover ala a segue, that after it is dismissed, when it is opened again, none of the view lifecycle methods are called. viewWillAppear, viewDidAppear both don't get called, but it appears just fine. Is this expected behaviour? Does presentPopoverF

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-07 Thread MeldaProduction
I'm afraid this is not possible. The executables must be the same. You must understand that building 70 plugins is quite demanding and currently the 3 interfaces would need 3x more time and space (which means 1.2GB compressed !! ) just because stupidity of Cocoa design, total no-go. There are 2 mor

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Mike Abdullah
On 7 Sep 2012, at 13:26, Oleg Krupnov wrote: > Hi Mike, > > Interesting, thanks. I wasn't aware that CGImageSource was the fastest > on the Mac. QuickLook sometimes seems so amazingly fast, even with > giant images, so that it made me think it uses some more advanced or > more low-level technol

Re: autosavesInPlace and sandbox

2012-09-07 Thread Mike Abdullah
On 6 Sep 2012, at 23:27, Georg Seifert wrote: > > On 06.09.2012, at 15:32, Mike Abdullah wrote: > >> On 6 Sep 2012, at 13:36, Georg Seifert wrote: >> >>> Hi, >>> >>> I have a problem. My app (documents based) does not support Lions Version >>> (returns NO in autosavesInPlace). This worked

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Dave Keck
In my experience I've found that QLThumbnailImageCreate() significantly outperforms CGImageSourceCreateThumbnailAtIndex(). I speculate that this is because QLThumbnailImageCreate() talks to a daemon process that keeps thumbnails cached in memory even after your process exits, rather than re-creatin

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Oleg Krupnov
Hi Mike, Interesting, thanks. I wasn't aware that CGImageSource was the fastest on the Mac. QuickLook sometimes seems so amazingly fast, even with giant images, so that it made me think it uses some more advanced or more low-level technology than CGImageSource which seems pretty old, isn't it. My

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Mike Abdullah
I would be surprised if QuickLook is bothering to use anything lower-level. The raw truth of it is that CGImageSource is intended to be the fastest image-decoding library on the Mac. Quick Look should have a possible benefit in raw speed because it might have already cached a file's thumbnail.

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Oleg Krupnov
I guess I should have asked "Is QuickLook implemented upon CGImageSource/CGImage or lower-level libraries under the hood?" I mean, the question is not I CGImageSource vs. CGImage, but rather CGImageSource/CGImage vs. lower-level libraries like libjpeg etc. I tried to measure the performance of Qui

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Mike Abdullah
Your question in the subject makes little sense. CGImageSource is a means to create CGImages. Quick Look likely uses both therefore. Ultimately, you need to test different image loading routes to see which suits your needs. CGImageSourceCreateImageAtIndex Generates full-size images as fast as i

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Graham Cox
On 07/09/2012, at 7:14 PM, Uli Kusterer wrote: > distance between two points is sqrt(pow(a.x -b.x,2) + pow(a.y -b.y,2)), Or, much more simply, hypot( b.x - a.x, b.y - a.y ); --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Is QuickLook implemented upon CGImage or CGImageSource under the hood?

2012-09-07 Thread Oleg Krupnov
And what is the fastest method for image loading, QLThumbnailImageCreate or CGImageSourceCreateImageAtIndex? Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Uli Kusterer
On 06.09.2012, at 09:48, Eric Wing wrote: > I want the thing I'm rotating to stay centered relative to its > original screen position, so when I resize the window, I need the view to not > shift in absolute terms despite the fact that the window's origin (lower-left > corner) will need to move.

Re: View based outline view and custom NSTableCellViews

2012-09-07 Thread Uli Kusterer
Jean, I think your problem isn't the table, but that you're mixing up bindings and outlets. To connect an outlet, simply Control-Drag and hook it up. Use the little icons at the top of the inspector pane to switch to "Connections Inspector", which shows the list of all outlets, actions, bindin

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-07 Thread Uli Kusterer
On 06.09.2012, at 23:16, MeldaProduction wrote: > Aaaah, ok ;) thanks. But now - will this actually help? I mean this > basically takes one class and creates another class from it realtime. But > if plugin A is created, then plugin B is created (which takes classes from > A unfortunatelly), would