[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

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, AVPlayerS

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,

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 w

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 assignin

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:

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.

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

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

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

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

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 proj

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

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 proj

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

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 doe

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

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

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. Th

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. T

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; } Stati

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 b

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 f

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. Lik

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

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

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

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

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 contro

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

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)

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 th

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 belo

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@list

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 san