Re: Sandboxing die.die.die

2012-08-21 Thread Kyle Sluder
On Aug 21, 2012, at 11:02 PM, Jens Alfke wrote: > > But then, I haven't tried sandboxing yet. It sounds almost like some > exquisite form of BDSM: taking away all of your freedom and then making you > beg to get little bits back. Does it come with safe-words? Irrespective of everything else,

Crash with UITableView reloadRowsAtIndexPaths:withRowAnimation:

2012-08-21 Thread Laurent Daudelin
iOS 5.0 simulator or device. When I call this method like this: [[NSOperationQueue mainQueue] addOperationWithBlock:^{ [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:

Re: Sandboxing die.die.die

2012-08-21 Thread Laurent Daudelin
On Aug 21, 2012, at 22:45, Graham Cox wrote: > > On 22/08/2012, at 2:46 PM, Laurent Daudelin wrote: > >> That's really bad news. I have a synchronization app on the App Store and I >> was hoping to update it with those security-scoped URLs but if it doesn't >> work for the content of folders

Re: Sandboxing die.die.die

2012-08-21 Thread Jens Alfke
On Aug 21, 2012, at 8:47 PM, Graham Cox wrote: > Is sandboxing the MOST HATEFUL and useless API Apple have ever created? I > can't think of a worse one in 30 years It would be hard to beat the iOS Keychain API (which they are now trying to foist upon us in OS X by deprecating the old serv

Re: Sandboxing die.die.die

2012-08-21 Thread Graham Cox
On 22/08/2012, at 2:46 PM, Laurent Daudelin wrote: > That's really bad news. I have a synchronization app on the App Store and I > was hoping to update it with those security-scoped URLs but if it doesn't > work for the content of folders, then I'm hosed. OK, I think I see what needs to happe

Re: Sandboxing die.die.die

2012-08-21 Thread Graham Cox
On 22/08/2012, at 1:47 PM, Graham Cox wrote: > The problem is that all of the files and folders INSIDE the folder created > from the security bookmark are being disallowed by sandboxd Here's a typical refusal report. 22/08/12 2:44:33.229 PM sandboxd[64627]: ([64596]) Artboard(64596) deny f

iOS IB Object

2012-08-21 Thread koko
I put an Object (the orange cube) into my xib and set its custom class. I connected an action in the custom class to a UIButton. Sometimes the action is called when the button is clicked but most of the time there is a crash .. unrecognized selector sent to instance …hmm? Wanting to move ahead

Re: Sandboxing die.die.die

2012-08-21 Thread Laurent Daudelin
On Aug 21, 2012, at 20:47, Graham Cox wrote: > Is sandboxing the MOST HATEFUL and useless API Apple have ever created? I > can't think of a worse one in 30 years > > > Anyway ranting aside, > > I have a browser which allows the user to add folders to a source list and it > then scans tha

Sandboxing die.die.die

2012-08-21 Thread Graham Cox
Is sandboxing the MOST HATEFUL and useless API Apple have ever created? I can't think of a worse one in 30 years Anyway ranting aside, I have a browser which allows the user to add folders to a source list and it then scans that folder for image files and displays them, including in any s

Re: Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Daniel Parnell
Hi Jens, I have written a wrapper around the FreeTDS library. It is currently packaged as a Cocoa framework, however to use it on the iPhone/iPad it would need to be turned into a static library. That wouldn't be too difficult. You can get it from Github here: https://github.com/dparn

Re: Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Jens Alfke
On Aug 21, 2012, at 7:12 PM, Jordan Burnam wrote: > I however have not found a way of easily interacting with a relational > database like SQL server. I'll need to retrieve rows and update tables using > stored procedures. It would need to be a solution that can interact with SQL > that has b

Cocoa and SQL (microsoft SQL 2008)

2012-08-21 Thread Jordan Burnam
Hello everyone, I have an idea that I'd like to implement with cocoa on the Mac, preferably the iPhone. I currently work as a developer for a company. We use visual studio(microsoft windows)to create almost everything. The company gives out iPhones to employees for work use and everyone

Re: How to make Obj-C collection subscripting work on iOS 5?

2012-08-21 Thread Rainer Brockerhoff
On Aug 20, 2012, at 20:41 , Rainer Brockerhoff wrote: > I can confirm NSOrdered[Mutable]Set isn't covered by libarclite. Here's what > I'm using for that (easily extended to other classes: Oops. Forgot to take out my RBXCALL() macros (which just add a trivial test), so below's the corrected ver

[SOLVED] Re: Modal Dialog from sheet

2012-08-21 Thread Graham Cox
On 22/08/2012, at 6:51 AM, Quincey Morris wrote: > Maybe you should show some code fragments. It's not clear whether the "modal > dialog" is itself intended to be a sheet, since 'runModalForWindow:' is going > to make it app-modal anyway, not document-modal (isn't it?). Yes, the secondary di

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-08-21 Thread Jerry Krinock
On 2012 Aug 20, at 14:14, Kevin Perry wrote: > Looks like the crash is happening while attempting to invoke > -respondsToSelector:. > > Odds are that this is a message being sent to [self delegate], which looks > like a deallocated object. Thank you, Kevin. I like it. > Is it possible that

Re: Modal Dialog from sheet

2012-08-21 Thread Quincey Morris
On Aug 21, 2012, at 04:28 , Graham Cox wrote: > I have a need to display a modal dialog from a document-modal sheet. > > I display the dialog OK but I can't dismiss it. I use [NSApp > stopModalWithCode:] and I show the dialog using [NSApp > runModalForWindow:]; > > I tried using a modal sessi

Re: Implementing Manual KVO For Bitfields Set in Atomic Operations

2012-08-21 Thread Scott A Andrew
Check out http://newwavedigitalmedia.com/blog/?p=132 I'll fix the image issues shortly. But basically it shows how to setup KVO for calculated values. So you could create KVO for each state using keyPathsForValuesAffecting then implement getters and setters. So each state could be handled via

Re: Set icon for files and folder

2012-08-21 Thread Kyle Sluder
On Tue, Aug 21, 2012, at 09:29 AM, Rakesh Singhal wrote: > I checked but I didn't find any solution. Yes, Dropbox does the same but > they use injecting. I can change icon using NSWorkspace but only the > issue > is don't want to set icon permanently. What are the ways to do it except > injecting.

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:38 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > >> Well, then you just need to override: >> >> - (BOOL)needsPanelToBecomeKey >> >> in the NSTableView (subclass) and return NO. > > I'll try it, but frankly this doesn't make sense. I *do*

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:38 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > >> Well, then you just need to override: >> >> - (BOOL)needsPanelToBecomeKey >> >> in the NSTableView (subclass) and return NO. > > I'll try it, but frankly this doesn't make sense. I *do*

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 9:02 AM, Kyle Sluder wrote: > On Aug 21, 2012, at 8:43 AM, Corbin Dunn wrote: > >> Override: >> >> - (BOOL)needsPanelToBecomeKey >> >> and return NO. If you think about it...that is conceptually what you want. >> Also, the window could return YES from becomesKeyOnlyIfNe

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Kyle Sluder
On Aug 21, 2012, at 9:07 AM, Jean Suisse wrote: > Well, then you just need to override: > > - (BOOL)needsPanelToBecomeKey > > in the NSTableView (subclass) and return NO. I'll try it, but frankly this doesn't make sense. I *do* want the panel to become key when the user clicks the table vie

Re: Set icon for files and folder

2012-08-21 Thread Uli Kusterer
On Aug 21, 2012, at 1:08 PM, Rakesh Singhal wrote: > I have to change icon for file/folder. I can user NSWorkSpace to get icon > and set icon. The issue is this icon will be set permanently. If I copy and > paste file after changing icon then this icon also will be copied and > pasted. I need to h

Re: Set icon for files and folder

2012-08-21 Thread Rakesh Singhal
I checked but I didn't find any solution. Yes, Dropbox does the same but they use injecting. I can change icon using NSWorkspace but only the issue is don't want to set icon permanently. What are the ways to do it except injecting. Regards, Rakesh On Tue, Aug 21, 2012 at 9:53 PM, Uli Kusterer wro

Re: Implementing Manual KVO For Bitfields Set in Atomic Operations

2012-08-21 Thread Seth Willits
On Aug 21, 2012, at 3:53 AM, Andreas Grosam wrote: > So, in order to implement KVO, I would need to track changes of the ivar > _state, and invoke > -willChangeValueForKey:, and > -didChangeValueForKey: > appropriately. > > But, how exactly can I accomplish this with the given code above? Yo

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
Well, then you just need to override: - (BOOL)needsPanelToBecomeKey in the NSTableView (subclass) and return NO. More info here : https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsview_Class/Reference/NSView.html This should do the trick. (It work

Re: PubSub Framework Alternative

2012-08-21 Thread Seth Willits
On Aug 20, 2012, at 2:19 AM, Mike Abdullah wrote: > Have you considered handing off this portion of your code as part of an XPC > process? It could then quit and relaunch without your app needing to be. Yes, actually, but I figured a new open source framework would probably prove more useful a

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Kyle Sluder
On Aug 21, 2012, at 8:43 AM, Corbin Dunn wrote: > Override: > > - (BOOL)needsPanelToBecomeKey > > and return NO. If you think about it...that is conceptually what you want. > Also, the window could return YES from becomesKeyOnlyIfNeeded, and it should > also work. I don't know what Jean Sui

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
That's perfect. Thank you very much. I have been dragging this inconvenience in my app for a long time now… Jean On 21 août 2012, at 17:43, Corbin Dunn wrote: > Override: > > - (BOOL)needsPanelToBecomeKey > > and return NO. If you think about it...that is conceptually what you want. > Also

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
On Aug 21, 2012, at 8:14 AM, Keary Suska wrote: > On Aug 21, 2012, at 8:59 AM, Jean Suisse wrote: > >> Thank you very much for your reply. >> >> Id did override acceptsFirstMouse all the way down to the NSTableView >> subclass. And i did the same for acceptsFirstResponder. >> Both acceptsFirs

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Corbin Dunn
Override: - (BOOL)needsPanelToBecomeKey and return NO. If you think about it...that is conceptually what you want. Also, the window could return YES from becomesKeyOnlyIfNeeded, and it should also work. -corbin On Aug 21, 2012, at 5:48 AM, Jean Suisse wrote: > Hello, > > I have an NSPan

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Keary Suska
On Aug 21, 2012, at 8:59 AM, Jean Suisse wrote: > Thank you very much for your reply. > > Id did override acceptsFirstMouse all the way down to the NSTableView > subclass. And i did the same for acceptsFirstResponder. > Both acceptsFirstMouse and acceptsFirstResponder are only called for the >

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Keary Suska
On Aug 21, 2012, at 6:48 AM, Jean Suisse wrote: > I have an NSPanel window that contains an NSTableView with the usual setup > (NSPanel -> content view (NSView) -> NSScrollView -> NSTableView -> etc). > When the Panel does not have the focus, clicking on an item of the table view > will first ac

Re: Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
Well, apparently Glen Low did post a similar question, back in 2007. http://lists.apple.com/archives/cocoa-dev/2007/Jun/msg00897.html Jean Suisse Institut de Chimie Moléculaire de l’Université de Bourgogne (ICMUB) — UMR 6302 U.F.R. Sciences et Techniques, Bâtiment Mirande Aile B, bureau 411 9, av

Focus issues with NSTableView in NSPanel

2012-08-21 Thread Jean Suisse
Hello, I have an NSPanel window that contains an NSTableView with the usual setup (NSPanel -> content view (NSView) -> NSScrollView -> NSTableView -> etc). When the Panel does not have the focus, clicking on an item of the table view will first activate the panel. Then a second click will be req

Re: Catching app-wide (system-wide) modifier keypress

2012-08-21 Thread Michael Babin
On Aug 21, 2012, at 6:33 AM, Jean Suisse wrote: > In short : > Is there a way to be notified of any change in the status of control keys > (option, control, command, etc.) in a given NSWindowController, when another > window of the app has the focus ? > > Long version (what I am trying to achi

Re: Modal Dialog from sheet

2012-08-21 Thread Graham Cox
On 21/08/2012, at 9:52 PM, lbland wrote: > That Save Panel behavior has been a long-standing exception (violation?). > > Maybe this restriction has been removed, but I am not aware of such a > statement in the docs. But I'm not cascading sheets, and neither does the Save panel. It shows the

Re: Modal Dialog from sheet

2012-08-21 Thread lbland
hi- On Aug 21, 2012, at 7:28 AM, Graham Cox wrote: > What's the correct way to nest a modal dialog within a document-modal sheet? > > BTW, before there are howls of protest from the UI police, there is > precedence for this - in the Save Panel, when it needs to prompt whether to > replace a

Catching app-wide (system-wide) modifier keypress

2012-08-21 Thread Jean Suisse
Hello, In short : Is there a way to be notified of any change in the status of control keys (option, control, command, etc.) in a given NSWindowController, when another window of the app has the focus ? Long version (what I am trying to achieve) : The app I am currently working on is a multipu

Modal Dialog from sheet

2012-08-21 Thread Graham Cox
Hi all, I have a need to display a modal dialog from a document-modal sheet. I display the dialog OK but I can't dismiss it. I use [NSApp stopModalWithCode:] and I show the dialog using [NSApp runModalForWindow:]; I tried using a modal session but got the same outcome. What's the correct way

Set icon for files and folder

2012-08-21 Thread Rakesh Singhal
Hi, I have to change icon for file/folder. I can user NSWorkSpace to get icon and set icon. The issue is this icon will be set permanently. If I copy and paste file after changing icon then this icon also will be copied and pasted. I need to have original icon when I move the file. Is there way to

Implementing Manual KVO For Bitfields Set in Atomic Operations

2012-08-21 Thread Andreas Grosam
I'm struggling implementing proper KVO for a number of Bool properties whose state is retrieved from a bit field or a bit mask. These bits are part of a single "_state" integer ivar, which will be modified with atomic operations: enum StateT { StateZero = 0, State_X = 1 << 0, State_