Re: iOS UI suggestions wanted - Date Picker

2013-04-17 Thread Alex Zavatone
What about a UITableView with a gradient overlay that is shaded at the top and bottom? On Apr 17, 2013, at 12:35 AM, Rick Aurbach wrote: > In my iPad app, I have a number of tableviews in various places which act as > selection lists. The user can scroll the list and select the item with a tap,

Re: iOS UI suggestions wanted - Date Picker

2013-04-17 Thread Rick Aurbach
Alex, You have my attention, I don't really understand what you're suggesting. How would a gradient overlay to the selection-list UITableView aid the user in scrolling to a particular date or making a selection? Could you elaborate?? Rick Aurbach On Apr 17, 2013, at 8:50 AM, Alex Zavatone wro

Re: iOS UI suggestions wanted - Date Picker

2013-04-17 Thread Alex Zavatone
Well, do a faux datepicker using a Table View and the gradient overlay to make it look like a datePicker, but one that you can customize a whole lot easier. Yeah, you can't scroll the day/month/year separately, but you can scroll one set of items that represent a range of dates. Lemmie cook up

Preventing edits in Versions browser

2013-04-17 Thread Steve Mills
I assume that NSDocument's isInViewingMode is what I should be asking if the document being used is an actual opened doc or one in the Versions browser. Looking at TextEdit, its document class has an isReadOnly instance variable, but I don't see it getting set to YES even when browsing versions.

KVO on a managed object called twice in child context

2013-04-17 Thread Roland King
I have an NSManagedObject "masterObject" in my main context with an NSOrderedSet property on it "characterLists". I'm observing that property in a UITableView and making the necessary changes when things are inserted, deleted etc. This has worked fine up until now. I just wrote a data importer w

Re: Core Animation with NSWindow

2013-04-17 Thread Jens Alfke
On Apr 16, 2013, at 9:40 PM, Ankuj Gupta wrote: > The problem that I have is I cant change the apis for creating the windows. > The only function which I can modify is when we are showing that window. That > is where I need to animate it What exactly is the animation that you need to show? —

NSOutlineView Travails

2013-04-17 Thread Gordon Apple
We are converting tables and outlines to view-based. So far, so good, on tables. But NSOutlineView has been a pain. First of all, there is no documentation on this, zero, zip, nada, zilch, in the NSOutlineView Reference. You have to rely on sample code and NSOutlineView.h. Our outline view has

File by index?

2013-04-17 Thread Steve Mills
I'm picking random files in folders that might have thousands of files. The only way I can see to do this in Cocoaland is to get an array of the entire contents of the folder (NSFileManager contentsOfDirectoryAtPath:error:), then choose from that array by index. Isn't this terribly wasteful of C

Re: File by index?

2013-04-17 Thread Jens Alfke
On Apr 17, 2013, at 11:40 AM, Steve Mills wrote: > Is there any better way to get an indexed file? Ya know, like we could easily > do in Carbon with something like PBGetCatInfoSync by supplying the index in > pb.dirInfo.ioFDirIndex? Go ahead and use the CarbonCore or POSIX APIs (although I th

Re: File by index?

2013-04-17 Thread Steve Mills
On Apr 17, 2013, at 14:42:25, Jens Alfke wrote: > Go ahead and use the CarbonCore or POSIX APIs (although I think there are > more modern replacements for the PBxxx functions!) Thanks. Yeah, I'm sure there are newer ones - I just didn't spend the time to find them since I found what I was look

Re: NSOutlineView Travails

2013-04-17 Thread Quincey Morris
On Apr 17, 2013, at 10:50 , Gordon Apple wrote: > We are converting tables and outlines to view-based. So far, so good, on > tables. But NSOutlineView has been a pain. First of all, there is no > documentation on this, zero, zip, nada, zilch, in the NSOutlineView > Reference. You have to rely

Re: NSOutlineView Travails

2013-04-17 Thread Gordon Apple
We had assumed that outlineView:objectValueForTableColumn:item was not called if the table was bound to a NSTreeController. Wrong assumption. If we returned the correct value, or just eliminated this method, it mostly works correctly. However, there a few anomalies. The outline text indents prop

Core Data: IN with ordered set of keys?

2013-04-17 Thread Dan Treiman
I have a situation where I want to fetch an ordered array of managed objects which contain an ordered set of keys, and return the result in the same order as the input set: NSOrderedSet * orderedIDs = ...; NSFetchRequest * fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"MyEn

Re: File by index?

2013-04-17 Thread Jens Alfke
On Apr 17, 2013, at 1:25 PM, Steve Mills wrote: > Sheesh. So Apple has been telling us for years to "go Cocoa!" and "go > 64-bit!", then they go and give us half-baked systems that are nowhere near > close to being replacements for what we had before. Seems like Apple should > take their own

Detecting application bundle being moved

2013-04-17 Thread Seth Willits
I think I've finally figured out that a couple crash patterns are caused by the user moving my application while it's still running. (I tested it and for some reason Finder wasn't warning me when I moved it, which is kinda odd.) How and why they're moving it is a bit unclear at the moment, but

Re: File by index?

2013-04-17 Thread Steve Mills
Hmm, I can't find a more modern way to get the nth file of a folder than PBGetCatInfoSync that's available in 64-bit. Anybody have a better idea? -- Steve Mills Drummer, Mac geek ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: File by index?

2013-04-17 Thread Jens Alfke
On Apr 17, 2013, at 3:10 PM, Steve Mills wrote: > Hmm, I can't find a more modern way to get the nth file of a folder than > PBGetCatInfoSync that's available in 64-bit. Anybody have a better idea? man 3 seekdir ? —Jens ___ Cocoa-dev mailing list (

Re: File by index?

2013-04-17 Thread Steve Mills
On Apr 17, 2013, at 17:17:45, Jens Alfke wrote: > man 3 seekdir Bleah. That looks sufficiently complicated (didn't even show up in Terminal's man search). I'll just stick with being inefficient if Apple can't provide a high-level easy-to-use replacement for a routine I and many others used to

Re: File by index?

2013-04-17 Thread Jens Alfke
On Apr 17, 2013, at 3:27 PM, Steve Mills wrote: > Bleah. That looks sufficiently complicated (didn't even show up in Terminal's > man search). I'll just stick with being inefficient if Apple can't provide a > high-level easy-to-use replacement for a routine I and many others used to > use oft

Re: Detecting application bundle being moved

2013-04-17 Thread Ken Thomases
On Apr 17, 2013, at 5:08 PM, Seth Willits wrote: > I think I've finally figured out that a couple crash patterns are caused by > the user moving my application while it's still running. (I tested it and for > some reason Finder wasn't warning me when I moved it, which is kinda odd.) > > How and

Re: Detecting application bundle being moved

2013-04-17 Thread Seth Willits
On Apr 17, 2013, at 4:07 PM, Ken Thomases wrote: >> Question is: what's the easiest way to detect it having been moved? I >> thought I'd get lucky and somewhere there'd be a handy notification, but I >> don't see one. It looks like I'll have to use the FSEvent API? I'm not a fan >> of it, so I'

Semaphore strangeness

2013-04-17 Thread Quincey Morris
I'm not sure if this is the right list for this, but then I'm not sure what is the right list. I'm seeing a consistent problem disposing of GCD semaphores. For example, if I create a semaphore like this: semaphore = dispatch_semaphore_create (10); and then use if for a while, then try

Re: Semaphore strangeness

2013-04-17 Thread Greg Parker
On Apr 17, 2013, at 4:14 PM, Quincey Morris wrote: > I'm not sure if this is the right list for this, but then I'm not sure what > is the right list. > > I'm seeing a consistent problem disposing of GCD semaphores. For example, if > I create a semaphore like this: > > semaphore = disp

Re: Semaphore strangeness

2013-04-17 Thread Charles Srstka
On Apr 17, 2013, at 7:06 PM, Greg Parker wrote: > On Apr 17, 2013, at 4:14 PM, Quincey Morris > wrote: > >> I'm not sure if this is the right list for this, but then I'm not sure what >> is the right list. >> >> I'm seeing a consistent problem disposing of GCD semaphores. For example, if >>

Re: Semaphore strangeness

2013-04-17 Thread Greg Parker
On Apr 17, 2013, at 5:44 PM, Charles Srstka wrote: > On Apr 17, 2013, at 7:06 PM, Greg Parker wrote: >> >> dispatch assumes you are using the semaphore in a lock-like pattern, where >> all waiters are expected to signal when they are done with their work. In >> that pattern, destroying a semap

Re: NSOutlineView Travails

2013-04-17 Thread Gordon Apple
By now, I¹m sure you¹ve seen my second posting. That at least got things showing up in (mostly) the right place. We always had a mixture of bindings and data source, mainly because line numbers were hard to do with bindings. With view=based tables and a little subclassing, it¹s not so hard. For

Re: NSOutlineView Travails

2013-04-17 Thread Quincey Morris
On Apr 17, 2013, at 18:08 , Gordon Apple wrote: > Our outlineView is not stable and it sometimes edits the wrong row. FWIW, the several times I saw instability and other odd behavior, it turned out I was doing something to the outline view on a non-main thread. The odd behavior didn't necessa

Re: Semaphore strangeness

2013-04-17 Thread Quincey Morris
On Apr 17, 2013, at 17:06 , Greg Parker wrote: > dispatch assumes you are using the semaphore in a lock-like pattern, where > all waiters are expected to signal when they are done with their work. In > that pattern, destroying a semaphore whose value is less than its original > value indicates

Re: File by index?

2013-04-17 Thread Scott Ribe
FSGetCatalogInfoBulk, or something like that... On Apr 17, 2013, at 4:10 PM, Steve Mills wrote: > Hmm, I can't find a more modern way to get the nth file of a folder than > PBGetCatInfoSync that's available in 64-bit. Anybody have a better idea? > > -- > Steve Mills > Drummer, Mac geek > > >

Re: File by index?

2013-04-17 Thread Steve Mills
On Apr 17, 2013, at 23:28:10, Scott Ribe wrote: > FSGetCatalogInfoBulk, or something like that... I'm pretty sure that won't do it. That's for getting multiple files and there's no way to specify just a single file by its index. -- Steve Mills Drummer, Mac geek __

NSScrollView in NSTabView autolayout problem

2013-04-17 Thread kwic...@wichry.net
Hi I have an NSTabView with multiple tabs, each containing an NSScrollView. In the scrollviews I dynamically place custom views which are sized using autolayout and constraints. Now if I add my custom views to a scrollview in tab1 and resize the window with this tab active everything works fine

ANN: new open-source window manager for OS X

2013-04-17 Thread Steven Degutis
Called Windows.app. Source is on github: https://github.com/sdegutis/windowsapp What's particularly neat about it is how you configure it. It looks for a dotfile in your home dir, which can either be JavaScript or CoffeeScript. In this config file you, bind your hot keys as you want, using a very

Modeling a Linux USB Serial Driver with IOKit

2013-04-17 Thread Caylan Larson
Ahoy, I've been working hard on a basic implementation of a userspace driver for the WCH341. Would you mind offering some advice for where I may have gone astray? I've got the device/interface endpoints setup correctly. That is, _usbDevice and _usbInterface have been initialized properly. I

Re: ANN: new open-source window manager for OS X

2013-04-17 Thread Charles Srstka
On Apr 17, 2013, at 11:44 AM, Steven Degutis wrote: > Called Windows.app. ... I think someone may have used the name "Windows" already... Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c