Re: Framework Installation Directory

2011-04-10 Thread Jerry Krinock
On Friday, April 8, 2011, Mr. Gecko wrote: > I need help with the Installation Directory for a framework that will be > shared between a application and 2 daemons within side it. I think I may be > able to do it if I were to have the 2 daemons executables in the MacOS path > or another folder

Re: file done writing?

2011-04-10 Thread Gary L. Wade
If you have full control of both applications, try making the writer do its work on a temporary file and move it in place when done. Look at the atomic writing messages that do a flavor of this. You might find the FSEvents mechanism something to consider if you're watching a dump folder where the

Re: NSManagedObjected isInserted

2011-04-10 Thread Jerry Krinock
On 2011 Apr 10, at 11:52, Carter R. Harrison wrote: > On Apr 10, 2011, at 1:29 PM, Quincey Morris wrote: > >> The object should return YES for "isInserted" from the time it's inserted to >> the time the store is committed/saved. > > On a subsequent run of my application I fetch the object from

Re: file done writing?

2011-04-10 Thread Rainer Standke
Thanks Scott, this is helpful and good to know. In the meantime I have played a little with lsof on the command line, and it seems to sort of answer the question wether or not someone has a file open with authority... but it's very slow. Just to enlighten me, why can't there be no absolute way

blocks and NSInvocation question

2011-04-10 Thread John Michael Zorko
Hello, all ... I'm stumped as to why this generates a warning when I compile. Do I need to do something special with my AVURLAsset * to be able to access it from inside the block in order to add it to an NSInvocation? for (int index = 0; index < [assetsToLoad count]; index ++) {

OCMock in Xcode 4

2011-04-10 Thread qvacua
Hi, I'm trying to to get OCMock to work with Xcode 4. I created a new blank project with unit tests enabled. I added OCMock.framework file to the test target. What I get is that the framework cannot be loaded because the image is not found. I tried with a copy phase to copy the framework to the te

Re: Remove Duplicates in a NSArray

2011-04-10 Thread Matt Neuburg
On Sun, 10 Apr 2011 12:42:50 -0400, Christopher Nagel said: >Could you just add each dictionary to a single dict and then have a >globally unique set of keys? This would presuppose you know which >value of testKey is the one you wan to retain, and you'd add that one >last. > >On Oct 1, 2008

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Matt Neuburg
On Sun, 10 Apr 2011 14:45:12 +0200, Philipp Leusmann said: >In this situation XCode4 did not show a warning. This reminds me of this: I was tromping on an undocumented exis

Re: Can an image be "rejected" by CALayer?

2011-04-10 Thread Matt Neuburg
On Sun, 10 Apr 2011 22:29:55 +0200, Gabriel Zachmann said: >>> I am creating CA layers like so: >>> >>> CALayer * imgLayer= [CALayer layer]; >>> imgLayer.contents = (id) image; >>> imgLayer.contentsGravity = kCAGravityResizeAspect; >>> imgLayer.delegate

Re: Using selectedMenuItemColor

2011-04-10 Thread Eric Gorr
On Apr 10, 2011, at 10:09 PM, Graham Cox wrote: > > On 11/04/2011, at 11:33 AM, Eric Gorr wrote: > >> Hummm...I can't seem to get it to do much. If I alter the code to: > > > Have you tried using NSAffineTransform to offset the coordinate system to > where you want to draw? You probably don'

Re: Using selectedMenuItemColor

2011-04-10 Thread Graham Cox
On 11/04/2011, at 11:33 AM, Eric Gorr wrote: > Hummm...I can't seem to get it to do much. If I alter the code to: Have you tried using NSAffineTransform to offset the coordinate system to where you want to draw? You probably don't need or want to mess with your view coordinates or frame, you

Re: Using selectedMenuItemColor

2011-04-10 Thread Eric Gorr
On Apr 10, 2011, at 2:13 AM, Lee Ann Rucker wrote: > Interesting - if you set the view so its Y origin is zero, it draws as > expected. Hummm...I can't seem to get it to do much. If I alter the code to: [self setFrameOrigin:NSMakePoint( 0, 0 )]; for ( x = 0; x < 10; x++ )

Re: file done writing?

2011-04-10 Thread Scott Ribe
On Apr 10, 2011, at 5:57 PM, Rainer Standke wrote: > Is there any way to tell if a file is done being written? In general, no. There are lots of "maybe kind of" solutions, including trying to open for exclusive access. But there is absolutely no way, nor can there be, to know when to read a fil

Re: Mac App Store requirements

2011-04-10 Thread Laurent Daudelin
On Apr 10, 2011, at 16:45, Todd Heberlein wrote: > On Apr 10, 2011, at 4:32 PM, davel...@mac.com wrote: > >> And you also have add code to verify a valid receipt. There's a few samples >> of how to do this on github (you should modify them to make the app more >> difficult to crack unless you'r

file done writing?

2011-04-10 Thread Rainer Standke
Hello, I have an application that needs to wait for a file to be fully written. I tried this by getting an NSFilehandle, and with open() and fopen(), hoping that a failure of these would indicate that they are not done writing yet. However, I get only successes, even if the file is clearly stil

Re: Mac App Store requirements

2011-04-10 Thread Tom Hohensee
Yes I second what Todd has said. I am currently working on receipt validation for my third app store app. I did not do it for my first two apps, too many other thinks to worry about. The documentation is not very good at this point. Tom On Apr 10, 2011, at 6:45 PM, Todd Heberlein wrot

Re: Mac App Store requirements

2011-04-10 Thread Todd Heberlein
On Apr 10, 2011, at 4:32 PM, davel...@mac.com wrote: > And you also have add code to verify a valid receipt. There's a few samples > of how to do this on github (you should modify them to make the app more > difficult to crack unless you're giving the app away for free). Apple has > more about

Re: Mac App Store requirements

2011-04-10 Thread davelist
And you also have add code to verify a valid receipt. There's a few samples of how to do this on github (you should modify them to make the app more difficult to crack unless you're giving the app away for free). Apple has more about this that you can read once you join the developer program.

Re: Can an image be "rejected" by CALayer?

2011-04-10 Thread Gabriel Zachmann
>> I am creating CA layers like so: >> >> CALayer * imgLayer = [CALayer layer]; >> imgLayer.contents = (id) image; >> imgLayer.contentsGravity = kCAGravityResizeAspect; >> imgLayer.delegate = nil; >> imgLayer.opacity = 1.0; >> imgLayer.positio

Re: Mac App Store requirements

2011-04-10 Thread Tom Hohensee
Not yet. You have some setup work to do in itunesconnect. Apple provides a step by step guideline for submission Sent from my iPhone On Apr 10, 2011, at 2:28 PM, Artemiy Pavlov wrote: > I am aware of this, and I meant only the technical side. So I built a Cocoa > app with XCode, so I can joi

AVAssetImageGenerator and HTTP-Live streams

2011-04-10 Thread John Michael Zorko
Hello again ... I've found that when I use AVAssetImageGenerator to try to create a thumbnail from an HTTP-Live video stream, it fails, yet it works for basic M4V streams. I suspect that the multiple-bitrate nature of HTTP-Live is messing with it. I suppose I can parse the M3U8 myself and choo

Re: Mac App Store requirements

2011-04-10 Thread Artemiy Pavlov
I am aware of this, and I meant only the technical side. So I built a Cocoa app with XCode, so I can join the developer programme and I am ready to go just like that? A. On 10 Apr 2011, at 21:47, Laurent Daudelin wrote: > There is a set of guidelines about things you should avoid if you don't

AVFoundation and OpenGL?

2011-04-10 Thread John Michael Zorko
Hello, all ... I've been playing with Core Animation and AVFoundation to get some interesting results. I've a question, though, with regards to AVFoundation and OpenGL: Can I make OpenGL work with AVPlayerLayer? Regards, John ___ Cocoa-dev mailin

Re: Mac App Store requirements

2011-04-10 Thread Jason Harris
Is it about as easy / difficult as adding say Sparkle support to your app? Easier? More difficult? (I also don't know this and I have been planning to add MacHg to the MacApp store at some stage in the not too distant future...) Thanks! Jas On Apr 10, 2011, at 8:47 PM, Laurent Daudelin wrote:

Re: NSManagedObjected isInserted

2011-04-10 Thread Carter R. Harrison
On Apr 10, 2011, at 1:29 PM, Quincey Morris wrote: > On Apr 10, 2011, at 06:52, Carter R. Harrison wrote: > >> Can anybody ever think of a scenario where [NSManagedObject isInserted] >> equals NO for an object that is initially fetched from the context? And no >> the object has not been delet

Re: Mac App Store requirements

2011-04-10 Thread Laurent Daudelin
There is a set of guidelines about things you should avoid if you don't want your app to be rejected. Not sure if it's available to non-registered Mac developers but I think it should. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.neme

Mac App Store requirements

2011-04-10 Thread Artemiy Pavlov
Hey all, I am not yet a member of the Mac Developer program, but I am experimenting with my own Cocoa OS X app and I would like to know what are the requirements on getting it into the Mac App Store. I mean, I have a 32/64 bit Intel build of a vanilla Cocoa app in XCode. Where will I go from t

Re: Controller Selection Synchronization

2011-04-10 Thread Quincey Morris
On Apr 10, 2011, at 07:56, Richard Somers wrote: > The primary view is a custom view that displays objects spatially according > to their position in x, y, z coordinate space. The secondary views are table > type views. > I currently have a transient selection property for each object in the da

Re: NSManagedObjected isInserted

2011-04-10 Thread Quincey Morris
On Apr 10, 2011, at 06:52, Carter R. Harrison wrote: > Can anybody ever think of a scenario where [NSManagedObject isInserted] > equals NO for an object that is initially fetched from the context? And no > the object has not been deleted from the context prior to calling isInserted. What do yo

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Quincey Morris
On Apr 10, 2011, at 03:25, Philipp Leusmann wrote: > This absolutely explains the observed behavior, but still leaves me wondering > about the feature of sending messages to id. > While I am still new to programming in objective-c and only having read the > basic language documentation, I remem

Re: Remove Duplicates in a NSArray

2011-04-10 Thread Christopher Nagel
Could you just add each dictionary to a single dict and then have a globally unique set of keys? This would presuppose you know which value of testKey is the one you wan to retain, and you'd add that one last. Chris On Oct 1, 2008, at 7:29 AM, Rashmi Vyshnavi wrote: Hi All, Is there a

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-10 Thread Ken Thomases
On Apr 10, 2011, at 9:49 AM, Fritz Anderson wrote: > On 8 Apr 2011, at 7:51 PM, Kyle Sluder wrote: > >> As explained in the Blocks Programming Guide, you should not allow >> blocks that reference stack storage to escape that scope. See >> "Patterns to Avoid": >> http://developer.apple.com/library

Re: Controller Selection Synchronization

2011-04-10 Thread Richard Somers
On Apr 9, 2011, at 18:00, Richard Somers wrote: > I have a primary view which displays all objects using a primary controller. > Both 'A' and 'B' objects are included in the controller content. This is > accomplished by using an abstract class in the managed object model that is a > parent of b

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-10 Thread Fritz Anderson
On 8 Apr 2011, at 7:51 PM, Kyle Sluder wrote: > As explained in the Blocks Programming Guide, you should not allow > blocks that reference stack storage to escape that scope. See > "Patterns to Avoid": > http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Blocks/Articles/bxUsing

NSManagedObjected isInserted

2011-04-10 Thread Carter R. Harrison
Can anybody ever think of a scenario where [NSManagedObject isInserted] equals NO for an object that is initially fetched from the context? And no the object has not been deleted from the context prior to calling isInserted. ___ Cocoa-dev mailing list

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Philipp Leusmann
In this situation XCode4 did not show a warning. Philipp Am 10.04.2011 um 13:44 schrieb Anders Norlander: > You should get a warning about ambiguous messages, and it also tells you > which selector is actually used: > Multiple methods named 'width' found > Using '-(CGFloat)width' > > Then us

Remove KVO for MKAnnotationViews

2011-04-10 Thread Philip Vallone
Hi, I am in need of some help. I have a MKMapView object, which allows the user to add, move and delete MKAnnotationViews. When an Annotation is added to the map, I use KVO to track if the Annotation was moved or selected: for (MKAnnotationView *anAnnotationView in views) {

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Anders Norlander
You should get a warning about ambiguous messages, and it also tells you which selector is actually used: Multiple methods named 'width' found Using '-(CGFloat)width' Then use static typing to resolve the ambiguity (i.e [(Resolution*)object width]) 'treat warnings as errors' is a big help in avo

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Philipp Leusmann
Stephen, thanks to your detailed answer. This absolutely explains the observed behavior, but still leaves me wondering about the feature of sending messages to id. While I am still new to programming in objective-c and only having read the basic language documentation, I remember this feature t

Re: How To Increment CALayer Retain Count?

2011-04-10 Thread Quincey Morris
On Apr 9, 2011, at 23:17, Jeffrey Walton wrote: > The problem was prefixing the various IBOutlets with "self.". To add > insult to injury, I added "self." to nearly all interface variables to > ensure disambiguation when I first encountered EXC_BAD_ACCESS. > > According to Hillegass, "self" is eq

RE: How To Increment CALayer Retain Count?

2011-04-10 Thread Lee Ann Rucker
From: Jeffrey Walton [noloa...@gmail.com] Sent: Sunday, April 10, 2011 1:03 AM To: Lee Ann Rucker Cc: cocoa-dev@lists.apple.com Subject: Re: How To Increment CALayer Retain Count? On Sun, Apr 10, 2011 at 3:54 AM, Lee Ann Rucker wrote: > What does your @pr

Re: How To Increment CALayer Retain Count?

2011-04-10 Thread Jeffrey Walton
On Sun, Apr 10, 2011 at 3:54 AM, Lee Ann Rucker wrote: > What does your @property line look like for your variables? If it's retain, > then "(x) = nil;" in your macro is releasing it again. That's the magic of > dot operator assign in ObjC. @property (retain, nonatomic) IBOutlet UINavigationBar*

Re: Strange property/synthesized accessor behaviour

2011-04-10 Thread Stephen J. Butler
On Sat, Apr 9, 2011 at 9:52 AM, Philipp Leusmann wrote: > Who can explain this behavior to me? Why is oWidth != object.mWidth ? How can > that happen? It's an artifact of how Objective-C searches for selector implementations. You're calling @selector(width) on an "id", and of course "id" doesn't

RE: Strange property/synthesized accessor behaviour

2011-04-10 Thread Lee Ann Rucker
Unless you've got @synthesize width = mWidth; ObjC has created a second set of variables for you named width and height with no connection to mWidth and mHeight. From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com [cocoa-dev-bounces+lrucker=vmware

RE: How To Increment CALayer Retain Count?

2011-04-10 Thread Lee Ann Rucker
What does your @property line look like for your variables? If it's retain, then "(x) = nil;" in your macro is releasing it again. That's the magic of dot operator assign in ObjC. I imagine those macros exist because using "self.foo = nil" in dealloc can have unwanted side effects, so they're a

Strange property/synthesized accessor behaviour

2011-04-10 Thread Philipp Leusmann
Today I wanted to override the - (void) isEqual:(id) method of a custom, but very simple subclass of NSObject: @interface Resolution : NSObject { NSUInteger mWidth; NSUInteger mHeight; } -(id) initWithWidth:(NSUInteger) width andHeight:(NSUInteger) height; -(BOOL) isValidResolution; @property N