Re: Write Finder plugin

2012-07-16 Thread Ronald Oussoren
On 13 Jul, 2012, at 18:11, Mark Munz wrote: > But the OP *could* create a Workflow OS X Services Item that has a Run > Shell Script action with a python script. Or use PyObjC. Ronald > > On Thu, Jul 12, 2012 at 11:16 PM, Eric Schlegel wrote: >> >> On Jul 12, 2012, at 10:45 PM, Rakesh Singha

Re: Binding NSTableView to NSSet

2012-07-16 Thread Koen van der Drift
>> A follow up question: how do I now sort the data in the table? I am showing >> three values in the table, and like to sort based on either one of them. The >> original data is in an unordered NSSet (from my CD model). I could create an >> NSArray in my view controller: NSArray *myArray = [myT

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-07-16 Thread Greg Parker
On Jul 13, 2012, at 7:46 PM, Rick Mann wrote: > I'm using NSFileHandle in an ARC app on OS X Lion to read from a serial port. > > Everything works fine 'till I go to close the port. I open the port with > POSIX calls, set up some stuff, then instantiate an NSFileHandle with the > file descrip

textView, writeCell to clipboard, how to read from clipboard

2012-07-16 Thread Alexander Reichstadt
Hi, in NSTextView there is a method to handling writing textattachmentcells to the clipboard. I implemented the following and it seems to work: - (NSArray *)textView:(NSTextView *)aTextView writablePasteboardTypesForCell:(id )cell atIndex:(NSUInteger)charIndex; { return [NSArr

Re: +bundleForClass: category question

2012-07-16 Thread Jens Alfke
On Jul 15, 2012, at 8:29 PM, David Duncan wrote: > The category is a method on the class you specify, therefore [self class] > will be that class (whatever it is) and you will get the bundle for that > class. In this case, it means your bundle will be the framework bundle. That's an ambiguous

Re: +bundleForClass: category question

2012-07-16 Thread Dave DeLong
The answer is simple, and it's answered by the name of the method: -bundleForClass: Graham's framework does not define the class. Therefore, it is not the bundle that is returned from the method. This method returns the bundle that defines the class. In Graham's example, it would be the syst

NSTextAttachment

2012-07-16 Thread Alexander Reichstadt
Is there any way to have an NSTextView to hold text and custom data-widgets that are unrelated to filewrappers? I don't want NSTextAttachmentCell I think, because without a file it doesn't work, without tricking around it does not go in and out of the pasteboard, and NSTokenAttachment is some pr

Re: Core Data Multiuser

2012-07-16 Thread Jens Alfke
On Jul 13, 2012, at 12:38 PM, Flavio Donadio wrote: > On chapter 11, the book talks about "distributed Core Data", using > Distributed Objects to exchange NSManagedObjects between a client app and a > server app. The latter deals with the MOC and the persistent store. Zarra > warns about scal

Re: NSTextAttachment

2012-07-16 Thread Jens Alfke
On Jul 16, 2012, at 2:15 PM, Alexander Reichstadt wrote: > Is there any way to have an NSTextView to hold text and custom data-widgets > that are unrelated to filewrappers? I don't want NSTextAttachmentCell I > think, because without a file it doesn't work I have used NSTextAttachmentCell for

How to determine an NSSlider's thumb position onscreen?

2012-07-16 Thread Sean McBride
Hi all, Anyone know how to get the screen position of an NSSlider's thumb? NSSliderCell has a method knobRectFlipped: which works perfectly, though I note the docs say "You should never invoke this method explicitly. It’s included so you can override it". I don't see any other way though... (

Re: NSTextAttachment

2012-07-16 Thread Alexander Reichstadt
There is a blog that outlines how to do this with help of Douglas Davidson: http://www.dejal.com/blog/2007/11/cocoa-custom-attachment-text-view The suggestion here is to use a textStorage delegate to insert the custom attachment cell into the text. It actually relies on what seems like a bug: if

Re: Core Data Multiuser

2012-07-16 Thread Flavio Donadio
On 16/07/2012, at 18:39, Jens Alfke wrote: > In my experience — and yes I have tried it — using DO between multiple > computers is a nightmare. I know it sounds so simple and appealing, but > that's because it tries to sweep all the hard problems of networking[1] under > the rug. The problems r

Re: Core Data Multiuser

2012-07-16 Thread Jens Alfke
On Jul 16, 2012, at 4:11 PM, Flavio Donadio wrote: > To be honest, I know a little about Cocoa and can write almost any simple app > you can imagine. Core Data is not, by any measure, a simple framework. I > think I understand it, so it feels comfortable for me to try and stick with > it. But

Perplexing crash in iOS app, on observing an NSOperation

2012-07-16 Thread Gavin Stokes
I added some new operation-handling in my app, and it's now crashing quite frequently in background threads with EXC_BAD_ACCESS and this: 1 Foundation0x306cdd46 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 438 2 Foundation

Re: Perplexing crash in iOS app, on observing an NSOperation

2012-07-16 Thread Gavin Stokes
Never mind. I was double-releasing an operation. Thanks anyway! ___ 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

Re: +bundleForClass: category question

2012-07-16 Thread Graham Cox
On 17/07/2012, at 7:15 AM, Dave DeLong wrote: > The answer is simple, and it's answered by the name of the method: > > -bundleForClass: > > Graham's framework does not define the class. Therefore, it is not the > bundle that is returned from the method. This method returns the bundle that >

Re: +bundleForClass: category question

2012-07-16 Thread Kyle Sluder
On Tue, Jul 17, 2012, at 11:02 AM, Graham Cox wrote: > > What I'm trying to do is to add a couple of cursors to NSCursor using a > category which are created by loading images from the framework's > resources. Unfortunately it doesn't work when implemented in a simple way > because +bundleForClass

Re: +bundleForClass: category question

2012-07-16 Thread Jens Alfke
On Jul 16, 2012, at 6:02 PM, Graham Cox wrote: > What I'm trying to do is to add a couple of cursors to NSCursor using a > category which are created by loading images from the framework's resources. > Unfortunately it doesn't work when implemented in a simple way because > +bundleForClass re

Re: Core Data Multiuser

2012-07-16 Thread Chris Hanson
On Jul 16, 2012, at 2:39 PM, Jens Alfke wrote: > (1) Client-server. The database lives on one server machine, as does the > "business logic" (I hate that term) that manages your app. This could > definitely be implemented with Core Data if you like. The client app just > focuses on the UI, and

Sensible NSMultipleValuesMarker placeholder alternatives?

2012-07-16 Thread Markus Spoettl
Hello, I have a UI where the user selects objects and edits them in a separate (popup) window. The window opens, displays various combo boxes, text fields, and so on all bound to the model objects through an NSArrayController via the selection proxy. Also, when the editing window opens up, t