Re: Problems with runModalForWindow, looking for alternatives

2011-10-31 Thread Jens Alfke
On Oct 31, 2011, at 6:00 PM, Vojtěch Meluzín wrote: > I tried using runModalForWindow, but found following problems: > 1) The method seems to release the window or something. If I don't call > [NSWindow retain] before calling it, further calls lead to a crash. > Therefore I cannot show subwindows

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread Jens Alfke
On Oct 31, 2011, at 5:56 PM, Kyle Sluder wrote: > Nah, there's something odd about the quarantine system in the current > OS… download a file with Safari, double-click it, and it warns about > opening an app from the Internet. That’s actually appropriate depending on the file type — for instance

Re: Future for Mac applications

2011-10-31 Thread Mark Munz
Oops, I mixed up entitlements and sandboxing. Sandboxing is a subset of entitlements and it is possible to enable entitlements for iCloud without enabling sandboxing for the app. I thought I recalled engineers referencing iCloud & the sandbox together during WWDC, but I must have been mistaken. I

Re: Future for Mac applications

2011-10-31 Thread Mark Munz
On Mon, Oct 31, 2011 at 12:11 PM, Sean McBride wrote: > > It's also worth remembering that the Mac App Store is not required either, > unlike on iOS devices.  If you can't or don't want to sandbox, you can > distribute elsewhere. It's also worth noting that if you want to use iCloud, sandboxing i

Re: Is NSDateFormatter thread-safe?

2011-10-31 Thread Peter Edberg
On Oct 31, 2011, at 5:30 PM, cocoa-dev-requ...@lists.apple.com wrote: > Date: Mon, 31 Oct 2011 17:27:10 -0700 > From: Jens Alfke > Subject: Is NSDateFormatter thread-safe? > > I have some code that uses a shared NSDateFormatter instance to convert dates > to/from ISO-8601 format. This code is n

Speeding up image drawing?

2011-10-31 Thread Arbit Richardi
I'm looking for tips to speed image drawing on OS X — this is a primary function of my application. I started out naively with NSImage, switched to CGImage, tried layer backing, and now draw directly into a hosted layer with Quartz. I have an implementation using CATiledLayers but it doesn't add sp

Problems with runModalForWindow, looking for alternatives

2011-10-31 Thread Vojtěch Meluzín
Hi, I'm implementing audio-units plugin(s) using Cocoa views. The plugin occasionally shows a popup window and it is also possible that additional popups will be shown from the first one. In all cases it's needed to avoid all GUI processing of the plugin host and the main window, except for timers

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread Kyle Sluder
On Mon, Oct 31, 2011 at 3:45 PM, Jens Alfke wrote: > Are you sure they’re all really PNG files? It sounds like they’re not, if > Preview isn’t opening them. This warning should only show up for files with > content that’s executable in some sense. Quarantining isn’t asinine and this > kind of s

Re: Is NSDateFormatter thread-safe?

2011-10-31 Thread Roland King
It's not. Documented in the Thread Programming Guide. On 1 Nov, 2011, at 8:27, Jens Alfke wrote: > I have some code that uses a shared NSDateFormatter instance to convert dates > to/from ISO-8601 format. This code is now being invoked on multiple threads, > and I’m getting intermittent mall

Re: Is NSDateFormatter thread-safe?

2011-10-31 Thread Joar Wingfors
Hi Jens, NSDateFormatter is listed as thread-unsafe in the documentation, so you need to review how you're using your instances.

Is NSDateFormatter thread-safe?

2011-10-31 Thread Jens Alfke
I have some code that uses a shared NSDateFormatter instance to convert dates to/from ISO-8601 format. This code is now being invoked on multiple threads, and I’m getting intermittent malloc warnings about double frees, and one actual crash. My assumption was that an NSDateFormatter should be th

Re: Future for Mac applications

2011-10-31 Thread Gideon King
> >> sandboxing clearly hasn't >> been nailed down yet. > > It's also worth remembering that the Mac App Store is not required either, > unlike on iOS devices. If you can't or don't want to sandbox, you can > distribute elsewhere. > Yes, but the App store is a huge publicity opportunity and

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread Jens Alfke
On Oct 31, 2011, at 2:42 PM, G S wrote: > I downloaded a set of icons. If I select all the PNGs in Finder, > right-click, and say Open, I get this asinine warning and then two > Preview windows open: one with maybe eight files in it, another with > one file in it, and the remaining 119 files are

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread Jens Alfke
On Oct 31, 2011, at 2:42 PM, G S wrote: > I downloaded a set of icons. If I select all the PNGs in Finder, > right-click, and say Open, I get this asinine warning and then two > Preview windows open: one with maybe eight files in it, another with > one file in it, and the remaining 119 files are

Showing/hiding status bar

2011-10-31 Thread Rick Mann
I have an app that normally displays the status bar, but I'd like to hide the status bar when the user requests it so as to show the entire image I'm displaying (similar to the Photos app). Although I can hide the status bar, my UI is set up by iOS out of the way of it, so my window ends up bein

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread G S
> xattr -d com.apple.quarantine file... At least that one still works! Thanks, Ron. ___ 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(

Re: Core Data loading faulted object?

2011-10-31 Thread Rick Mann
On Oct 31, 2011, at 15:25 , Mike Abdullah wrote: > What store type are you using? NSSQLiteStoreType > > On 31 Oct 2011, at 22:06, Rick Mann wrote: > >> Hi. I'm seeing a situation where my app starts up, fetches all instances of >> a particular entity (which is just one), and that object end

Re: Core Data loading faulted object?

2011-10-31 Thread Mike Abdullah
What store type are you using? On 31 Oct 2011, at 22:06, Rick Mann wrote: > Hi. I'm seeing a situation where my app starts up, fetches all instances of a > particular entity (which is just one), and that object ends up being a fault. > This is right after startup, although instances were delete

Core Data loading faulted object?

2011-10-31 Thread Rick Mann
Hi. I'm seeing a situation where my app starts up, fetches all instances of a particular entity (which is just one), and that object ends up being a fault. This is right after startup, although instances were deleted in the previous run of the app. What's going on here? How can I avoid this sit

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread Ron Hunsinger
On Oct 31, 2011, at 2:42 PM, G S wrote: > So does anyone know what the new setting is, or how to clear the > "downloaded from Internet" flag on the files themselves? xattr -d com.apple.quarantine file... -Ron Hunsinger ___ Cocoa-dev mailing list (Coc

How do we get rid of "application downloaded from the internet" warnings?

2011-10-31 Thread G S
Hi all. Posting this here because I don't know where else to ask, and it's vaguely development-related because I was simply trying to browse icon files for my app. I downloaded a set of icons. If I select all the PNGs in Finder, right-click, and say Open, I get this asinine warning and then two

Re: Custom NSView drawing

2011-10-31 Thread Preston Sumner
On Oct 31, 2011, at 1:12 PM, Sean McBride wrote: > On Fri, 28 Oct 2011 23:02:59 -0700, Kyle Sluder said: > >>> Are you aware that Xcode 4's built-in Interface Builder no longer >> supports ibplugins? You might want to not bother with the whole thing. :( >> >> And file a bug about this regressi

Re: Custom NSView drawing

2011-10-31 Thread Sean McBride
On Fri, 28 Oct 2011 23:02:59 -0700, Kyle Sluder said: >> Are you aware that Xcode 4's built-in Interface Builder no longer >supports ibplugins? You might want to not bother with the whole thing. :( > >And file a bug about this regression. It's gone in 4.0, 4.1, and 4.2. It's not coming back. T

Re: Future for Mac applications

2011-10-31 Thread Sean McBride
On Sat, 29 Oct 2011 10:02:36 -0700, Kyle Sluder said: >> As of November, all applications submitted to the App store must be >sandboxed and signed. >> >> Not too difficult to forecast the future here. Will it be for an >application to run on a Mac it will need to sandboxed and signed ? > >We all k

Re: XCode4 force relink when static library change

2011-10-31 Thread Bruno Berisso
Thanks for your answer. Let my explain it in more detail. I'm using XCode4 with a workspace that contains both projects, the configuration is as follow: Add B as dependency of A through the "Build Phases" -> "Link Binary With Libraries" Set up the workspace to build all the projects in the same

Re: Sandbox issues

2011-10-31 Thread Gideon King
Thanks for the reply Kyle. On 31/10/2011, at 11:21 AM, Kyle Sluder wrote: > On Sun, Oct 30, 2011 at 4:46 PM, Gideon King wrote: >> Further to my previous questions about sandboxing, I have now done more >> research and experimentation, and the more I find out about it the more >> questions i

Re: XCode4 force relink when static library change

2011-10-31 Thread Jens Alfke
On Oct 31, 2011, at 5:50 AM, Bruno Berisso wrote: > I can complete the first requirement, but the second one is driven mi creasy. > When I change some code in "B" and execute "A" Xcode compile the project "B" > but don't relink to "A" with the last version of "B". Instead keep using the > prev

Re: Write to file Entitlement

2011-10-31 Thread Martin Hewitson
I wonder how such a system would work with an app which is a file-manager. Take, for example, Xcode. How could such an app be sandboxed if that would stop it from being able to save the files it manages? Has such a scenario been thought about or discussed before? Cheers, Martin On 31, Oct, 2

Re: Write to file Entitlement

2011-10-31 Thread James Merkel
That will completely break my app. Off the top of my head, I don't know how I would change things to conform to that regime. I update files in a batch mode. Jim Merkel On Oct 30, 2011, at 11:39 PM, Gideon King wrote: > If you are writing to somewhere inside the sandbox, you can read and write

Re: How to draw over a control in an NSView

2011-10-31 Thread Alexander Reichstadt
I found the source of the problem. The hitTest looked at the wrong view for subviews. What was misleading me was that still textfields reacted correctly while textviews did not. Alex Am 31.10.2011 um 10:44 schrieb Alexander Reichstadt: > There remains an issue. NSTextViews underneath the draw

XCode4 force relink when static library change

2011-10-31 Thread Bruno Berisso
Hi all. I hava tow projects, ket say "A" and "B", "A" is a stander iOS project and "B" is a static library project. What I need is: - If I compile "A" for iOS device then Xcode should generate "B" for iOS device and link it to "A". - If I change some code in "B" and then run "A" Xcode should rec

[ANN] NSLogger 1.0 - powerful logging tool

2011-10-31 Thread Florent Pillet
Hi there, I've been developing and using this tool for a year, and it's quite stable and used by many already so I though I'd cut a 1.0 release to make it official. Many people use it already. First, the links: https://github.com/fpillet/NSLogger (main tree) https://github.com/fpillet/NSLogger/

Re: How to draw over a control in an NSView

2011-10-31 Thread Alexander Reichstadt
There remains an issue. NSTextViews underneath the drawing view don't respond to key events. Text can be selected though, but the highlight color of selected text is grey, as if the textview was not first responder and keyview. Any other control works correctly though, also textfields. Alex A

Re: STL algorithms and NSEnumerator/NSFastEnumeration

2011-10-31 Thread Andreas Grosam
On Oct 29, 2011, at 9:06 PM, Kelvin Chung wrote: > I have this Objective-C container which I want to use in an algorithm that > only takes STL iterators. Is there a generic adapter for NSEnumerator or > id that will provide appropriate STL iterators? I don't think there is, and there are two