RE: Natural language

2011-11-14 Thread Luca Ciciriello
Thanks Vincent, that should solve my problems. Luca. Subject: Re: Natural language From: mailingli...@satsumac.com Date: Sun, 13 Nov 2011 21:37:01 +0100 CC: cocoa-dev@lists.apple.com To: luca_cicirie...@hotmail.com The Advanced Text Processing session from WWDC '11 should be of help.

Re: Cannot DD from an NSTableView

2011-11-14 Thread Koen van der Drift
Yes it is very werid. I am using a custom cell, but its only to change the drawing of the text, nothing else. What I am going to try is to remove the view from IB and put a fresh one in. Maybe some setting in IB got corrupted, that's the only thing I can think of now. - Koen. On Sun, Nov 13,

Re: Natural language

2011-11-14 Thread Eric E. Dolecki
Just started watching this video - it's awesome. - Eric On Mon, Nov 14, 2011 at 3:32 AM, Luca Ciciriello luca_cicirie...@hotmail.com wrote: Thanks Vincent, that should solve my problems. Luca. Subject: Re: Natural language From: mailingli...@satsumac.com Date: Sun, 13 Nov 2011

Re: Natural language

2011-11-14 Thread Luca Ciciriello
Yes, indeed!!! On Nov 14, 2011, at 2:56 PM, Eric E. Dolecki wrote: Just started watching this video - it's awesome. - Eric On Mon, Nov 14, 2011 at 3:32 AM, Luca Ciciriello luca_cicirie...@hotmail.com wrote: Thanks Vincent, that should solve my problems. Luca. Subject: Re:

Witch controls to use to implement an Xcode (4.2) like toolbar view

2011-11-14 Thread DELHAISE Thierry
Hi All, Just wondering if someone have tried to reproduced the small toolbar view (not window) on top of Project source view for example witch allow to select Source Tree View and other kind of Source view. It seems to me that this is some sort of NSSegmentedControl ... Any infos ? Thanks

Variable window size based on screen resolution

2011-11-14 Thread Koen van der Drift
Is there a way to a window open in a size relative to the resolution of the screen? For instance, I am writing an app on a MacBook with a 13 screen. On my screen, the main window is almost the size of the complete screen. What happens if someone on a 21 iMac opens the application? Will the main

Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
Another window size question, just putting it ina another thread. I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6

Re: Variable window size based on screen resolution

2011-11-14 Thread Richard Somers
One way would be to subclass NSWindow and override the designated initializer -initWithContentRect:styleMask:backing:defer: method. In the initializer you could query the screen resolution and set the window frame accordingly. --Richard On Nov 14, 2011, at 8:10 AM, Koen van der Drift wrote:

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Richard Somers
Do something like this. - (void)prepareWindowCollectionBehavior { if (MySystemVersion_10_07_OrLater()) { #ifdef MAC_OS_X_VERSION_10_7 NSWindowCollectionBehavior behavior = [_window collectionBehavior]; behavior = behavior | NSWindowCollectionBehaviorFullScreenPrimary;

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Gideon King
You could do something like this: #ifndef NSAppKitVersionNumber10_6 #define NSAppKitVersionNumber10_6 1038 #endif #ifndef NSWindowCollectionBehaviorFullScreenPrimary #define NSWindowCollectionBehaviorFullScreenPrimary 1 7 #endif if (floor(NSAppKitVersionNumber)

Re: Witch controls to use to implement an Xcode (4.2) like toolbar view

2011-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 2011 à 16:06, DELHAISE Thierry a écrit : Hi All, Just wondering if someone have tried to reproduced the small toolbar view (not window) on top of Project source view for example witch allow to select Source Tree View and other kind of Source view. It seems to me that this is

Re: Natural language

2011-11-14 Thread Douglas Davidson
There is also some documentation available in the Foundation release notes for Lion http://developer.apple.com/library/mac/#releasenotes/Cocoa/Foundation.html and the NSLinguisticTagger class reference

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Kyle Sluder
On Nov 14, 2011, at 7:30 AM, Gideon King gid...@novamind.com wrote: if (floor(NSAppKitVersionNumber) NSAppKitVersionNumber10_6) { This comparison is incorrect. The AppKit version number almost always gets bumped on an OS point release. This comparison will succeed on 10.6.1 and higher.

Re: Calling a Cocoa library from C

2011-11-14 Thread Nathan Sims
The help so far has been very edifying. Now, I go to create a 'Cocoa Library' project in Xcode 3.2.6, and it generates a libaaa.h and a libaaa.m for me. But in the .m file, there's an '@implementation libaaa' line. I'm confused, I thought a Cocoa library was a number of *.o (compiled .m files)

Re: Calling a Cocoa library from C

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 9:47 AM, Nathan Sims wrote: Now, I go to create a 'Cocoa Library' project in Xcode 3.2.6, and it generates a libaaa.h and a libaaa.m for me. But in the .m file, there's an '@implementation libaaa' line. I'm confused, I thought a Cocoa library was a number of *.o

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 7:15 AM, Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6 SDK. I

Re: Calling a Cocoa library from C

2011-11-14 Thread Kyle Sluder
On Nov 14, 2011, at 9:47 AM, Nathan Sims newsli...@autonomy.caltech.edu wrote: The help so far has been very edifying. Now, I go to create a 'Cocoa Library' project in Xcode 3.2.6, and it generates a libaaa.h and a libaaa.m for me. But in the .m file, there's an '@implementation libaaa'

Re: Variable window size based on screen resolution

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 7:18 AM, Richard Somers wrote: One way would be to subclass NSWindow and override the designated initializer -initWithContentRect:styleMask:backing:defer: method. In the initializer you could query the screen resolution and set the window frame accordingly. That seems

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Quincey Morris
On Nov 14, 2011, at 07:15 , Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6 SDK.

Re: Troubles with Bold and Italic fonts - Cocoa

2011-11-14 Thread Jens Alfke
NSFontManager* fontManager = [NSFontManager sharedFontManager]; NSFont* font = [fontManager fontWithFamily:@Helvetica traits:fontStyle weight:5 size:12]; However, the displayed font is not always what I asked. For example, It works with Verdana (I see it bold). But it does not works

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
On Mon, Nov 14, 2011 at 1:20 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Nov 14, 2011, at 07:15 , Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6  I tried adding

Status toolbar item like Xcode and Instruments

2011-11-14 Thread David Catmull
I'm interested in implementing a status display in my toolbar, similar to the LCD-style ones seen in Xcode 4 and Instruments. The challenge seems to be how to make it a full-height item with no label. If I make my custom view taller, it just makes the whole toolbar taller. Setting the label to

Re: Calling a Cocoa library from C

2011-11-14 Thread Nathan Sims
On Nov 14, 2011, at 10:05 AM, Kyle Sluder wrote: The template assumes your library is going to vend Objective-C classes to apps that link against it. On Nov 14, 2011, at 10:01 AM, Jens Alfke wrote: It sounds like you are getting the library and the source files mixed up? It's the

Re: Natural language

2011-11-14 Thread Luca Ciciriello
Thanks. These references are very useful and Your video (session 128) with Jennifer Moore has been really illuminating. Thanks again. Luca. On Nov 14, 2011, at 5:56 PM, Douglas Davidson wrote: There is also some documentation available in the Foundation release notes for Lion

Re: Calling a Cocoa library from C

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 10:53 AM, Nathan Sims wrote: It's the template that threw me. It seems to me (a newb) that Xcode shouldn't provide a template when creating a Cocoa library; it doesn't really make much sense. It assumes you’re starting a new project with no code yet, and gives you an

Re: Calling a Cocoa library from C

2011-11-14 Thread Greg Parker
On Nov 12, 2011, at 2:29 AM, Jean-Daniel Dupas wrote: Le 12 nov. 2011 à 03:34, Charles Srstka a écrit : In this day and age, you should probably just use @autoreleasepool instead of NSAutoreleasePool: int get_float_data(float *result1, float *result2) { @autoreleasepool {

Re: Calling a Cocoa library from C

2011-11-14 Thread Ken Thomases
On Nov 14, 2011, at 1:22 PM, Greg Parker wrote: On Nov 12, 2011, at 2:29 AM, Jean-Daniel Dupas wrote: Le 12 nov. 2011 à 03:34, Charles Srstka a écrit : In this day and age, you should probably just use @autoreleasepool instead of NSAutoreleasePool: int get_float_data(float *result1,

Re: -tableView:accessoryButtonTappedForRowWithIndexPath: Sometimes returns wrong indexPath.row

2011-11-14 Thread Michal L. Wright
Date: Fri, 11 Nov 2011 20:38:29 + From: Luke Hiesterman luket...@apple.com Subject: Re: -tableView:accessoryButtonTappedForRowWithIndexPath: Sometimes returns wrong indexPath.row To: Michal L. Wright m...@raccoonbend.com Cc: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com

New/Update Cocoa Book

2011-11-14 Thread Todd Heberlein
I haven't read it yet, so I can't give you a review. I'm sure many of us have at least one of the previous editions, so I thought I'd give everyone a heads up. Cocoa Programming for Mac OS X (4th Edition) By Aaron Hillegass, Adam Preble http://www.amazon.com/gp/product/0321774086/ Todd

Re: Calling a Cocoa library from C

2011-11-14 Thread Charles Srstka
On Nov 14, 2011, at 1:40 PM, Ken Thomases wrote: But NSAutoreleasePool doesn't drain on an exception, since it doesn't have an explicit scope. Code posted earlier in this thread used @try-@finally to explicitly drain the pool. So, while @autoreleasepool would be equivalent to a naive use

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Gideon King
They have not bumped the appkit version number in 10.6 (see NSApplication.h), and in previous releases, the number was just bumped by a decimal, so the floor() call handles that. As far as I am aware, this comparison should be correct. e.g. #define NSAppKitVersionNumber10_5 949 #define

Re: Cannot DD from an NSTableView

2011-11-14 Thread Graham Cox
On 15/11/2011, at 12:05 AM, Koen van der Drift wrote: I am using a custom cell This is most likely the cause. Try substituting a standard text cell and see if the drag works. If so, you know where to look. Cells are often very tricky in all sorts of subtle ways, and hard to get right.

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Charles Srstka
On Nov 14, 2011, at 11:16 AM, Kyle Sluder wrote: On Nov 14, 2011, at 7:30 AM, Gideon King gid...@novamind.com wrote: if (floor(NSAppKitVersionNumber) NSAppKitVersionNumber10_6) { This comparison is incorrect. The AppKit version number almost always gets bumped on an OS point

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Kyle Sluder
On Mon, Nov 14, 2011 at 1:39 PM, Gideon King gid...@novamind.com wrote: They have not bumped the appkit version number in 10.6 (see NSApplication.h), and in previous releases, the number was just bumped by a decimal, so the floor() call handles that. As far as I am aware, this comparison

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Graham Cox
On 15/11/2011, at 2:15 AM, Koen van der Drift wrote: Another window size question, just putting it ina another thread. I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main

Re: Witch controls to use to implement an Xcode (4.2) like toolbar view

2011-11-14 Thread Fritz Anderson
On 13 Nov 2011, at 11:42 AM, DELHAISE Thierry wrote: Just wondering if someone have tried to reproduced the small toolbar view (not window) on top of Project source view for example witch allow to select Source Tree View and other kind of Source view. It seems to me that this is some sort

Re: Witch controls to use to implement an Xcode (4.2) like toolbar view

2011-11-14 Thread Mike Abdullah
Based on the behaviour in Xcode, they've almost certainly implemented it as an NSMatrix, much like the tabs in iWork Inspectors too. On 14 Nov 2011, at 15:49, Jean-Daniel Dupas wrote: Le 14 nov. 2011 à 16:06, DELHAISE Thierry a écrit : Hi All, Just wondering if someone have tried to

Re: Calling a Cocoa library from C

2011-11-14 Thread Ken Thomases
On Nov 14, 2011, at 3:26 PM, Charles Srstka wrote: On Nov 14, 2011, at 1:40 PM, Ken Thomases wrote: But NSAutoreleasePool doesn't drain on an exception, since it doesn't have an explicit scope. Code posted earlier in this thread used @try-@finally to explicitly drain the pool. So, while

Re: Cannot DD from an NSTableView

2011-11-14 Thread Koen van der Drift
On Nov 14, 2011, at 4:49 PM, Graham Cox wrote: On 15/11/2011, at 12:05 AM, Koen van der Drift wrote: I am using a custom cell This is most likely the cause. Try substituting a standard text cell and see if the drag works. If so, you know where to look. Cells are often very

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
On Nov 14, 2011, at 4:55 PM, Graham Cox wrote: If you are using Xcode 4.x, you can just flag the supports fullscreen in IB and it just works. You get a warning that the feature isn't supported on 10.6 or earlier when the nib is compiled, but it's OK - earlier systems just ignore that

Re: Cannot DD from an NSTableView

2011-11-14 Thread Conrad Shultz
On 11/14/11 3:45 PM, Koen van der Drift wrote: You were right. Implementing the custom cell, even though I only was calling drawFrameRect caused the DD not to work. Are you subclassing NSCell directly or using one of its subclasses? Out of the box, NSTableView (or, rather, NSTableColumn) uses

Re: 2 itunesconnect questions

2011-11-14 Thread Conrad Shultz
On 11/11/11 9:37 PM, Glenn L. Austin wrote: On Nov 11, 2011, at 1:26 PM, Conrad Shultz wrote: On 11/11/11 1:21 PM, Glenn L. Austin wrote: Set your iOS Deployment Target to iOS 4.3 and build ARMv7. I don't think the OP said that the app should be version restricted. Why target 4.3? 4.3

Re: 2 itunesconnect questions

2011-11-14 Thread Conrad Shultz
On 11/11/11 9:50 PM, April wrote: Actually I had a long existing project that I start working on in 4.1 before the release and then 4.2 when I started icloud support up until now. I've hit multiple delays and setbacks due to adding features out of fear of 1 star ratings due to It's useless

Re: Cannot DD from an NSTableView

2011-11-14 Thread Koen van der Drift
On Nov 14, 2011, at 7:15 PM, Conrad Shultz wrote: Are you subclassing NSCell directly or using one of its subclasses? Out of the box, NSTableView (or, rather, NSTableColumn) uses an NSTextFieldCell, which importantly inherits from NSActionCell, which itself adds lots of core functionality

Re: Cannot DD from an NSTableView

2011-11-14 Thread Conrad Shultz
Ah... Have you read the documentation for NSCell's -hitTestForEvent:inRect:ofView: ? In particular the note: If the cell not disabled, and it would track, return NSCellHitContentArea |NSCellHitTrackableArea. I believe that for dragging to work you do NOT want to return

Re: Cannot DD from an NSTableView

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 5:05 PM, Koen van der Drift wrote: I'm indeed subclassing NSCell. Using NSActionCell doesn't make a difference. But with NSTextFieldCell it works. Yeah, generally you will never subclass NSCell (or NSActionCell) directly. I can’t remember ever doing it. Instead you

Re: Cannot DD from an NSTableView

2011-11-14 Thread Koen van der Drift
Good info, thanks. I also noticed that now with using NSTextFieldCell, I get a tooltip for each cell. Which I can use :) - Koen. On Nov 14, 2011, at 8:21 PM, Conrad Shultz wrote: Ah... Have you read the documentation for NSCell's -hitTestForEvent:inRect:ofView: ? In particular the

Re: NSArray, NSDictionary property attribute issue, retain or copy?

2011-11-14 Thread mwalker
I always think of the difference between using copy or retain for a @property as the difference between wanting the *value* or wanting the *object*. For a user's name, for example, you want to name, not the object that contains the name, so use copy. For a mutable string you want to simply

Good ways to debug a deadlock (NSOperationQueue at __spin_lock)?

2011-11-14 Thread Rico
Hi, Occasionally users of my app report that the app hangs and uses a lot of CPU. I received a number of process samples that show a similar pattern: Multiple threads seem to hang at __spin_lock while trying to release an NSImage/CGImage (trace below). Quick summary of what the app does

NSOutlineView doesn't call outlineView:shouldSelectItem: after selectRowIndexes:byExtendingSelection:

2011-11-14 Thread Motti Shneor
Hi Everyone. Hi everyone. We have a source-detail window, in which the source-view uses an NSOutlineView. We implement it in a rather simplistic way because we only have two levels, one of which is constant (constant sections) and several items in each section. We don't use bindings, or an

Please allow me to introduce myself ...

2011-11-14 Thread Marcus Straßmann
... my name is Marcus Strassmann, I am living in Germany and a new subscriber to this list. I started off with programming databases back in 1988, using a Mac and the first Version of 4th Dimension, a DB RAD system. I am relatively new to iOS programming, having started with a crash course in

Re: NSOutlineView doesn't call outlineView:shouldSelectItem: after selectRowIndexes:byExtendingSelection:

2011-11-14 Thread Kyle Sluder
On Mon, Nov 14, 2011 at 6:18 AM, Motti Shneor su...@bezeqint.net wrote: However, if we need to PROGRAMMATICALLY set the selection, using selectRowIndexes:byExtendingSelection: for example,   outlineView:shouldSelectItem: is never called. From Selecting and Deselecting Rows Programmatically in