Re: Conflicting encodings issue in a Cocoa app

2008-04-21 Thread Ewan Delanoy
%c is interpreted at runtime according to the default string encoding for that process. This depends on what the user's preferred language is set to, but for English and most European languages it's MacRoman. That choice makes sense for backward-compatibility reasons, but nowadays it tends

Uneditable NSTableView

2008-04-23 Thread Ewan Delanoy
Hello all, I'm trying to construct a Cocoa app that mimicks the Mail application, with the difference that it's not especially intended for mails : one the upper part a list of titles, and on the lower part exactly one titletext is shown. Double-clicking on a title in the upper part makes

Re: Uneditable NSTableView

2008-04-23 Thread Ewan Delanoy
Perhaps you have a good reason, but from your description, and being used to using Mail, I'd expect the lower part to display the content with a single click. The reason is, I know how to produce easily the double-click behaviour with Cocoa but not the (better) click behaviour Good question

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Ewan Delanoy
I'm not quite sure what you mean by target here The target is the object that your selector message will be sent to. How will your TableView know which object responds to the selector you give it? It's not magic... HTH It did help indeed, and even solved my problem! (it now works

Re: Uneditable NSTableView (SOLVED)

2008-04-23 Thread Ewan Delanoy
Corbinn Dunn wrote I'm not quite sure what you mean by target here The target is the object that your selector message will be sent to. How will your TableView know which object responds to the selector you give it? It's not magic... HTH It did help indeed, and even solved my

PDF manipulation and fine control over page layout in Cocoa

2008-06-17 Thread Ewan Delanoy
Hello all, the usual print machinery (NSPrintOperation) for a Cocoa-based text editor (TextEdit, say) allows one to use a variety of page layouts. Unfortunately, in many cases the only layout available to the user involves a considerable waste of paper space, and this does not seem to be

How to add a -(unsigned long long)unsignedLongLongValue method to NSString

2009-01-10 Thread ewan . Delanoy
Hello all, I have a Cocoa app that performs some computations on large integers (but still in the unsigned long long range), some of which are entered by the user in a NSTextField. The problem , of course, is that NSControl has no -(unsigned long long)unsignedLongLongValue

Re: How to add a -(unsigned long long)unsignedLongLongValue method to NSString

2009-01-10 Thread ewan . Delanoy
Thanks Ken and Steve, for the variety of clean solutions you offered. Just out of curiosity, I should like to return to a point mentioned by Ken : If you must work character-by-character, use character constants (e.g. '0' or '9') In that (unlikely) situation, how would I test, say, equality