Re: Detecting MouseUp in NSSplitview

2010-12-29 Thread Kyle Sluder
On Wed, Dec 29, 2010 at 9:30 PM, Peter Zegelin wrote: > I would like to detect when a user has finished dragging on a splitview > divider but unfortunately just adding: > > - (void)mouseUp:(NSEvent *)theEvent{ >        [super mouseUp:theEvent]; > } > > to my NSSplitview subclass doesn't seem to w

Detecting MouseUp in NSSplitview

2010-12-29 Thread Peter Zegelin
I would like to detect when a user has finished dragging on a splitview divider but unfortunately just adding: - (void)mouseUp:(NSEvent *)theEvent{ [super mouseUp:theEvent]; } to my NSSplitview subclass doesn't seem to work as it never gets called. I get the mouseDown event but not the

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
On Thu Dec 30 2010 12:14:46 GMT+1000 (PGT) Kyle Sluder wrote: Instances of NSArrayController expose a selectedObjects property. If all of its columns are bound to the same NSArrayController, NSTableView autobinds its selection binding to the controller's selectedObjects property. This is what ma

Re: Ensuring no selection in a table view

2010-12-29 Thread Kyle Sluder
On Wed, Dec 29, 2010 at 5:11 PM, John Brownie wrote: > On Thu Dec 30 2010 09:56:18 GMT+1000 (PGT) Kyle Sluder wrote: > >> Is it propagating the selection from the controller? IOW, just because >> you have set avoidsEmptySelection=NO doesn't mean the controller will >> *prefer* an empty selection.

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
On Thu Dec 30 2010 09:56:18 GMT+1000 (PGT) Kyle Sluder wrote: Is it propagating the selection from the controller? IOW, just because you have set avoidsEmptySelection=NO doesn't mean the controller will *prefer* an empty selection. I don't understand this. How does the controller propagate a s

Re: Ensuring no selection in a table view

2010-12-29 Thread Kyle Sluder
On Wed, Dec 29, 2010 at 3:29 PM, John Brownie wrote: > Erik Buck wrote: >> >> Enabling empty selection in IB should do the trick.  You can also control >> selection programmatically with the delegate. >> >> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTableViewDelegate_P

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
Erik Buck wrote: Enabling empty selection in IB should do the trick. You can also control selection programmatically with the delegate. http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTableViewDelegate_Protocol/Reference/Reference.html That looked promising, but tableV

Re: Including Cocoa in a Carbon App

2010-12-29 Thread Nick Zitzmann
On Dec 29, 2010, at 3:41 PM, Jason T. Slack-Moehrle wrote: > In my code (which is OS X and Windows) I am currently using #ifdef __APPLE__ > for Apple specific items, I need to move this to Objective-C and call from > CPP should I switch to __OBJC__ instead of __APPLE__? Yes, if that Mac-spec

Re: Including Cocoa in a Carbon App

2010-12-29 Thread Jason T. Slack-Moehrle
Hi Nick, >> In my .pch I am adding: >> >> #ifdef __APPLE__ & __MACH__ > What you're doing will not work when building C and C++ source code in that > project, because those headers include ObjC definitions. If you do have C or > C++ source code, then the easiest way to fix this is to use the

Re: Including Cocoa in a Carbon App

2010-12-29 Thread Nick Zitzmann
On Dec 29, 2010, at 3:24 PM, Jason T. Slack-Moehrle wrote: > Hello All, > > I have a carbon app that I need to put some cocoa functionality in. I am > reading some resources on the ADC site. > > In my .pch I am adding: > > #ifdef __APPLE__ & __MACH__ > #import > #import >

Including Cocoa in a Carbon App

2010-12-29 Thread Jason T. Slack-Moehrle
Hello All, I have a carbon app that I need to put some cocoa functionality in. I am reading some resources on the ADC site. In my .pch I am adding: #ifdef __APPLE__ & __MACH__ #import #import #import #endif I have added the Cocoa and Foundation frameworks to my proje

Re: Binding label value to CoreDara int16

2010-12-29 Thread John Pannell
Hi Siegfried- Consider making an NSValueTransformer subclass that converts the stored integer into the text you would like to see. You can then use the transformer in the binding to see the text you'd like. I implemented something similar as follows: @implementation PKConnectionStateValueTran

Re: Binding label value to CoreDara int16

2010-12-29 Thread Siegfried
On 29/12/2010, at 18:29, John Pannell wrote: > Hi Siegfried- > > Consider making an NSValueTransformer subclass that converts the stored > integer into the text you would like to see. You can then use the > transformer in the binding to see the text you'd like. I implemented > something simi

Binding label value to CoreDara int16

2010-12-29 Thread Siegfried
Hello, I have an entity which has an integer property that represents a "mode". In code, I created an enum with possible values, but now I need to bind a label to that property. Obviously, it's not intent to show the number, but a text. What's the best way to do this? Create a dictionary, or an

Re: Multiple File Open Strategy

2010-12-29 Thread Ken Thomases
On Dec 22, 2010, at 3:25 PM, Jeremy Torres wrote: > I have a working implementation using Grand Central dispatch queues that open > a file and compute an OpenSSL DSA hash, writing out the hash to a new "side > car" file for later verification. > > I would like to open multiple files at the same

Re: Memory management about async object

2010-12-29 Thread James Bucanek
Answering myself... James Bucanek wrote (Tuesday, December 28, 2010 8:36 AM -0700): ico wrote (Tuesday, December 28, 2010 11:18 PM +0800): My question is, when should I release the myHandler? Should I release it in the myCallback,

connectionDidFinishLoading is not invoked immediately

2010-12-29 Thread ico
Greeting, everyone I have a strange problem with my NSURLConnection that I couldn't figure out. My app will call a webservice to load data. Every time I send the request, the method connection:didReceiveData: is invoked very quick, and I put a NSLog statement inside this method, I can see that the

Re: Ensuring no selection in a table view

2010-12-29 Thread Erik Buck
Enabling empty selection in IB should do the trick. You can also control selection programmatically with the delegate. http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTableViewDelegate_Protocol/Reference/Reference.html Out of curiosity: Why not allow selection? Users migh

Re: Multiple File Open Strategy

2010-12-29 Thread Charles Srstka
On Dec 22, 2010, at 3:25 PM, Jeremy Torres wrote: > I have a working implementation using Grand Central dispatch queues that open > a file and compute an OpenSSL DSA hash, writing out the hash to a new "side > car" file for later verification. > > I would like to open multiple files at the same