[ANN] Receigen: smart code generator for Mac App Store receipt validation

2011-10-30 Thread Laurent Etiemble
Hello

I am pleased to introduce the Receigen application.

Receigen is a smart code generator for App Store receipt validation. The
generated code is ready-to-integrate, pure ANSI C, fully debuggable and
integrates various protection mechanisms to harden the reverse engineering.
It also integrates nicely with Xcode for a streamlined build process.

Receigen is available on the Mac App Store (
http://itunes.apple.com/us/app/receigen/id452840086?mt=12).

Support and F.A.Q. are available on the Receigen website (
http://receigen.etiemble.com/).

I welcome feedback and comments for this application to make it better.

Regards, Laurent Etiemble.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Multiple? Call-back methods for AVPlayer

2011-10-30 Thread John Love
Using AVPlayer for streamed audio, when I select a audio, I call
[mySong addObserver:self forKeyPath:@"status" options:0 context:nil]

I then use
observeValueForKeyPath: ofObject: change: context:

to observe the [ofObject status] for the standard three values:

AVPlayerStatusReadyToPlay, AVPlayerStatusUnknown, and AVPlayerStatusFailed

and call the button's -setBackgroundImage ("Stop" version) when 
AVPlayerStatusReadyToPlay.

My question is:
Do I have to set up a 2nd KVO call-back method to monitor whether the selected 
audio has ended naturally?  I need to know when the audio is finished so I can 
call the set the button's backgroundImage to the "Play" variety.

For example, according to the AV Foundation Programming Guide, I'm supposed to 
use:

[[NSNotificationCenter defaultCenter] addObserver:self
  selector:@selector(playerItemDidReachEnd:)
 name:AVPlayerItemDidPlayToEndTimeNotification
object:[player currentItem]];

Is there any way of using just one call-back for both PlayerStatus and 
DidPlayToEnd?

Someone else suggested having each method call a 3rd common one … but if I do 
that, I might as well stay with 2.

I sure would like to just use [NSNotificationCenter defaultCenter] addObserver: 
… and combine in it my [mySong addObserver: method.

Thanks bunches.

John Love
Touch the Future! Teach!



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Keeping open menu after mouse up

2011-10-30 Thread Ryan Joseph
Thanks for tip but the menu still closes on mouse up. I wonder what the 
difference is. The event from [NSApp currentEvent] is showing as a LMouseDown 
which is good but the menu still takes the mouse up and closes even though you 
would think it should behave like a normal menu click.

On Oct 29, 2011, at 6:40 AM, Graham Cox wrote:

> I have a similar case, and it works OK.
> 
> What I do is on mouseDown, start a timer. When that fires, it grabs [NSApp 
> currentEvent] and passes that as the event to the popUpContextMenu: method. 
> The menu tracks as expected.
> 
> The only kink was that because this was being done within a button cell's 
> tracking, I had to post a fake mouse UP after the menu was closed to ensure 
> that the cell ended tracking. For a view that may not be necessary unless 
> you're doing something special on mouse up.
> 
> --Graham

Regards,
Ryan Joseph
thealchemistguild.com

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Multiple? Call-back methods for AVPlayer

2011-10-30 Thread Fritz Anderson
On 30 Oct 2011, at 5:58 AM, John Love wrote:

> I sure would like to just use [NSNotificationCenter defaultCenter] 
> addObserver: … and combine in it my [mySong addObserver: method.

It appears the common prefix for notifications and KVO observations 
(addObserver:) is misleading you. There's no way to cross over between them, 
unless there's an observable property that matches the notification (maybe 
.rate? Not quite the same thing) or vice versa (and the notification you found 
is the only one in AVPlayer or AVPlayerItem).

— F

(I originally spelled it "notificatino." A useful facility that triggers your 
code before the event being observed. But I've exceeded my NDA.)

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: minor ARC casting question

2011-10-30 Thread Kyle Sluder
On Oct 30, 2011, at 8:15 AM, Matt Neuburg  wrote:

> And this is legal:
> 
>id ref = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];
>self.view.layer.contents = ref;

It's my understanding that this shouldn't compile under ARC. You should be 
required to perform a bridged cast when assigning to ref.

--Kyle Sluder___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: minor ARC casting question

2011-10-30 Thread Igor Mozolevsky
On 30 October 2011 15:15, Matt Neuburg  wrote:
> In ARC, this is legal:
>
>    self.view.layer.contents = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];
>
> And this is legal:
>
>    id ref = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];
>    self.view.layer.contents = ref;
>
> But this is not:
>
>    CGImageRef ref = [[UIImage imageNamed:@"boat.gif"] CGImage];
>    self.view.layer.contents = (id)ref; // compilation fails
>
> In the last case, I have to change id to __bridge id. My question is: What's 
> the difference in the cases? In all situations I'm casting a CGImageRef to an 
> id, so why does ARC permit this in the first cases but not in the last? Is it 
> because UIImage's CGImage method is a method, and this fact somehow gives ARC 
> further info? Thx - m.


The compiler knows how to handle CF objects returned from Cocoa
methods, but doesn't know how to handle stuff created by yourself. I
thought that was fairly obvious from and explicit in the Transitioning
Notes?


Cheers,

--
Igor ;-)
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: minor ARC casting question

2011-10-30 Thread Matt Neuburg
On Sun, 30 Oct 2011 08:46:02 -0700, Kyle Sluder  said:
>On Oct 30, 2011, at 8:15 AM, Matt Neuburg  wrote:
>
>> And this is legal:
>> 
>>id ref = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];
>>self.view.layer.contents = ref;
>
>It's my understanding that this shouldn't compile under ARC.

Well, it does. Try it... It surprised me too.

Of course that could be a bug. And in that case the third case is also a bug, 
since we're casting to id and assigning to something typed as id 
(layer.contents).

But anyhow, that's exactly my question.

m.

--
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSAssert no longer displaying reason in console

2011-10-30 Thread Matt Neuburg
On Mon, 24 Oct 2011 16:01:30 -0700, Ben Kennedy  said:
>On 24 Oct 2011, at 3:53 pm, Matt Neuburg wrote:
>
>> That's all! Dude, where's my reason? And without a printing of the reason, 
>> what's the good of the assert? (And hey, I wouldn't mind seeing that lovely 
>> call stack, too.)
>
>Exceptions don't get logged automatically anymore when running under iOS 5, in 
>my experience.  I've had to manually add breakpoint actions of "po $eax" and 
>"po $r0"  on "objc_exception_throw" and "-[NSException raise]" to deal with 
>this problem.

Thanks, I'll give it a shot. It seems to be an Xcode thing rather than an iOS 5 
thing; I say this because if I run the same app in a debug build and hit the 
same NSAssert, not within Xcode but independently on the device or in the 
simulator, the NSAssert reason and stack trace *are* printed. So I'm guessing 
that Xcode is being a smartypants and somehow jumping in and suppressing the 
additional logging. m.

--
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: minor ARC casting question

2011-10-30 Thread Igor Mozolevsky
On 30 October 2011 16:05, Matt Neuburg  wrote:
> On Sun, 30 Oct 2011 08:46:02 -0700, Kyle Sluder  said:
>>On Oct 30, 2011, at 8:15 AM, Matt Neuburg  wrote:
>>
>>> And this is legal:
>>>
>>>    id ref = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];
>>>    self.view.layer.contents = ref;
>>
>>It's my understanding that this shouldn't compile under ARC.
>
> Well, it does. Try it... It surprised me too.
>
> Of course that could be a bug. And in that case the third case is also a bug, 
> since we're casting to id and assigning to something typed as id 
> (layer.contents).
>
> But anyhow, that's exactly my question.


It is entirely plausible that after CSE that becomes just

self.view.layer.contents = (id)[[UIImage imageNamed:@"boat.gif"] CGImage];

So, in effect you're not doing anything "funky" that would confuse
compiler's ARC. In the latter case, you are actually doing "funky"
stuff and the compiler can't work out your "intentions"...



Cheers,

--
Igor
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSAssert no longer displaying reason in console

2011-10-30 Thread Matt Neuburg
On Mon, 24 Oct 2011 16:01:30 -0700, Ben Kennedy  said:
>On 24 Oct 2011, at 3:53 pm, Matt Neuburg wrote:
>
>> That's all! Dude, where's my reason? And without a printing of the reason, 
>> what's the good of the assert? (And hey, I wouldn't mind seeing that lovely 
>> call stack, too.)
>
>Exceptions don't get logged automatically anymore when running under iOS 5, in 
>my experience.  I've had to manually add breakpoint actions of "po $eax" and 
>"po $r0"  on "objc_exception_throw" and "-[NSException raise]" to deal with 
>this problem.

Just reporting back further: I found that telling my objc_exception_throw to po 
$eax had no effect in GDB under Xcode 4.2 / iOS 5. I could say po $eax at the 
gdb command line and it worked, showing the reason; but Xcode seems to be 
tromping on the logging in such a way that attaching this as a po gdb command 
to the exception doesn't work.

However, if I switch to LLDB, it does work. m.

--
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Versions and project editor app

2011-10-30 Thread Martin Hewitson
Dear list,

Has anyone given any thought as to how to use Versions with an editor app which 
manages files? Consider an app like Xcode. Is it conceivable to have Versions 
for Xcode? Of course you could have Versions for the Xcode project file, but 
what about the source code files? How would they be handled? I'm guessing that 
since Xcode doesn't implement Versions that the technology is not well suited 
for such an app. 

Best wishes,

Martin



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Versions and project editor app

2011-10-30 Thread Charles Srstka
On Oct 30, 2011, at 12:05 PM, Martin Hewitson wrote:

> Dear list,
> 
> Has anyone given any thought as to how to use Versions with an editor app 
> which manages files? Consider an app like Xcode. Is it conceivable to have 
> Versions for Xcode? Of course you could have Versions for the Xcode project 
> file, but what about the source code files? How would they be handled? I'm 
> guessing that since Xcode doesn't implement Versions that the technology is 
> not well suited for such an app. 

I think you could pull it off, if there were some API to get the NSData objects 
for earlier versions of a file and present it using your own home-spun 
interface. Unfortunately, unless I’m missing something, I can’t seem to find 
any such API — only way to get at versions seems to be through the default 
interface.

Charles___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


C struct and __unsafe_unretained

2011-10-30 Thread James Merkel
The document on ARC talks about problematic C structs like:

struct x { NSString *S;  int X; } StaticArray[] = {
  @"foo", 42,
  @"bar, 97,
...
};

I use that pattern quite a bit in my code and haven't had any problems with it. 
These are basically constant strings that never change.

With ARC, the compiler wants me to change the code to: 

struct x { __unsafe_unretained NSString *S; int X; }

Aside from this looking really ugly, will the App store accept this in an 
application?

The document on ARC says in order to do this task correctly, the code should be 
changed to a class. Ok, what class are they talking about?

I don't see how the collection classes like NSDictionary or NSArray support 
this.  Do they mean create your own collection class to do this?

Thanks for any insight on this.

Jim Merkel
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Versions and project editor app

2011-10-30 Thread Charles Srstka
On Oct 30, 2011, at 12:05 PM, Martin Hewitson wrote:

> Dear list,
> 
> Has anyone given any thought as to how to use Versions with an editor app 
> which manages files? Consider an app like Xcode. Is it conceivable to have 
> Versions for Xcode? Of course you could have Versions for the Xcode project 
> file, but what about the source code files? How would they be handled? I'm 
> guessing that since Xcode doesn't implement Versions that the technology is 
> not well suited for such an app. 

To follow up on my earlier post a bit, Xcode *does* support Versions, as you’ll 
see if you play with it a bit. Make a change to a source file, don’t save, let 
it sit for a few seconds, and then examine the source file with the ‘more’ 
program in the Terminal, and you’ll see that your change has indeed been 
autosaved. Also, if you open a source file or a .xib file in TextEdit, you’ll 
be able to browse all the versions that have been created by Xcode. The only 
thing missing in Xcode is an *interface* for Versions. Now, one could argue 
that since Xcode has built-in support for git and svn, Versions support isn’t 
necessary, and you’d probably be right. For a similar type of application that 
doesn’t have built-in source control, though, it might be a handy thing, and if 
it turns out there’s an API somewhere to get at the data of a version, then 
you’d be able to do whatever you want. Unfortunately, I haven’t been able to 
find any such API, but it’s possible I’ve missed something, since searching for 
“Versions” is something that’s inherently going to turn up a ton of false 
positives.

Charles___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Jeff Kelley
The recommendation is to replace the struct with a class. So you would replace 
x with a class that might look like this:

> @interface ReplaceX : NSObject
> 
> @property (copy) NSString *label;
> @property int value;
> 
> @end

This aside, you should be OK using __unsafe_unretained in an App Store 
application as long as you’re only using constant strings (which won’t be 
released).

Jeff Kelley

On Oct 30, 2011, at 1:32 PM, James Merkel wrote:

> The document on ARC talks about problematic C structs like:
> 
> struct x { NSString *S;  int X; } StaticArray[] = {
>  @"foo", 42,
>  @"bar, 97,
> ...
> };
> 
> I use that pattern quite a bit in my code and haven't had any problems with 
> it. These are basically constant strings that never change.
> 
> With ARC, the compiler wants me to change the code to: 
> 
> struct x { __unsafe_unretained NSString *S; int X; }
> 
> Aside from this looking really ugly, will the App store accept this in an 
> application?
> 
> The document on ARC says in order to do this task correctly, the code should 
> be changed to a class. Ok, what class are they talking about?
> 
> I don't see how the collection classes like NSDictionary or NSArray support 
> this.  Do they mean create your own collection class to do this?
> 
> Thanks for any insight on this.
> 
> Jim Merkel
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Alex Kac
Its just making it clear that these are unretained. Make a #define to make it 
nice and clean like. But they are saying to make an objective C class mostly 
for people who do manual retain/releases in a struct so that its automatic.

Finally, NSDictionary doesn't support that - but CFDictionary does. We use that 
all the time. Its nice and neat. Just 
insertedSections  = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, 0, 
&kCFTypeDictionaryValueCallBacks);
CFDictionarySetValue(insertedSections, (void*)sectionIndex, section);
etc...


On Oct 30, 2011, at 12:32 PM, James Merkel wrote:

> The document on ARC talks about problematic C structs like:
> 
> struct x { NSString *S;  int X; } StaticArray[] = {
>  @"foo", 42,
>  @"bar, 97,
> ...
> };
> 
> I use that pattern quite a bit in my code and haven't had any problems with 
> it. These are basically constant strings that never change.
> 
> With ARC, the compiler wants me to change the code to: 
> 
> struct x { __unsafe_unretained NSString *S; int X; }
> 
> Aside from this looking really ugly, will the App store accept this in an 
> application?
> 
> The document on ARC says in order to do this task correctly, the code should 
> be changed to a class. Ok, what class are they talking about?
> 
> I don't see how the collection classes like NSDictionary or NSArray support 
> this.  Do they mean create your own collection class to do this?
> 
> Thanks for any insight on this.
> 
> Jim Merkel
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net
> 
> This email sent to a...@webis.net

Alex Kac - President and Founder
Web Information Solutions, Inc.

"Champions aren't made in the gyms. Champions are made from something they have 
deep inside of them - a desire, a dream, a vision. They have last-minute 
stamina, they have to be a little faster, they have to have the skill, and the 
will. But the will must be stronger than the skill." 
-- Muhammad Ali





___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Charles Srstka
On Oct 30, 2011, at 12:32 PM, James Merkel wrote:

> struct x { NSString *S;  int X; } StaticArray[] = {
>  @"foo", 42,
>  @"bar, 97,
> ...
> };
> 
> I use that pattern quite a bit in my code and haven't had any problems with 
> it. These are basically constant strings that never change.
> 
> With ARC, the compiler wants me to change the code to: 
> 
> struct x { __unsafe_unretained NSString *S; int X; }
> 
> Aside from this looking really ugly, will the App store accept this in an 
> application?
> 
> The document on ARC says in order to do this task correctly, the code should 
> be changed to a class. Ok, what class are they talking about?

They’re talking about:

@interface MyClass : NSObject

@property (strong) NSString *someString;
@property NSInteger someInteger;

@end

Charles___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Charles Srstka
On Oct 30, 2011, at 12:41 PM, Charles Srstka wrote:

> @interface MyClass : NSObject
> 
> @property (strong) NSString *someString;
> @property NSInteger someInteger;
> 
> @end

That should have been copy, not strong. Sorry, I’m apparently not firing on all 
cylinders today.

Charles___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread James Merkel

On Oct 30, 2011, at 10:41 AM, Charles Srstka wrote:

> On Oct 30, 2011, at 12:32 PM, James Merkel wrote:
> 
>> struct x { NSString *S;  int X; } StaticArray[] = {
>> @"foo", 42,
>> @"bar, 97,
>> ...
>> };
>> 
>> I use that pattern quite a bit in my code and haven't had any problems with 
>> it. These are basically constant strings that never change.
>> 
>> With ARC, the compiler wants me to change the code to: 
>> 
>> struct x { __unsafe_unretained NSString *S; int X; }
>> 
>> Aside from this looking really ugly, will the App store accept this in an 
>> application?
>> 
>> The document on ARC says in order to do this task correctly, the code should 
>> be changed to a class. Ok, what class are they talking about?
> 
> They’re talking about:
> 
> @interface MyClass : NSObject
> 
> @property (strong) NSString *someString;
> @property NSInteger someInteger;
> 
> @end
> 
> Charles

Thanks. That looks easy enough.

Jim Merkel___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Dave Zarzycki
On Oct 30, 2011, at 10:32 AM, James Merkel wrote:

> The document on ARC talks about problematic C structs like:
> 
> struct x { NSString *S;  int X; } StaticArray[] = {
>  @"foo", 42,
>  @"bar, 97,
> ...
> };
> 
> I use that pattern quite a bit in my code and haven't had any problems with 
> it. These are basically constant strings that never change.

Is the above pattern in your code used with globals? (Probably.)

> With ARC, the compiler wants me to change the code to: 
> 
> struct x { __unsafe_unretained NSString *S; int X; }
> 
> Aside from this looking really ugly, will the App store accept this in an 
> application?

Yes. "__unsafe_unretained" is public API, therefore the App store will accept 
it.

> The document on ARC says in order to do this task correctly, the code should 
> be changed to a class. Ok, what class are they talking about?

That depends on the scenario. If the above struct is simply a global (and it 
probably is), then changing to a class would be more complicated than just 
using __unsafe_unretained. If the above struct is stored in malloc()ed memory, 
then switching to a class is the right thing to do.

davez


> I don't see how the collection classes like NSDictionary or NSArray support 
> this.  Do they mean create your own collection class to do this?
> 
> Thanks for any insight on this.
> 
> Jim Merkel
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/zarzycki%40apple.com
> 
> This email sent to zarzy...@apple.com

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread James Merkel
Ok thanks.  Not changing anything is the easiest and safest approach.

Jim Merkel

On Oct 30, 2011, at 10:52 AM, Dave Zarzycki wrote:

> On Oct 30, 2011, at 10:32 AM, James Merkel wrote:
> 
>> The document on ARC talks about problematic C structs like:
>> 
>> struct x { NSString *S;  int X; } StaticArray[] = {
>> @"foo", 42,
>> @"bar, 97,
>> ...
>> };
>> 
>> I use that pattern quite a bit in my code and haven't had any problems with 
>> it. These are basically constant strings that never change.
> 
> Is the above pattern in your code used with globals? (Probably.)
> 
>> With ARC, the compiler wants me to change the code to: 
>> 
>> struct x { __unsafe_unretained NSString *S; int X; }
>> 
>> Aside from this looking really ugly, will the App store accept this in an 
>> application?
> 
> Yes. "__unsafe_unretained" is public API, therefore the App store will accept 
> it.
> 
>> The document on ARC says in order to do this task correctly, the code should 
>> be changed to a class. Ok, what class are they talking about?
> 
> That depends on the scenario. If the above struct is simply a global (and it 
> probably is), then changing to a class would be more complicated than just 
> using __unsafe_unretained. If the above struct is stored in malloc()ed 
> memory, then switching to a class is the right thing to do.
> 
> davez
> 
> 
>> I don't see how the collection classes like NSDictionary or NSArray support 
>> this.  Do they mean create your own collection class to do this?
>> 
>> Thanks for any insight on this.
>> 
>> Jim Merkel
>> ___
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/zarzycki%40apple.com
>> 
>> This email sent to zarzy...@apple.com
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: C struct and __unsafe_unretained

2011-10-30 Thread Thomas Davie
Yes and no – it means you have an NSString there that can disappear at any 
moment without warning, and when it does, you'll still have a pointer into 
garbage memory.  Also, if the original code has been copying/retaining it into 
the struct and releasing it out, then it's entirely possible that by doing this 
you very much *are* changing something.

Personally I would take this as a prompt to move to using a class and a (copy) 
property.

Bob
if (*ra4 != 0xffc78948) { return false; }

On 30 Oct 2011, at 18:40, James Merkel wrote:

> Ok thanks.  Not changing anything is the easiest and safest approach.
> 
> Jim Merkel
> 
> On Oct 30, 2011, at 10:52 AM, Dave Zarzycki wrote:

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Versions and project editor app

2011-10-30 Thread Charles Srstka
On Oct 30, 2011, at 12:33 PM, Charles Srstka wrote:

> On Oct 30, 2011, at 12:05 PM, Martin Hewitson wrote:
> 
>> Dear list,
>> 
>> Has anyone given any thought as to how to use Versions with an editor app 
>> which manages files? Consider an app like Xcode. Is it conceivable to have 
>> Versions for Xcode? Of course you could have Versions for the Xcode project 
>> file, but what about the source code files? How would they be handled? I'm 
>> guessing that since Xcode doesn't implement Versions that the technology is 
>> not well suited for such an app. 
> 
> To follow up on my earlier post a bit, Xcode *does* support Versions, as 
> you’ll see if you play with it a bit. Make a change to a source file, don’t 
> save, let it sit for a few seconds, and then examine the source file with the 
> ‘more’ program in the Terminal, and you’ll see that your change has indeed 
> been autosaved. Also, if you open a source file or a .xib file in TextEdit, 
> you’ll be able to browse all the versions that have been created by Xcode. 
> The only thing missing in Xcode is an *interface* for Versions. Now, one 
> could argue that since Xcode has built-in support for git and svn, Versions 
> support isn’t necessary, and you’d probably be right. For a similar type of 
> application that doesn’t have built-in source control, though, it might be a 
> handy thing, and if it turns out there’s an API somewhere to get at the data 
> of a version, then you’d be able to do whatever you want. Unfortunately, I 
> haven’t been able to find any such API, but it’s possible I’ve missed 
> something, since searching for “Versions” is something that’s inherently 
> going to turn up a ton of false positives.

And, upon a little further inspection, although there’s no method to get to the 
data, there is the URL property on NSFileVersion, which you can read via the 
standard file-reading APIs to get the data and roll your own Versions 
interface. So, this should be very much possible.

Charles___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


How to draw over a control in an NSView

2011-10-30 Thread Alexander Reichstadt
Hi,

given a custom NSView using drawRect to draw, say, a blue rectangle, controls 
inside that view are always in front of the blue rectangle. Is there a way to 
draw above controls with drawRect? Also putting a view with controls inside 
another view that draw in drawRect doesn't change that. Like textfields, they 
are always above drawn content. How does one draw above controls?

Thanks
Alex

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How to draw over a control in an NSView

2011-10-30 Thread Jens Alfke

On Oct 30, 2011, at 12:46 PM, Alexander Reichstadt wrote:

> given a custom NSView using drawRect to draw, say, a blue rectangle, controls 
> inside that view are always in front of the blue rectangle. Is there a way to 
> draw above controls with drawRect? Also putting a view with controls inside 
> another view that draw in drawRect doesn't change that. Like textfields, they 
> are always above drawn content. How does one draw above controls?

Subviews are always drawn after their superview, so they are visually in front 
of it. You can’t change that.
What you can try is adding a subview, positioning it over the control, and 
putting it in front (I think that means later in the subviews array.) 
Historically AppKit hasn’t handled overlapping sibling views, but I think that 
nowadays if you make the parent view layer-backed it will work. (But 
layer-backing views brings its own visual issues, so this may not work out for 
you.)

Another approach is to subclass the control (or its cell class) and customize 
its drawing.

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How to draw over a control in an NSView

2011-10-30 Thread Alexander Reichstadt
Thanks much. I ended up subclassing an NSView to draw the required things, 
subclassed another view to be the containing superview and hold controls, and 
override in the containing view the addSubview method to always have it call 
super and also add the drawing view-subclass at the end. That way the view is 
always added on top of all others. In the given scenario the containing 
superview dynamically loads subviews anyway, so overriding addSubview seems to 
be the easiest path.

Alex

Am 30.10.2011 um 22:06 schrieb Jens Alfke:

> 
> On Oct 30, 2011, at 12:46 PM, Alexander Reichstadt wrote:
> 
>> given a custom NSView using drawRect to draw, say, a blue rectangle, 
>> controls inside that view are always in front of the blue rectangle. Is 
>> there a way to draw above controls with drawRect? Also putting a view with 
>> controls inside another view that draw in drawRect doesn't change that. Like 
>> textfields, they are always above drawn content. How does one draw above 
>> controls?
> 
> Subviews are always drawn after their superview, so they are visually in 
> front of it. You can’t change that.
> What you can try is adding a subview, positioning it over the control, and 
> putting it in front (I think that means later in the subviews array.) 
> Historically AppKit hasn’t handled overlapping sibling views, but I think 
> that nowadays if you make the parent view layer-backed it will work. (But 
> layer-backing views brings its own visual issues, so this may not work out 
> for you.)
> 
> Another approach is to subclass the control (or its cell class) and customize 
> its drawing.
> 
> —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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Sandbox issues

2011-10-30 Thread Gideon King
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 it throws up.

1. I have a folder in the Application Support folder that my apps have been 
using to store and retrieve log data, but even if I add an entitlement relative 
to the home folder to /Library/Application Support/My Folder/ I still can't 
access it. I would have expected the sandbox to have a link to that folder 
created in the container folder, but it doesn't. I'm interested in knowing what 
I may have done wrong with this…

2. My application allows users to drag files on to the documents to create 
links to those files, and when they click the links, it uses NSWorkspace to 
open the files, which initially works, but then when the user restarts the 
application, and tries to open the file, it says that I don't have permission 
to view it. I think this is a fundamental limitation of the sandbox, and 
believe that there is no workaround for this. I would love to be proved wrong 
on this.

3.  In my application, you can embed files as part of the file that is saved, 
and when you want to open the embedded file, it copies it to a temporary folder 
(using NSTemporaryDirectory() ), and uses NSWorkspace to open the file. This is 
being denied by the sandbox with a message "deny file-issue-extension", and 
"Quarantine resolution refused". So this gets blocked too… Is there some way 
around this?

4. When I try to launch my error reporting application from my main 
application, I get an error LSOpenFromURLSpec() returned -10827. Again, this 
only happens when using sandboxing - any clues?

5. I use CFPreferencesCopyAppValue to read information about the user's iPhoto 
preferences (so that I know where to look to load their iPhoto library), but 
this doesn't seem to work in the sandbox either - is there a workaround for 
this?


All of these issues are show stoppers for me being able to use the sandbox, and 
with Apple declaring that all apps submitted to the app store must be 
sandboxed, this becomes a major issue. If any of these is not able to be 
resolved, then I will not be able to submit my app to the app store. If these 
issues are not resolved, I can think of quite a number of productivity 
applications that won't be able to be sandboxed for these same reasons.


Any assistance with any of these issues will be greatly appreciated.


Gideon







___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Sandbox issues

2011-10-30 Thread Kyle Sluder
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 it throws up.
>
> 1. I have a folder in the Application Support folder that my apps have been 
> using to store and retrieve log data, but even if I add an entitlement 
> relative to the home folder to /Library/Application Support/My Folder/ I 
> still can't access it. I would have expected the sandbox to have a link to 
> that folder created in the container folder, but it doesn't. I'm interested 
> in knowing what I may have done wrong with this…

Read the "Migrating an App to a Sandbox" section of the App Sandbox
Design Guide: 
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/MigratingALegacyApp/MigratingALegacyApp.html#//apple_ref/doc/uid/TP40011183-CH6-SW8

>
> 2. My application allows users to drag files on to the documents to create 
> links to those files, and when they click the links, it uses NSWorkspace to 
> open the files, which initially works, but then when the user restarts the 
> application, and tries to open the file, it says that I don't have permission 
> to view it. I think this is a fundamental limitation of the sandbox, and 
> believe that there is no workaround for this. I would love to be proved wrong 
> on this.
>
> 3.  In my application, you can embed files as part of the file that is saved, 
> and when you want to open the embedded file, it copies it to a temporary 
> folder (using NSTemporaryDirectory() ), and uses NSWorkspace to open the 
> file. This is being denied by the sandbox with a message "deny 
> file-issue-extension", and "Quarantine resolution refused". So this gets 
> blocked too… Is there some way around this?

Do not use NSTemporaryDirectory. Use -[NSFileManager
URLForDirectory:inDomains:].

>
> 4. When I try to launch my error reporting application from my main 
> application, I get an error LSOpenFromURLSpec() returned -10827. Again, this 
> only happens when using sandboxing - any clues?

LSOpenFromURLSpec is prohibited under sandboxing.

>
> 5. I use CFPreferencesCopyAppValue to read information about the user's 
> iPhoto preferences (so that I know where to look to load their iPhoto 
> library), but this doesn't seem to work in the sandbox either - is there a 
> workaround for this?

This is prohibited under sandboxing. Read "Accessing Preferences of
Other Apps" in the App Sandbox Design Guide:
http://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/DesigningYourSandbox/DesigningYourSandbox.html#//apple_ref/doc/uid/TP40011183-CH4-SW12

> All of these issues are show stoppers for me being able to use the sandbox, 
> and with Apple declaring that all apps submitted to the app store must be 
> sandboxed, this becomes a major issue. If any of these is not able to be 
> resolved, then I will not be able to submit my app to the app store. If these 
> issues are not resolved, I can think of quite a number of productivity 
> applications that won't be able to be sandboxed for these same reasons.

File Radars describing your issues with App Sandboxing, and visit the
Application Sandboxing Dev Forums:
https://devforums.apple.com/community/mac/lion/appsandbox

--Kyle Sluder
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How to draw over a control in an NSView

2011-10-30 Thread Ken Ferry
On Oct 30, 2011, at 2:06 PM, Jens Alfke  wrote:

> 
> On Oct 30, 2011, at 12:46 PM, Alexander Reichstadt wrote:
> 
>> given a custom NSView using drawRect to draw, say, a blue rectangle, 
>> controls inside that view are always in front of the blue rectangle. Is 
>> there a way to draw above controls with drawRect? Also putting a view with 
>> controls inside another view that draw in drawRect doesn't change that. Like 
>> textfields, they are always above drawn content. How does one draw above 
>> controls?
> 
> Subviews are always drawn after their superview, so they are visually in 
> front of it. You can’t change that.
> What you can try is adding a subview, positioning it over the control, and 
> putting it in front (I think that means later in the subviews array.) 
> Historically AppKit hasn’t handled overlapping sibling views, but I think 
> that nowadays if you make the parent view layer-backed it will work.

That's actually slightly reversed. AppKit has supported overlapping sibling 
views since 10.5. Layers complicate the story a bit, because a non-layer backed 
view can never draw over top of a layer.

-Ken
Cocoa Frameworks

> (But layer-backing views brings its own visual issues, so this may not work 
> out for you.)
> 
> Another approach is to subclass the control (or its cell class) and customize 
> its drawing.
> 
> —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:
> http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com
> 
> This email sent to kenfe...@gmail.com
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How to draw over a control in an NSView

2011-10-30 Thread Steve Sisak

At 7:09 PM -0700 10/30/11, Ken Ferry wrote:

On Oct 30, 2011, at 2:06 PM, Jens Alfke  wrote:
 > On Oct 30, 2011, at 12:46 PM, Alexander Reichstadt wrote:
 > Subviews are always drawn after their superview, so they are 
visually in front of it. You can't change that.
 > What you can try is adding a subview, positioning it over the 
control, and putting it in front (I think that means later in the 
subviews array.) Historically AppKit hasn't handled overlapping 
sibling views, but I think that nowadays if you make the parent view 
layer-backed it will work.


That's actually slightly reversed. AppKit has supported overlapping 
sibling views since 10.5. Layers complicate the story a bit, because 
a non-layer backed view can never draw over top of a layer.


Since I happen to be reading the Cocoa View Programming Guide at this 
instant, I'll mention that it currently says:


Note: For performance reasons, Cocoa does not enforce clipping among 
sibling views or guarantee correct invalidation and drawing behavior 
when sibling views overlap. If you want a view to be drawn in front 
of another view, you should make the front view a subview (or 
descendant) of the rear view.




It sounds like this section should be updated to reflect current reality.

It might be worth someone submitting a documentation bug on this.

HTH,

-Steve
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How to draw over a control in an NSView

2011-10-30 Thread Kyle Sluder
On Sun, Oct 30, 2011 at 7:22 PM, Steve Sisak  wrote:
> It might be worth someone submitting a documentation bug on this.

So what's the number of the documentation bug you filed? ;-)

--Kyle Sluder
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Moderator - Mailing list downtime

2011-10-30 Thread Scott Anguish
Dear subscribers

As most of you know there was recently some unscheduled downtime of the list. 
In fact, the web interface still isn’t available, so those who have moderated 
messages (new posting users, posters of large messages) have their message 
currently in limbo.

Sometimes things happen that are beyond our control, but once the issue was 
identified the necessary people worked hard to find a fix. And they’re still 
working on getting the web interface running.

In the meantime, devforums.apple.com are probably the best solution.

Sorry about that folks.

I’ll post again when the web is up again.

—
Scott Anguish [Moderator]








___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Help with view constraints

2011-10-30 Thread David Catmull
On Oct 28, 2011, at 6:30 PM, Ken Ferry wrote:
> The question seems a little general to me.  Where did you have problems doing 
> what you wanted to do?

To be more specific, the window contains two controls: a text field with the 
full command arguments for a git command that was executed, and below it a 
scrolling text box containing the output from the command. I want the command 
field to resize vertically as needed when that text changes, while manual 
resizing by the user should only affect the output box.

If you really want to get into it, the source is here: 

It's a rewrite of the GitX git client.

-- 
David Catmull
uncom...@uncommonplace.com
http://www.uncommonplace.com/

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Write to file Entitlement

2011-10-30 Thread James Merkel
Reading the sandboxing documents, it looks like in order to write to a file you 
need to use the save dialog.
My app updates files without the save dialog.
Will that be permitted in a sandboxed app ?

Jim Merkel
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Write to file Entitlement

2011-10-30 Thread Gideon King
If you are writing to somewhere inside the sandbox, you can read and write 
freely, but if outside, then you have to go through the save panel, which 
behind the scenes stretches your sandbox to include that file.

Regards

Gideon



On 31/10/2011, at 3:27 PM, James Merkel wrote:

> Reading the sandboxing documents, it looks like in order to write to a file 
> you need to use the save dialog.
> My app updates files without the save dialog.
> Will that be permitted in a sandboxed app ?
> 
> Jim Merkel
> ___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/gideon%40novamind.com
> 
> This email sent to gid...@novamind.com

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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