CGWarpMouseCursorPosition and large delta/offset at next mouse motion event

2012-02-16 Thread Samuel Williams
Hi, I'm using CGWarpMouseCursorPosition to position the cursor in the window after grabbing it and hiding it. I'm using CGAssociateMouseAndMouseCursorPosition(true/false) to ensure that the motion can be captured separately from the mouse position. However, after doing this, the next motion event

Re: Creating a file using NSURL

2012-02-16 Thread Tomas Franzén
On 16 feb 2012, at 07:18, Quincey Morris wrote: >> Error Domain=NSCocoaErrorDomain Code=4 "The file “[…]” doesn’t exist." >> UserInfo=0x400f252c0 {NSFilePath=/Volumes/[…], NSUnderlyingError=0x400f25140 >> "The operation couldn’t be completed. No such file or directory"} > > IOW, NSData is report

iOS additional sharing options (context menu)

2012-02-16 Thread Rick C.
Hi, My research tells me no, but to be sure is there a way to add additional sharing options in the iOS context menu? So for example if I'm in Photos and the options are Email Photo, Message, Print, etc. can I insert an additional option that would trigger my app? I know I can make it how I w

Re: iOS additional sharing options (context menu)

2012-02-16 Thread Roland King
No there's no way to do that On Feb 16, 2012, at 7:02 PM, Rick C. wrote: > Hi, > > My research tells me no, but to be sure is there a way to add additional > sharing options in the iOS context menu? So for example if I'm in Photos and > the options are Email Photo, Message, Print, etc. can I

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Matt Neuburg
On Wed, 15 Feb 2012 13:56:14 -0800, Kyle Sluder said: >On Wed, Feb 15, 2012 at 11:19 AM, Matt Neuburg wrote: >> My question is simply this: in a world that has GCD, is there any reason why >> we wouldn't have "queue" be a GCD dispatch queue (probably the main queue) >> and call dispatch_asynch?

Re: __block __weak - am I doing this right?

2012-02-16 Thread Matt Neuburg
On Wed, 15 Feb 2012 16:20:50 -0800, Greg Parker said: >On Feb 15, 2012, at 12:58 PM, Matt Neuburg wrote: >Are you using GC or ARC? I think this is safe with GC but not safe with ARC, >but I'm not an expert in the NSNotificationCenter machinery. ARC, but I don't see how it might be unsafe. I su

Re: __block __weak - am I doing this right?

2012-02-16 Thread Matt Neuburg
Never mind the async talk in my previous answer. You mean what I know; my point was, I now get the idea about why it's important that the block is executed later. m. -- matt neuburg, phd = m...@tidbits.com, A fool + a tool + an autorelease pool = cool! Programming iO

Re: copy & isEqual nightmares

2012-02-16 Thread Ken Thomases
On Feb 15, 2012, at 11:39 AM, Quincey Morris wrote: > I was just acknowledging the difference between (say) a NSMutableDictionary > whose internal state changes over time without affecting the objects it's > isEqual to (just itself, in this case) [...] A dictionary is equal to any other diction

Re: CGWarpMouseCursorPosition and large delta/offset at next mouse motion event

2012-02-16 Thread Ken Thomases
This isn't really a Cocoa issue. Seems more appropriate for quartz-dev... On Feb 16, 2012, at 3:29 AM, Samuel Williams wrote: > I'm using CGWarpMouseCursorPosition to position the cursor in the window > after grabbing it and hiding it. I'm using > CGAssociateMouseAndMouseCursorPosition(true/fals

Re: copy & isEqual nightmares

2012-02-16 Thread Quincey Morris
On Feb 16, 2012, at 08:30 , Ken Thomases wrote: > A dictionary is equal to any other dictionary with equal keys and values. > That's true for a mutable dictionary, too. Mutating a mutable dictionary > will changes which other objects it's equal to. Really? Well, OK. I can't find any documen

RE: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Julius Oklamcak
> On iOS, NSOperationQueue doesn't use GCD at all. Actually, posts by Apple people in the Developer Forums and the documentation differs on this: http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/NSOper ationQueue_class/Reference/Reference.html "Note: In iOS 4 and later, oper

Re: Sandbox - Security Scoped URLs (10.7.3)

2012-02-16 Thread Sean McBride
On Wed, 15 Feb 2012 11:33:53 -0800, Seth Willits said: >On Feb 15, 2012, at 5:49 AM, Kyle Sluder wrote: > >>> So 10.7.3 added URLs you can restore in a sandboxed process after >relaunch (AKA, needed by tons of apps that will be sandboxed), but I >can't get them to work. >>> >>> http://www.opensou

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Kyle Sluder
On Feb 16, 2012, at 8:09 AM, Matt Neuburg wrote: > On Wed, 15 Feb 2012 13:56:14 -0800, Kyle Sluder said: >> >> On iOS, NSOperationQueue doesn't use GCD at all. On Mac OS X 10.6 and >> greater, block-based NSOperations are submitted to global >> (asynchronous) dispatch queue. > > Very useful; t

Re: Block Behavior

2012-02-16 Thread koko
Ok. I need to read up on blocks … I was pushed to this because of using beginSheetModalForWindow:completionHandler: the __block prefix solved the problem. Thanks. -koko On Feb 15, 2012, at 11:00 PM, Jens Alfke wrote: > > On Feb 15, 2012, at 4:41 PM, koko wrote: > >> Candidate function not

standard user or admin user ?

2012-02-16 Thread Rajendran P
Is there any cocoa  by which i can determine ,  if the logged in user is standard user or admin user ?   P.Rajendran or Raju   (for further details contact me )     ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: [ Was NSReadPIxel ]

2012-02-16 Thread koko
I am only following directions but I think in this case I will push back given what you and Graham have said. -koko On Feb 15, 2012, at 5:35 PM, Kyle Sluder wrote: > Wait, you're trying to color-match against a specimen by _reading > color values from the screen?_ > > Does this not strike you

Re: copy & isEqual nightmares

2012-02-16 Thread Ken Thomases
On Feb 16, 2012, at 10:47 AM, Quincey Morris wrote: > On Feb 16, 2012, at 08:30 , Ken Thomases wrote: > >> A dictionary is equal to any other dictionary with equal keys and values. >> That's true for a mutable dictionary, too. Mutating a mutable dictionary >> will changes which other objects

Re: __block __weak - am I doing this right?

2012-02-16 Thread Greg Parker
On Feb 16, 2012, at 8:22 AM, Matt Neuburg wrote: > On Wed, 15 Feb 2012 16:20:50 -0800, Greg Parker said: >> >> Are you using GC or ARC? I think this is safe with GC but not safe with ARC, >> but I'm not an expert in the NSNotificationCenter machinery. > > ARC, but I don't see how it might be u

Re: __block __weak - am I doing this right?

2012-02-16 Thread Matt Neuburg
On Feb 16, 2012, at 12:05 PM, Greg Parker wrote: > On Feb 16, 2012, at 8:22 AM, Matt Neuburg wrote: >> On Wed, 15 Feb 2012 16:20:50 -0800, Greg Parker said: >>> >>> Are you using GC or ARC? I think this is safe with GC but not safe with >>> ARC, but I'm not an expert in the NSNotificationCent

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Matt Neuburg
On Feb 16, 2012, at 9:34 AM, Kyle Sluder wrote: > I must correct myself: NSOperationQueue uses GCD on iOS 4 and higher Good; I thought so, but you made me doubt it... :) m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programm

Re: __block __weak - am I doing this right?

2012-02-16 Thread Greg Parker
On Feb 16, 2012, at 12:42 PM, Matt Neuburg wrote: > On Feb 16, 2012, at 12:05 PM, Greg Parker wrote: >> >> The question is, who retains the observer? The __block __weak variable does >> not, because it's weak. NSNotificationCenter does not, as I understand it. > > It does, actually; thanks for

Re: __block __weak - am I doing this right?

2012-02-16 Thread Matt Neuburg
On Feb 16, 2012, at 12:45 PM, Greg Parker wrote: > On Feb 16, 2012, at 12:42 PM, Matt Neuburg wrote: >> On Feb 16, 2012, at 12:05 PM, Greg Parker wrote: >>> >>> The question is, who retains the observer? The __block __weak variable does >>> not, because it's weak. NSNotificationCenter does not

Re: standard user or admin user ?

2012-02-16 Thread Jens Alfke
On Feb 16, 2012, at 9:46 AM, Rajendran P wrote: > Is there any cocoa by which i can determine , if the logged in user is > standard user or admin user ? I believe you just use regular POSIX APIs to determine whether the user is a member of the group named ‘admin’. —Jens

WebView's documentView returning incorrect PDF using -dataWithPDFInsideRect:

2012-02-16 Thread Mel Walker
I want to get an image from a WebView's documentView. When I print it out to a PDF, I get a 2 page result. When I use -dataWithPDFInsideRect: like so: NSView* view = [[[webView mainFrame] frameView] documentView]; NSData* pdfData = [view dataWithPDFInsideRect: view.bounds]; I ge

Re: copy & isEqual nightmares

2012-02-16 Thread Quincey Morris
On Feb 16, 2012, at 11:44 , Ken Thomases wrote: > Well, the documentation for -[NSDictionary isEqualToDictionary:] >

Re: standard user or admin user ?

2012-02-16 Thread Kyle Sluder
On Thu, Feb 16, 2012 at 9:46 AM, Rajendran P wrote: > Is there any cocoa  by which i can determine ,  if the logged in user is > standard user or admin user ? Why do you need this information? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: copy & isEqual nightmares

2012-02-16 Thread Ken Thomases
On Feb 16, 2012, at 3:47 PM, Quincey Morris wrote: > On Feb 16, 2012, at 11:44 , Ken Thomases wrote: > >> Well, the documentation for -[NSDictionary isEqualToDictionary:] >>

Re: __block __weak - am I doing this right?

2012-02-16 Thread Ken Thomases
On Feb 16, 2012, at 2:05 PM, Greg Parker wrote: > On Feb 16, 2012, at 8:22 AM, Matt Neuburg wrote: >> On Wed, 15 Feb 2012 16:20:50 -0800, Greg Parker said: >>> >>> Are you using GC or ARC? I think this is safe with GC but not safe with >>> ARC, but I'm not an expert in the NSNotificationCenter

Re: standard user or admin user ?

2012-02-16 Thread Fritz Anderson
On 16 Feb 2012, at 11:46 AM, Rajendran P wrote: > Is there any cocoa by which i can determine , if the logged in user is > standard user or admin user ? Admin/non-admin status usually corresponds to privilege on Mac OS X, but it isn't identical. Users may be assigned privileges that would oth

Re: __block __weak - am I doing this right?

2012-02-16 Thread Fritz Anderson
On 16 Feb 2012, at 2:05 PM, Greg Parker wrote: > The question is, who retains the observer? The __block __weak variable does > not, because it's weak. NSNotificationCenter does not, as I understand it. I've lost the earlier parts of this thread… Are we talking about -[NSNotificationCenter addOb

Re: __block __weak - am I doing this right?

2012-02-16 Thread Greg Parker
On Feb 16, 2012, at 12:57 PM, Matt Neuburg wrote: > On Feb 16, 2012, at 12:45 PM, Greg Parker wrote: >> On Feb 16, 2012, at 12:42 PM, Matt Neuburg wrote: >>> On Feb 16, 2012, at 12:05 PM, Greg Parker wrote: The question is, who retains the observer? The __block __weak variable do

Re: standard user or admin user ?

2012-02-16 Thread Ken Thomases
On Feb 16, 2012, at 3:10 PM, Jens Alfke wrote: > On Feb 16, 2012, at 9:46 AM, Rajendran P wrote: > >> Is there any cocoa by which i can determine , if the logged in user is >> standard user or admin user ? > > I believe you just use regular POSIX APIs to determine whether the user is a > mem

Re: standard user or admin user ?

2012-02-16 Thread Glenn L. Austin
On Feb 16, 2012, at 9:46 AM, Rajendran P wrote: > Is there any cocoa by which i can determine , if the logged in user is > standard user or admin user ? It is easy for a standard user to become an admin user if asked and they know an admin username and password. Think along the lines of sudo

Re: Sandbox - Security Scoped URLs (10.7.3)

2012-02-16 Thread Seth Willits
On Feb 16, 2012, at 8:57 AM, Sean McBride wrote: > It looks like good progress, and is now documented here: > > > > But I still don't see how something like Xcode coul

Re: __block __weak - am I doing this right?

2012-02-16 Thread Matt Neuburg
On Feb 16, 2012, at 4:16 PM, Greg Parker wrote: > On Feb 16, 2012, at 12:57 PM, Matt Neuburg wrote: >> On Feb 16, 2012, at 12:45 PM, Greg Parker wrote: >>> On Feb 16, 2012, at 12:42 PM, Matt Neuburg wrote: On Feb 16, 2012, at 12:05 PM, Greg Parker wrote: > > The question is, who r

Re: Sandbox - Security Scoped URLs (10.7.3)

2012-02-16 Thread Seth Willits
On Feb 16, 2012, at 7:17 PM, Seth Willits wrote: > Simply put, I don't think bookmarks can do what relative file paths could > before. That's even before security gets involved. Given that the sandbox > requires using URL bookmarks, and bookmarks can't resolve relative paths like > this, it see