Re: Compiling GC apps under OS X 10.8

2012-10-04 Thread Shane Stanley
On 01/10/2012, at 10:52 AM, Shane Stanley  wrote:

> I have a GC app with a deployment version of 10.6. If I compile it in 4.5 
> under OS X 10.8, using either 10.8 or 10.7 SDK, and run the resulting app in 
> OS X 10.6, I gets lots of this sort of error:
> 
> objc[201]: GC: 0x10029cf20 + 24 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> objc[201]: GC: 0x10029cf20 + 8 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> objc[201]: GC: 0x10029cf20 + 64 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> objc[201]: GC: 0x10029cf20 + 72 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> objc[201]: GC: 0x100290670 + 48 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> objc[201]: GC: 0x103592630 + 48 isn't in the auto_zone, break on 
> objc_assign_ivar_error to debug.
> 
> It also occurs under 10.7, although less often and less predictably.
> 
> If I compile the same code in Xcode 4.3.3 under OS X 10.7, using 10.7 SDK, 
> the problem disappears.

In case anyone else hits the problem, changing compiler from LLVM 4.1 to LLVM 
GCC 4.2 seems to have eliminated both these errors, as well as the:

Thread ?? Crashed:
0   com.apple.AppKit0x7fff828ed9de -[NSImage 
_allocAuxiliaryStorage] + 158
1   com.apple.AppKit0x7fff82a71f05 -[NSImage 
copyWithZone:] + 66

errors with open/save panels that I was getting, and that Quincey Morris and 
others have reported here.


-- 
Shane Stanley 
'AppleScriptObjC Explored' 


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: APN and various apps determining each other present on a device?

2012-10-04 Thread Fritz Anderson
On 4 Oct 2012, at 12:33 AM, Rick Mann  wrote:

> On Oct 3, 2012, at 19:46 , Jeff Kelley  wrote:
> 
>> It’s relatively simple: App A registers for a URL scheme, let’s say AppA://. 
>> App B asks the system if it knows how to handle AppA:// links.
> 
> I was looking for how this is done. How does an app ask? I found a document 
> that's supposed to cover this, but doesn't.

BOOL   isImplemented = [[UIApplication sharedApplication]
canOpenURL: anNSURL];

> Furthermore, can Javascript ask the same question?

From web content? I don't know the answer to that, but I'd be surprised if it 
could. Giving a downloaded web page that sort of access to application 
internals would be a bad idea.

— F

-- 
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 



___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Constraints Question

2012-10-04 Thread Matt Neuburg
On Sat, 29 Sep 2012 17:52:23 -0400, Eric Gorr  said:
>I am trying to wrap my head around the auto-layout functionality.

There are at least three (count them three) WWDC 2012 videos about this, and I 
strongly recommend that you touch *nothing* until you have watched all of them. 
m.

--
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 3 Oct 2012, at 16:15, Marshall Houskeeper  wrote:

> 
> Our document file format currently stores file paths and file alias to 
> external files. We can potentially have several thousand references to 
> external files stored in a document. When we move to a sandbox environment, 
> we will store Security-Scoped Bookmarks.  
> 
> What is the suggested method to handling old documents with with external 
> file references in a sandbox environment?

Arguably, here's what should (have) happen(ed):

1. March 2012, OS X 10.7.3 introduces security-scoped bookmarks. You update 
your app to start generating them
2. June 2012, sandboxing deadline for App Store. You update your app to be 
sandboxed at some point around then or later. Most documents already use 
security-scoped bookmarks. For those that don't, prompt using open panel

By leaving it until now to worry about security-scoped bookmarks, you've placed 
yourself at a bit of a disadvantage.

How are you currently storing references to external files? Bookmarks, aliases 
or raw paths? Ideally you'd already be storing bookmark data, so it's no change 
to the document format to add in security-scoped info too.

Similarly, bookmark resolution can always fail because the file has been 
deleted or moved somewhere the system doesn't recognise. If this happens you 
ought to provide some sort of alert to the user, including an open panel to 
locate the file or its replacement. Upgrading to a security-scoped bookmark can 
follow the same pattern.

Of course, with a large quantity of files that could become a big pain. In 
which case your best bet is to use the open panel to locate the *folder* 
containing a number of the files. That grants you access to all the other files 
within the folder.


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: build compatibility for iOS

2012-10-04 Thread Matt Neuburg
On Sun, 30 Sep 2012 10:03:33 -0500, Fritz Anderson  
said:
>On 30 Sep 2012, at 3:28 AM, "Kiran K . Koduri"  
>wrote:
>
>> I am new to iOS, my qusetion is if i compile my application on iOS 4.2, thus 
>> this application works on iphone or ipad with iOS 6.
>
>The short answer is yes

But the long answer is perhaps not.

System upgrades very often *do* break your code. They are not *supposed* to, 
but that's irrelevant. Often, the problem is your own fault - that is, the 
system upgrade has exposed a problem with your code that was somehow not 
exposed under the earlier system. But sometimes the system just changes 
behavior in a totally incompatible way (like when iOS 3.2 summarily reversed 
the meaning of the shadow-drawing components from what they had meant in iOS 
3.1.x).

So it's nice to dream, but the reality is that you must test under the new 
system to find out whether your app still works as expected. m.

--
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 3 Oct 2012, at 18:18, Sean McBride  wrote:

> On Wed, 3 Oct 2012 11:15:48 -0400, Marshall Houskeeper said:
> 
>> Our document file format currently stores file paths and file alias to
>> external files. We can potentially have several thousand references to
>> external files stored in a document. When we move to a sandbox
>> environment, we will store Security-Scoped Bookmarks.  
>> 
>> What is the suggested method to handling old documents with with
>> external file references in a sandbox environment?
> 
> I'm afraid the only choice seems to be: display an NSOpenPanel for each file.
> 
> I wonder how Final Cut Pro will deal with this (and when it will get 
> sandboxed.)
> 
> Do file a bug, and pray.

Mine's rdar://problem/10898972 if you want to dupe it. I've no idea how Apple 
could possibly offer a secure system for migrating documents to the sandbox 
though :(


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 3 Oct 2012, at 19:48, Sean McBride  wrote:

> On Wed, 3 Oct 2012 11:38:10 -0700, Quincey Morris said:
> 
>> If an item is in your sandbox, you don't need the bookmark at all (for
>> security reasons, anyway). If the item is *not* in your sandbox, then
>> you're going to have to ask the user for access -- possibly thousands of
>> times.
> 
> Which is of course ridiculous.  Can you imagine Final Cut Pro or Xcode doing 
> such a thing when opening their old documents?  Notice Apple hasn't sandboxed 
> those applications?
> 
> My solution for now is:
> 
> 
> com.apple.security.temporary-exception.files.absolute-path.read-write
> 
>   /
>   /Volumes/
> 
> 
> You still get some benefit from the sandbox (protection against network, USB, 
> camera being compromised), but have full file system access.
> 
> If you care about App Store (I don't), they may not allow this.

They almost certainly won't allow it. A combo of pleading, explaining, and 
being well-established might help you out though.

Ideally your entitlement would be read-only for most apps. Sadly though due to 
a bug you need write access to a file in order to generate a read-only 
security-scoped bookmark to it at present.


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 3 Oct 2012, at 21:34, Quincey Morris  
wrote:

> On Oct 3, 2012, at 12:44 , Marshall Houskeeper  
> wrote:
> 
>> Our plan is to use  Security-Scoped Bookmarks for all new documents to store 
>> external file references when we go to the sandbox environment.   In our use 
>> case, I would guess that none of the external referenced files would be 
>> stored in our sandbox.  
> 
> What I'm saying is, for all *new* documents, you can't create security-scoped 
> bookmarks unless the user has authorized each (via the open panel). Thus, 
> even for future documents, if they contain thousands of references via 
> bookmarks, then you would have had to get them through the open panel 
> thousands of times.
> 
> Of course, this is the worst case. If the user is actually adding (say) 
> hundreds of files from a single folder, then presumably you'd might have the 
> user choose the folder and create a bookmark to the folder rather than the 
> files.
> 
> But the point is that AFAIK:
> 
>   1 security-scoped bookmark == 1 visit to the open panel

Not strictly true. All you need to generate a security-scoped bookmark is write 
access to the file. This may be obtained by open/save panel, or pasteboard for 
the specific file. But it may also be obtained by open panel, security-scoped 
bookmark, or temporary entitlement for a parent directory.


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 3 Oct 2012, at 22:02, Marshall Houskeeper  wrote:

> 
> Hi Quincey,
> 
> I have no problem with the use of the open panel ( security-scoped bookmark 
> )for creating new documents.  The problem is for pre sandboxed documents or 
> documents that come from Windows.  Having the user re-authorize each external 
> file would be very problematic and time consuming.

So what's your document format here? A document that references external files 
that it expects to be portable between systems is a little unusual. Why not use 
a package-based document format?


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


backtrace() symbolizes wrong, to an inline function

2012-10-04 Thread Jerry Krinock
A 32-bit Cocoa Mac app is a thin wrapper around a 32-bit framework.  I've 
received a dozen or so crash reports from users during the last year which 
start something like this…

1   MyFramework   0x00105066 MyInlineFunction + 188607
2   MyFramework   0x0001d8be MyFramework + 96446
3   MyFramework   0x0001ddc4 MyFramework + 97732
4   MyFramework   0x0001af43 MyFramework + 85827
5   MyFramework   0x0001ab0e MyFramework + 84750
6   Foundation0x98910c52 __57-[NSNotificationCenter … … …

which indicates that the crash occurred in MyInlineFunction().  But this is 
wrong.  The program was nowhere near MyInlineFunction when the crash occurred.  
If I symbolize the address in that entry (0x00105066 in this example) with gdb 
and the dSYM, I get the correct line where the crash actually occurred.

The function MyInlineFunction() is the one and only function in the framework 
which I have declared as inline.

Also, there are some places in this app where I add a backtrace to the 
-userInfo of an NSError using the backtrace() function, and the app's custom 
error presentation dialog has a button which the user may click to send me the 
error.  I have also received a few backtraces via this mechanism which exhibit 
the same issue.  Apparently it is some relative of the backtrace() function 
which is responsible for the erroneous symbolization in the reports generated 
by Crash Reporter.  

If I create such an error on my Mac, where backtrace() has the benefit of 
either an unstripped Debug build or a matching dSYM file, the backtrace is 
symbolized correctly.

Such erroneous symbolization has emitted from Mac OS 10.8.2, 10.7, and possibly 
10.6.

What might be going on here?  It's like: When backtrace() can't find the symbol 
for an address, it grabs the symbol of the first inline function.

Jerry Krinock


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: backtrace() symbolizes wrong, to an inline function

2012-10-04 Thread Fritz Anderson
On 4 Oct 2012, at 12:12 PM, Jerry Krinock  wrote:
> 1   MyFramework   0x00105066 MyInlineFunction + 188607
...
> If I create such an error on my Mac, where backtrace() has the benefit of 
> either an unstripped Debug build or a matching dSYM file, the backtrace is 
> symbolized correctly.
...
> What might be going on here?  It's like: When backtrace() can't find the 
> symbol for an address, it grabs the symbol of the first inline function.

Well, yes. If symbols are not present in the executable, the trace will search 
backwards in memory to the closest symbol that happens to be defined.

In this case, frame 1 was stopped 188,607 bytes after the beginning of 
MyInlineFunction. Unless MyInlineFunction is very long, this is a sign that the 
information needed to show a meaningful symbol is absent. When you provide the 
information by pointing a tool at the matching dSYM, you get a meaningful 
symbol.

It's not an error; the data simply isn't there. Don't strip symbols, or do 
symbolicate.

— F
-- 
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 



___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

CIFilter on CALayer on Mac OS 10.7+

2012-10-04 Thread Thibault Martin-Lagardette
Hi,

I would like to make sure I understand what has been happening in some part of 
our application.

The code is really easy. The idea is to "flash" an NSButton.
The NSButton subclass sets its properties to selected, draws itself into a 
NSBitmapImageRep, resets its selected property, and create a CIImage (out of 
the bitmap rep), that is set to as the inputTargetImage of a 
CIDissolveTransition filter applied to its CALayer.
The expected result is that the button will "flash" by having some sort of 
animation between its normal and selected state.

The animation is added to the layer through [self.layer setFilters:...] and 
[self.layer addAnimation:forKey:].

This worked really well when building with the 10.6 SDK, and running on a 10.8 
machine.

However, when building with the 10.7 or 10.8 SDK, the animation behaves 
differently.
Not only is the resulting image (the inputTargetImage) a few pixels off on the 
y-axis, and on retina displays, the image is drawn twice as big.

Obviously, there has been a lot of changes on CALayer starting Lion, but I'm 
not quite sure what has changed so much, nor how I can fix this. Any idea?

Thanks!

--
Thibault Martin-Lagardette




___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSURLConnection working OK on iOS 6?

2012-10-04 Thread Alex Kac
I seem to have gotten an uptick of HTTP Too many Redirects. I don't know if its 
yet iOS 6 or just so many people upgrading that the servers are wonky (Google 
API servers we use mostly). 

On Oct 3, 2012, at 6:23 PM, Laurent Daudelin  wrote:

> Anybody extensively using NSURLConnection seeing more failure with timed outs 
> with devices running on iOS 6?
> 
> -Laurent.
> 

Alex Kac - President and Founder







___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Marshall Houskeeper
Hi Mike,

Our products are a  video/audio editor  application and video effect plugins.   
In both cases, our file formats (data block for plugin data) can store many 
file references.  Our files keep references to file types such as quicktime 
movies, audio files and text files as well as links to our program and bin 
files.We have been shipping products well before the introduction of 
security-scoped bookmarks.  Our customers have very large libraries of edited 
shows that they often go back  to edit or review.  The data for these programs 
is often spread  across multiple disk volumes.

Another wrinkle to the problem: Users commonly wil move/delete and then restore 
to the same or another disk the audio/video/image data while changing projects. 
 One feature that  we provide that will also break under sandboxing is the 
ability to scan the local and network drives to relink media the has been moved 
or restored to a new location.  

Marshall


On Oct 4, 2012, at 1:08 PM, Mike Abdullah wrote:

> 
> On 3 Oct 2012, at 22:02, Marshall Houskeeper  wrote:
> 
>> 
>> Hi Quincey,
>> 
>> I have no problem with the use of the open panel ( security-scoped bookmark 
>> )for creating new documents.  The problem is for pre sandboxed documents or 
>> documents that come from Windows.  Having the user re-authorize each 
>> external file would be very problematic and time consuming.
> 
> So what's your document format here? A document that references external 
> files that it expects to be portable between systems is a little unusual. Why 
> not use a package-based document format?
> 
> 



___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: backtrace() symbolizes wrong, to an inline function

2012-10-04 Thread Jerry Krinock

On 2012 Oct 04, at 11:07, Fritz Anderson  wrote:

> If symbols are not present in the executable, the trace will search backwards 
> in memory to the closest symbol that happens to be defined.

Thank you, Fritz.  It seems like the backtracer should have a way to avoid 
presenting incorrect information, but apparently not.

I just noticed that this inline function is listed in the framework's exported 
symbols (.exp) file.  So that's why it doesn't get stripped and is available 
for symbolizing.

Jerry



___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: backtrace() symbolizes wrong, to an inline function

2012-10-04 Thread Greg Parker
On Oct 4, 2012, at 10:12 AM, Jerry Krinock  wrote:
> If I create such an error on my Mac, where backtrace() has the benefit of 
> either an unstripped Debug build or a matching dSYM file, the backtrace is 
> symbolized correctly.

If you have the matching dSYM file for your users' bug reports, you can correct 
the symbolication by hand. Look up the `symbolicatecrash` and `atos` tools.


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Key presses in NSView

2012-10-04 Thread Gordon Apple
I have a screen overlay window/view (one for each available screen) which
accepts mouse events (up, down, dragged).  I want the user to be able to
cancel and dismiss the overlay window(s) by hitting the ³any² key (old MS
joke).  Unfortunately, overriding keyDown/keyUp does not work.  I just get a
system beep.  Any ideas?

This is essentially the DragMouseBoxView (simple subclass of NSView) from
the AVScreenShack sample.  It is set to acceptFirstResponder and
acceptFirstMouseClick.

___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-04 Thread Mike Abdullah

On 4 Oct 2012, at 20:18, Marshall Houskeeper  wrote:

> Hi Mike,
> 
> Our products are a  video/audio editor  application and video effect plugins. 
>   In both cases, our file formats (data block for plugin data) can store many 
> file references.  Our files keep references to file types such as quicktime 
> movies, audio files and text files as well as links to our program and bin 
> files.We have been shipping products well before the introduction of 
> security-scoped bookmarks.  Our customers have very large libraries of edited 
> shows that they often go back  to edit or review.  The data for these 
> programs is often spread  across multiple disk volumes.

Right, so how are you storing that reference? A raw path?

I wasn't terribly clear I'm afraid: Bookmark data was introduced in OS X 10.6. 
It's only with 10.7.3 that you could generate security-scoped bookmarks. The 
two are completely compatible though; 10.6 can happily handle security-scoped 
bookmarks. And 10.7+ can decode the old bookmarks, just without the ability to 
actually access them.

Another approach you could take, or perhaps do alongside the document-scoped 
bookmarks, is to ask the user what disks/folders they're using for the project. 
You can then save an application-scoped bookmark to that, granting you access 
forever more.
> 
> Another wrinkle to the problem: Users commonly wil move/delete and then 
> restore to the same or another disk the audio/video/image data while changing 
> projects.  One feature that  we provide that will also break under sandboxing 
> is the ability to scan the local and network drives to relink media the has 
> been moved or restored to a new location.

Well you can pop up an open panel asking to select a folder/disk to scan. That 
grants you access to perform the task at least.
___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Key presses in NSView

2012-10-04 Thread Jens Alfke

On Oct 4, 2012, at 3:17 PM, Gordon Apple  wrote:

> This is essentially the DragMouseBoxView (simple subclass of NSView) from
> the AVScreenShack sample.  It is set to acceptFirstResponder and
> acceptFirstMouseClick.

You may need to override -canBecomeKeyWindow in your window to return YES — if 
it doesn’t have a regular title bar (NSBorderlessWindowMask) it won’t become 
key by default.

—Jens
___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Key presses in NSView

2012-10-04 Thread Gordon Apple
Ah!  Exactly what I needed.  Works. Thank you.  It turns out that I had
another borderless window where I had done just that.  How quickly we
forget.

That screen overlay business is a real nasty.  I found out real fast that
you don¹t put a break point in its result handler unless you like cold
reboots.  Also, the AVScreenShack overlay crashes with ARC unless you use a
delayed invocation to release it.   (Nothing like having your object
deallocated while you¹re still unwinding the stack in the middle of one of
its method calls.  :-)


On 10/4/12 4:35 PM, "Jens Alfke"  wrote:

> 
> On Oct 4, 2012, at 3:17 PM, Gordon Apple  wrote:
> 
>> This is essentially the DragMouseBoxView (simple subclass of NSView) from
>> the AVScreenShack sample.  It is set to acceptFirstResponder and
>> acceptFirstMouseClick.
> 
> You may need to override -canBecomeKeyWindow in your window to return YES ‹ if
> it doesn¹t have a regular title bar (NSBorderlessWindowMask) it won¹t become
> key by default.
> 
> ‹Jens
> 


___

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com