Spotlight Importer

2008-02-26 Thread Gerriet M. Denkmann
I have an application (10.4.11) which creates simple text files (utf-8 or utf-16). When I store some document as myNewFile then Spotlight does know nothing about it's content. But when I store the same file as myNewFile.txt then all is fine. Is there a way to tell Spotlight to treat all

Re: Spotlight Importer

2008-02-28 Thread Gerriet M. Denkmann
From: Sean McBride [EMAIL PROTECTED] On 2/26/08 12:45 AM, Quincey Morris said: On Feb 26, 2008, at 00:16, Gerriet M. Denkmann wrote: I have an application (10.4.11) which creates simple text files (utf-8 or utf-16). When I store some document as myNewFile then Spotlight does know nothing

Re: Adding spaces to an NSString

2008-03-19 Thread Gerriet M. Denkmann
On 19 Mar 2008, at 04:55, [EMAIL PROTECTED] wrote: Yes, I have, Are you thinking insertString:atIndex:? So at a basic level, can I get the string length, for loop through each character and after each use insertString to add a space? No. You may remember that if NSString talks of

Ephemeral Changes

2008-03-25 Thread Gerriet M. Denkmann
I have a document based Cocoa editor, which handles simple text files (setRichText: NO). It handles undo and font changes. But the files are just plain text files; no font information gets stored. So I would like that the document does NOT get dirty (isDocumentEdited) if only the font

Re: Ephemeral Changes

2008-03-26 Thread Gerriet M. Denkmann
On 26 Mar 2008, at 04:07, Sherm Pendley wrote: On Tue, Mar 25, 2008 at 10:07 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: On 25 Mar 2008, at 23:12, Graham Cox wrote: There may be a simpler way, but this is what occurred to me when I read this: Subclass NSTextView and override

Re: Ephemeral Changes

2008-03-27 Thread Gerriet M. Denkmann
On 27 Mar 2008, at 14:46, Jens Miltner wrote: Am 27.03.2008 um 11:57 schrieb Gerriet M. Denkmann: On 26 Mar 2008, at 22:56, Graham Cox wrote: The undo manager will directly change the data in the text view using an invocation or target/action - it doesn't go back through changeFont

weak linking

2008-03-29 Thread Gerriet M. Denkmann
I use in some Cocoa app a weak linked library. In some class I do: - (BOO)haveNoLibrary { BOOL noHave1 = weak_function == NULL ; // does NOT work - is always NO void *dummy = weak_function; BOOL noHave2 = dummy == NULL ; // does work - is YES if and only library is

Re: weak linking

2008-03-30 Thread Gerriet M. Denkmann
On 30 Mar 2008, at 01:47, [EMAIL PROTECTED] wrote: I use in some Cocoa app a weak linked library. [...] if (weak_function == NULL) { NSLog(@%s weak_function %p NULL, __FUNCTION__, weak_function ); } else { NSLog(@%s weak_function %p non-NULL, __FUNCTION__, weak_function );

Getting Localized System Strings

2008-04-01 Thread Gerriet M. Denkmann
Cocoa uses (automatically) localized strings. I would like to do the same. E.g. using NSTextView and pasting a font, the Edit menu will suddenly show Undo Paste Font. If the same app is running with German as the preferred language, the Edit menu will contain Undo Schrift einsetzen (yes,

Re: Getting Localized System Strings

2008-04-01 Thread Gerriet M. Denkmann
, but it's not garantee that it remain like that) Anyway, you can probably copy this Undo.strings file in your application. Le 1 avr. 08 à 11:52, Gerriet M. Denkmann a écrit : Cocoa uses (automatically) localized strings. I would like to do the same. E.g. using NSTextView and pasting

Alternating Button

2008-04-01 Thread Gerriet M. Denkmann
The FindPanel in TextEdit has in the bottom left corner a button Replace All which changes to In Selection when the ⌥-key is pressed. How is this done? I want to have such a changing button in some of my own panels. Kind regards, Gerriet. ___

Re: Alternating Button

2008-04-03 Thread Gerriet M. Denkmann
listen for the NSWindowDidUpdateNotification and make the appropriate modifications to your button based on the state of the keyboard. regards, douglas On Apr 1, 2008, at 3:51 PM, Gerriet M. Denkmann wrote: On 1 Apr 2008, at 18:16, Jean-Daniel Dupas wrote: I dont think

Re: Alternating Button

2008-04-04 Thread Gerriet M. Denkmann
/TP3135-DontLinkChapterID_1-DontLinkElementID_20 regards, douglas On Apr 3, 2008, at 4:44 AM, Gerriet M. Denkmann wrote: Llistening at NSWindowDidUpdateNotification (or probably better: NSApplicationWillUpdateNotification) is certainly a good idea. Whenever the modifier keys change

Re: [OFF] unicode characters

2008-04-10 Thread Gerriet M. Denkmann
On 9 Apr 2008, at 21:02, [EMAIL PROTECTED] wrote: Take a look at CFStringTransform(). The details will depend on exactly what you want to do. I just have taken a look at CFStringTransform. kCFStringTransformLatinThai = reversible transform to transliterate text to Thai from Latin. But:

NSValue value:withObjCType:

2008-04-16 Thread Gerriet M. Denkmann
NSValue has two methods: value:withObjCType: and valueWithBytes:objCType: . What is the difference between these two methods? When do I have to use the first, when the second? I am rather confused. Kind regards, Gerriet. ___ Cocoa-dev mailing

Re: NSValue value:withObjCType:

2008-04-17 Thread Gerriet M. Denkmann
On 17 Apr 2008, at 17:56, Keary Suska wrote: on 4/17/08 9:31 AM, [EMAIL PROTECTED] purportedly said: NSValue has two methods: value:withObjCType: and valueWithBytes:objCType: . What is the difference between these two methods? When do I have to use the first, when the second? I am rather

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Gerriet M. Denkmann
On 18 Apr 2008, at 07:18, [EMAIL PROTECTED] wrote: Date: Fri, 18 Apr 2008 00:56:13 -0400 On Apr 18, 2008, at 12:47 AM, Bill Bumgarner wrote: On Apr 17, 2008, at 11:20 PM, Adam P Jenkins wrote: Exactly. And now that the convention of methods returning self no longer exists, it seems like

My private problems

2008-04-20 Thread Gerriet M. Denkmann
I need an absolute path. So I do: NSFileManager *fima = [ NSFileManager defaultManager ]; NSString *fileType = [ [ fima fileAttributesAtPath: path traverseLink: NO ]; fileType ]; if ( [ fileType isEqualToString: NSFileTypeSymbolicLink ] ) path = [ fima

Re: My private problems

2008-04-20 Thread Gerriet M. Denkmann
On 20 Apr 2008, at 10:53, [EMAIL PROTECTED] wrote: On Sun, Apr 20, 2008 at 3:46 AM, stephen joseph butler [EMAIL PROTECTED] wrote: You can do this: [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:[fima pathContentOfSymbolicLinkAtPath :path]]; I think that will

Re: Calculating file size

2008-04-28 Thread Gerriet M. Denkmann
On 28 Apr 2008, at 07:44, [EMAIL PROTECTED] wrote: Others have answered with good suggestions for other APIs, but I will point out for the record that you can do it in Cocoa, too, because the file system has a path-based mechanism in which ..namedfork/rsrc is appended to the path. For

Cocoa and Carbon

2008-05-14 Thread Gerriet M. Denkmann
I always thought that Cocoa is an Objective-C API, which is a more convenient counterpart to the more verbose or more cumbersome C API of Carbon, which often gives more detailed control though. E.g. NSString has stringWithContentsOfFile:usedEncoding:error:, but Carbon has a Text Encoding

NSTextView Font Substitution

2008-05-18 Thread Gerriet M. Denkmann
I have an NSTextView with no Multiple fonts allowed (isRichText = NO). The font is the userFixedPitchFontOfSize: 0 (Monaco 10 pt). But when I insert a THAI CHARACTER SARA E (Unicode 0E40), which has no glyph in Monaco, a replacement font is used. This is Lucida Grande, which is not a

Bindings: Allows Editing Multiple Values Selection

2008-05-19 Thread Gerriet M. Denkmann
I have (in Tiger 10.4.11) a nib with an NSTextField. It's value is bound to myInt in MyObjectController (an NSObjectController) - Controller Key: selection. The content outlet of MyObjectController is connected to the File's Owner, which is of class MyOwner. MyOwer has an instance variabel

Re: Bindings: Allows Editing Multiple Values Selection

2008-05-20 Thread Gerriet M. Denkmann
On 20 May 2008, at 01:50, Ken Thomases wrote: This is an example where the reference documentation doesn't guide you to the relevant conceptual documentation very well. Spotlight shows me also /Developer/ADC Reference Library/ releasenotes/Cocoa/AppKit.html, which mentions this flag with

Re: Localization and plural rules revisited

2008-05-20 Thread Gerriet M. Denkmann
On 20 May 2008, at 23:03, [EMAIL PROTECTED] wrote: On May 20, 2008, at 12:08 PM, Peter Edberg wrote: CLDR (Common Locale Data Repository) has some draft data on plural forms for various languages. See http://unicode.org/cldr/data/charts/supplemental/ language_plural_rules.html for

NSConnection does not close ports

2008-05-22 Thread Gerriet M. Denkmann
I have a server, which does create an NSConnection on some NSSocketPort and publishes this fact via Bonjour. A client opens a connection, sends some messages via Distributed Objects, and closes it again. This implies opening and closing a few file descriptors on sockets. Works fine. Usually.

Re: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)

2008-05-23 Thread Gerriet M. Denkmann
On 23 May 2008, at 01:38, [EMAIL PROTECTED] wrote: On May 22, 2008, at 11:15 AM, Jonathan Hendry wrote: Perhaps a better way of doing this would be a web or WebKit app with two panes. One that shows the Apple docs at Apple's site, and the other pane points to a page at a non-Apple wiki site

Re: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)

2008-05-23 Thread Gerriet M. Denkmann
On 23 May 2008, at 11:49, Ken Thomases wrote: On May 23, 2008, at 3:09 AM, Gerriet M. Denkmann wrote: I do seem to remember that there was something to write files and folders to a CDs using an Objective-C interface. - entered disk into AppKido - nothing except NSURLCache. - entered disk

Change the Language of just one Application

2008-05-24 Thread Gerriet M. Denkmann
Somewhere I have read (if my memory is not faulty) that it is possible to lauch an app with some arguments (or environment variables?) changing the preference order of languages. E.g. my preferred language is English, but I want to test the German localization of some app. Xcode allows

Re: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)

2008-05-25 Thread Gerriet M. Denkmann
On 25 May 2008, at 03:00, Ken Thomases wrote: On May 24, 2008, at 12:36 AM, Gerriet M. Denkmann wrote: On Fri, May 23, 2008 at 9:19 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: So I - entered disc recording into Xcode - Help - Documentation - nothing at all ...answering about

NSMetadataItem attributes

2008-05-28 Thread Gerriet M. Denkmann
I have an NSMetadataItem, which gives me via attributes a list of keywords. But: kMDItemPath is not in this list, although NSString *itemPath = [ item valueForAttribute: (NSString *) kMDItemPath ]; gives a reasonable answer. On the other hand, this aforementioned list of attributes

NSPredicate containing contains

2008-05-28 Thread Gerriet M. Denkmann
NSString *searchString = @SpoD; NSString *predicateFormat = @kMDItemFSName contains %@; NSPredicate *predicate = [ NSPredicate predicateWithFormat: predicateFormat, searchString ]; NSMetadataQuery *query = [[NSMetadataQuery alloc] init]; [ query setPredicate: predicate]; //

Re: NSPredicate containing contains

2008-05-28 Thread Gerriet M. Denkmann
On 29 May 2008, at 02:02, [EMAIL PROTECTED] wrote: 5/28/08 12:10 PM, also sprach [EMAIL PROTECTED]: NSString *searchString = @SpoD; NSString *predicateFormat = @kMDItemFSName contains %@; NSPredicate *predicate = [ NSPredicate predicateWithFormat: predicateFormat, searchString ];

NSPredicate: To be, or not to be

2008-06-01 Thread Gerriet M. Denkmann
When I use an NSMetadataQuery with the NSPredicate kMDItemTextContent LIKE To be, or not to be; it seems to find all documents which contain these words in any order; and as they are kind of common, it finds 23363 files. Not quite what I intended. Actually I am looking for those documents

Re: NSPredicate: To be, or not to be

2008-06-02 Thread Gerriet M. Denkmann
On 2 Jun 2008, at 16:52, [EMAIL PROTECTED] wrote: On Sun, Jun 1, 2008 at 9:10 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: Following your suggestion, I changed my predicateFormat to: @%@ contains kMDItemTextContent which translates into: kMDItemTextContent

Re: NSPredicate: To be, or not to be

2008-06-02 Thread Gerriet M. Denkmann
On 3 Jun 2008, at 03:30, stephen joseph butler wrote: On Mon, Jun 2, 2008 at 11:08 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: Constucting the format properly (copying your suggestion): NSPredicate *predicate = [NSPredicate predicateWithFormat:@%K contains %@, kMDItemTextContent

Re: NSPredicate: To be, or not to be

2008-06-03 Thread Gerriet M. Denkmann
On 3 Jun 2008, at 11:52, [EMAIL PROTECTED] wrote: On Mon, Jun 2, 2008 at 7:37 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: On 3 Jun 2008, at 03:30, stephen joseph butler wrote: I'm sorry. I forget that the Spotlight predicate strings are slightly different from the regular ones

Re: NSPredicate: To be, or not to be

2008-06-03 Thread Gerriet M. Denkmann
On 3 Jun 2008, at 15:33, Hamish Allan wrote: On Tue, Jun 3, 2008 at 1:37 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: This one also works for me. Only it kind of works too well, finding thousands of files. Another example: kMDItemTextContent LIKE Briggel Braggel finds .../Test.txt which

Digital Librarian

2008-06-03 Thread Gerriet M. Denkmann
I am trying to create a Cocoa version of the old NeXT Digital Librarian. To complete it, I would like to have the original icon. Now I am right now about 10 000 km from my own NeXT Cube. Does anybody out there still has a working NeXT and is willing to send me a copy of the Digital Librarian

ArrayController Out of Bounds

2008-06-04 Thread Gerriet M. Denkmann
I have an NSTableView with one column which creates exceptions when sorted. 10.4.11. [ tableColumn infoForBinding: @value ] -- NSObservedKeyPath = arrangedObjects.kMDItemPath; NSObservedObject = NSArrayController: 0x355e70[object class: NSMetadataItem, number of selected objects:

Re: ArrayController Out of Bounds

2008-06-07 Thread Gerriet M. Denkmann
On 4 Jun 2008, at 21:50, Shawn Erickson wrote: On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: When this table contains some rows and I click on the table column header I always get: *** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds (5) where 5

avoid AlertPanel in opening a document

2008-07-19 Thread Gerriet M. Denkmann
In -readFromURL:ofType:error: of a document-based app I make some checks and if something looks suspicious I show an AlertPanel with: Something strange. (Open anyway) (Do not open) If the user clicked on (Do not open) I return NO and set the NSError to nil. But then another panel comes

Re: Unicode names

2008-07-19 Thread Gerriet M. Denkmann
On 19 Jul 2008, at 08:41, Adam R. Maxwell wrote: On Jul 18, 2008, at 5:45 AM, Gerriet M. Denkmann wrote: Is there a way (Cocoa, Carbon or whatsoever) to get the Unicode name of a character? Like: unicodeName( 0x1D110 ) = MUSICAL SYMBOL FERMATA. Sure, I could (at least on 10.4.11) read

Re: avoid AlertPanel in opening a document

2008-07-19 Thread Gerriet M. Denkmann
On Sat, 19 Jul 2008 09:43:57 -0700, Quincey Morris [EMAIL PROTECTED]wrote: On Jul 19, 2008, at 01:58, Gerriet M. Denkmann wrote: In -readFromURL:ofType:error: of a document-based app I make some checks and if something looks suspicious I show an AlertPanel with: Something strange. (Open

reloading an NSTreeController

2008-08-02 Thread Gerriet M. Denkmann
I have myContentArray, bound to the contentArray of an NSTreeController. And an OutlineView which has its columns bound to the same NSTreeController. I do [ myContentArray addObject: someObject ] and this is shown in the OutlineView. Everything works very nicely. -

Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Gerriet M. Denkmann
I have a TableView with DataSource who's columns are set (in IB) to Editable. When the thing gets loaded from its nib I do for its columns: NSTextFieldCell *aCell = [ aTableColumn dataCell ]; [ aCell setEditable: NO ]; [ aCell setSelectable: YES ]; So I have a table with selectable, but not

Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 04:21, Keary Suska [EMAIL PROTECTED] wrote: 8/2/08 7:30 AM, also sprach [EMAIL PROTECTED]: [...] Then I tried to use an NSArrayController instead of the DataSource. But now some evil NSEditorBinder comes and makes my cells editable again. Most annoying! Well, it looks

Re: reloading an NSTreeController

2008-08-02 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them to the previous state? I have the strong feeling that I will have to handle this myself. Ok. So be it. It's

Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-03 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 12:02, Ken Thomases wrote: On Aug 2, 2008, at 10:00 PM, Gerriet M. Denkmann wrote: Well, I looked at the nib again, and the only binding I can see is the value of the TableColumn bound to arrangedObjects.Values of some NSArrayController. What is the setting

Re: reloading an NSTreeController

2008-08-04 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 16:53, Jonathan Dann wrote: On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote: On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them

Colour of Symlink

2008-08-05 Thread Gerriet M. Denkmann
I want to get the colour of a symlink (NOT the colour of the thing the symlinks points at). Is there a Cocoa way to get this? Currently I am using FSPathMakeRef (or CFURLGetFSRef) to get an FSRef, and then FSGetCatalogInfo to get the colour. But both FSPathMakeRef and CFURLGetFSRef seem to

Re: Colour of Symlink

2008-08-05 Thread Gerriet M. Denkmann
On 5 Aug 2008, at 14:37, Jean-Daniel Dupas wrote: Le 5 août 08 à 08:13, Gerriet M. Denkmann a écrit : I want to get the colour of a symlink (NOT the colour of the thing the symlinks points at). Is there a Cocoa way to get this? Currently I am using FSPathMakeRef (or CFURLGetFSRef) to get

How to debug a corrupted stack

2008-08-05 Thread Gerriet M. Denkmann
I have a document based app which works perfectly with -O0 or -O1 but crashes with -O2 or higher. When the crash occurs the debugger comes up and says: Previous frame identical to this frame (corrupt stack?) When I try to step through the function (which is kind of difficult, as the

Re: How to debug a corrupted stack

2008-08-06 Thread Gerriet M. Denkmann
On 6 Aug 2008, at 11:14, Ken Thomases wrote: On Aug 5, 2008, at 9:51 PM, Gerriet M. Denkmann wrote: I have a document based app which works perfectly with -O0 or -O1 but crashes with -O2 or higher. When the crash occurs the debugger comes up and says: Previous frame identical

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 7 Aug 2008, at 01:16, Sean McBride wrote: On 8/6/08 9:51 AM, Gerriet M. Denkmann said: So it is kind of difficult to see where and why the stack gets corrupted. Have you tried 'stack canaries'? http://lists.apple.com/archives/xcode-users/2007/Dec/msg00055.html I have not. Seems

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 6 Aug 2008, at 21:56, Shawn Erickson wrote: On Tue, Aug 5, 2008 at 7:51 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: I have a document based app which works perfectly with -O0 or -O1 but crashes with -O2 or higher. When the crash occurs the debugger comes up and says: Previous frame

Saving Outline View Column Widths

2008-08-07 Thread Gerriet M. Denkmann
I have an OutlineView, which has an Autosave Name set in IB. Works fine. I change a column width, close the document, open another document: the columns are just as they should be. Let's say, I want the first column to be 2 cm wide. Now I click on some disclosure triangle, new rows come up

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 8 Aug 2008, at 01:59, Johannes Fortmann [EMAIL PROTECTED] wrote: The problem here is that UTCDateTime is defined with #pragma pack 2 in effect. That means the compiler packs with an alignment of 2, so the whole structure has 8 bytes. The proper alignment (4) results in 12 bytes. Since

Re: How to debug a corrupted stack

2008-08-07 Thread Gerriet M. Denkmann
On 8 Aug 2008, at 09:04, Sean McBride wrote: Gerriet M. Denkmann ([EMAIL PROTECTED]) on 2008-8-8 9:49 PM said: some_type a; NSValue *data = [ NSValue value: a withObjCType: @encode (some_type) ]; followed by: some_type b; [ data getValue: b ]; is unsafe

Dragging broken symlinks

2008-08-08 Thread Gerriet M. Denkmann
I have an app which can open symlinks (not the thing the symlink points to). Done via [ openPanel setResolvesAliases: NO ]; But when I drag a symlink to the icon of my app in the dock, - (BOOL) application:(NSApplication *)theApplication openFile:(NSString *) filename will have filename =

Re: Dragging broken symlinks

2008-08-09 Thread Gerriet M. Denkmann
On 9 Aug 2008, at 12:27, Ken Thomases wrote: On Aug 8, 2008, at 11:26 PM, Gerriet M. Denkmann wrote: I have an app which can open symlinks (not the thing the symlink points to). Done via [ openPanel setResolvesAliases: NO ]; But when I drag a symlink to the icon of my app in the dock

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
On 9 Aug 2008, at 17:39:20 -0600, Jonathan deWerd [EMAIL PROTECTED]wrote: On Aug 9, 2008, at 4:48 PM, Cate Tony wrote: This code is leaking: - (void)saveItemExtensions:(id)sender { NSMutableString* itemExtensionsFilePath = [NSMutableString

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
On 12 Aug 2008, at 15:50, Negm-Awad Amin wrote: Am Di,12.08.2008 um 10:42 schrieb Gerriet M. Denkmann: On 9 Aug 2008, at 17:39:20 -0600, Jonathan deWerd [EMAIL PROTECTED]wrote: On Aug 9, 2008, at 4:48 PM, Cate Tony wrote: [...] Also, why are you using non-keyed encoding

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
On 12 Aug 2008, at 17:19, Graham Cox wrote: On 12 Aug 2008, at 6:42 pm, Gerriet M. Denkmann wrote: 2. NSKeyedArchiver can only store certain strings (tested in 10.4.11), which makes it absolutely unusable for the storage of strings if the possible values are not known in advance. Eh

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
one say: germanilly challenged ?) list-members). Herzliche Grüße aus Bangkok Gerriet. A: Yes. | Q: Are you sure? | | A: Because it reverses the logical flow of conversation. | | | Q: Why is top posting frowned upon? Amin Am Di,12.08.2008 um 12:25 schrieb Gerriet M. Denkmann: On 12

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
On 12 Aug 2008, at 18:05, Graham Cox wrote: On 12 Aug 2008, at 8:40 pm, Gerriet M. Denkmann wrote: I'm sure if it weren't someone would have raised merry hell about it before now. Something's fishy... Reminds of a very rational being walking the streets with his son. The son: Hey dad

Re: I don't understand why this is leaking...

2008-08-12 Thread Gerriet M. Denkmann
On 13 Aug 2008, at 00:05, Jason Coco wrote: On Aug 12, 2008, at 12:50 , Klaus Backert wrote: About $Null: It it were a reserved word, it would be documented so. The Archives and Serializations Programming Guide for Cocoa says: Keyed Archives ... Naming Values ... You should avoid

NSAppleScript shies away from porcupines

2008-08-26 Thread Gerriet M. Denkmann
I want to open some file: source = tell application SomeApp open POSIX file /Volumes/เม่น/some/file as alias activate end tell NSAppleScript *aa = [ [ NSAppleScript alloc ] initWithSource: source ] ; NSDictionary *errorInfo = nil ; NSAppleEventDescriptor *awe = [ aa

Re: NSAppleScript shies away from porcupines

2008-08-26 Thread Gerriet M. Denkmann
On 26 Aug 2008, at 15:04, Andrew Farmer wrote: On 26 Aug 08, at 00:39, Gerriet M. Denkmann wrote: I want to open some file: source = tell application SomeApp... You're making things harder than they need to be. [[NSWorkspace sharedWorkspace] openFile:@/path/to/file withApplication

Re: NSAppleScript shies away from porcupines

2008-08-26 Thread Gerriet M. Denkmann
On 26 Aug 2008, at 20:58, Jason Coco wrote: On Aug 26, 2008, at 04:19 , Gerriet M. Denkmann wrote: On 26 Aug 2008, at 15:04, Andrew Farmer wrote: On 26 Aug 08, at 00:39, Gerriet M. Denkmann wrote: I want to open some file: source = tell application SomeApp... You're making things

Re: NSAppleScript shies away from porcupines

2008-08-26 Thread Gerriet M. Denkmann
On 27 Aug 2008, at 02:09, has wrote: Gerriet M. Denkmann wrote: When I try in Script Editor: set macpath to POSIX file /Volumes/เม่น/Users as Unicode text and do Compile, then this gets transformed into: set macpath to file ‘ßÀÏ:Volumes:‡¡Ëπ:Users as Unicode text Sounds like

Deep Recursion

2008-08-27 Thread Gerriet M. Denkmann
Yesterday I did some nice recursive programming - the only problem was: I did not intend to do so. As a consequence, there was no defined end to the recursion, which made it essentially infinite. Well, memory - specifially stack space - is not infinite, so eventually I got an EXEC_BAD_ADDR

CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
// this shows the application default icon if CFBundleIconFile = heiß // works ok for CFBundleIconFile = hot - (IBAction)iconForFileN: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSString *bundlePath = [ mainBundle bundlePath ]; NSImage *image = [ [

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
On 28 Aug 2008, at 14:37, Michael Nickerson wrote: On Aug 28, 2008, at 2:15 AM, Gerriet M. Denkmann wrote: // this always works, regardless of name: - (IBAction)ImageNameD: sender; { NSBundle *mainBundle = [ NSBundle mainBundle ]; NSDictionary *infoDictionary

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
On 28 Aug 2008, at 22:10, Shawn Erickson wrote: On Thu, Aug 28, 2008 at 5:38 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: But, another problem: when I run my app with CFBundleIconFile = heiß the picture in the dock is just the default app icon. What encoding is being used for your

Re: CFBundleIconFile: heiß or hot?

2008-08-28 Thread Gerriet M. Denkmann
On 29 Aug 2008, at 04:11, Jean-Daniel Dupas wrote: Le 28 août 08 à 23:00, Kyle Sluder a écrit : On Thu, Aug 28, 2008 at 12:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: It starts with: ?xml version=1.0 encoding=UTF-8? Just because it *says* it's encoded in UTF-8 doesn't mean

Re: File Extensions Problem

2008-08-28 Thread Gerriet M. Denkmann
On 28 Aug 2008 11:52:46 -0400, Michael Ash [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 6:59 PM, R.L. Grigg [EMAIL PROTECTED] wrote: Hmm, I guess the wrinkle in this particular case is if the contract doesnt specify something that the programmer assumes to be safe to do (like

Busy doing nothing

2008-08-29 Thread Gerriet M. Denkmann
I have an app which does not take any Cpu-time when it is doing nothing. So what? you might say. Every app does this. Well, not quite. If I add these magic lines it will use 0.2% of my Cpu just doing nothing: NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init]; [ query

Re: Busy doing nothing

2008-08-29 Thread Gerriet M. Denkmann
On 29 Aug 2008, at 20:57, Phil wrote: On Fri, Aug 29, 2008 at 9:42 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: If I add these magic lines it will use 0.2% of my Cpu just doing nothing: NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init]; [ query startQuery

Re: File Extensions Problem

2008-08-29 Thread Gerriet M. Denkmann
On Fri, 29 Aug 2008 12:13:34 -0400, Michael Ash [EMAIL PROTECTED] wrote: On Thu, Aug 28, 2008 at 9:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: While if fully agree with you about valid assumptions and so, I am still wondering what is the disadvantage of forgetting about

What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
For an ordinary window one can set in IB Auto Save Name: and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine. But if this window is a document, controlled by some NSDocumentController, this Auto Save Name seems to be ingnored

Re: What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
On 4 Sep 2008, at 15:48, Ken Thomases wrote: On Sep 4, 2008, at 3:10 AM, Gerriet M. Denkmann wrote: For an ordinary window one can set in IB Auto Save Name: and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine

Re: What Size My Window?

2008-09-04 Thread Gerriet M. Denkmann
On 4 Sep 2008, at 15:49, Uli Kusterer wrote: On 04.09.2008, at 10:10, Gerriet M. Denkmann wrote: 6. Other? So: is there some commonly agreed upon right strategy? Are there some official guidelines for document window sizes? You can save the size of your window in some plist in your

Setting the attributeModDate

2008-09-15 Thread Gerriet M. Denkmann
I am trying to copy a file using NSFilemanagers copyPath:toPath:handler: method. The (Tiger) documentation says: File or directory attributes—that is, metadata such as owner and group numbers, file permissions, and modification date—are also copied. Well, the attributeModDate is not. So

Re: How to count composed characters in NSString?

2008-09-28 Thread Gerriet M. Denkmann
On Sun, 28 Sep 2008 03:27:48 -0500, Michael Gardner [EMAIL PROTECTED] wrote: On Sep 27, 2008, at 2:23 PM, David Niemeijer wrote: Hi, I have been trying to find this in the documentation and list archives but without success so far. What is the best way to count the number of characters in

Binding to displayName

2008-10-05 Thread Gerriet M. Denkmann
In a document based Tiger (10.4.11) app I have an Inspector.nib which has an NSObjectController with content = current MyDocument. It has an NSTextField (not editable) with value bound to selection.displayName When the Inspector gets loaded I get: ... KVO autonotifying only supports

Binding to @count

2008-10-05 Thread Gerriet M. Denkmann
In a document based Tiger (10.4.11) app I have @interface MyDocument : NSDocument { NSMutableArray *things; } Inspector.nib has an NSObjectController with content = current MyDocument and an NSTextField with value bound to [EMAIL PROTECTED] When the Inspector gets loaded I get:

Cocoa and C99

2008-10-06 Thread Gerriet M. Denkmann
In the old days I wrote: int i; float f; for( i = 0, f = 0.0; i 5; i++, f+= 3.5 ) . Now I am trying to use the C99 style: for( int i = 0, float f = 0.0; i 5; i++, f+= 3.5 ) . But I am told: parse error before 'float'. Then I tried: float f; for( int i = 0, f = 0.0; i 3; i++, f +=

Re: comparing Strings.

2008-10-07 Thread Gerriet M. Denkmann
On 7 Oct 2008, at 09:20, cGraham Cox [EMAIL PROTECTED] wrote: On 7 Oct 2008, at 4:22 pm, Sandro Noel wrote: i'm having a problem comparing some type of strings, for example the one giving me a problem right now. is let's say in my database i have 4 version of the same string . sandro's

Re: Where is close/cancel icon used in search field Safari etc.

2008-10-09 Thread Gerriet M. Denkmann
On 8 Oct 2008, at 19:49, Randall Meadows [EMAIL PROTECTED] wrote: On Oct 8, 2008, at 10:24 AM, David wrote: Hello, I'd like to have a button that looks like the close or cancel icon that is often present in Cocoa applications, but I can't find the icon. I'm surprised it doesn't show up as a

Not so long filenames

2008-10-14 Thread Gerriet M. Denkmann
HFS+ and Finder can use filenames which use in Utf-16 up to 255 shorts. But in the program below there seems to exist some other limit (at least on 10.4.11 Tiger). Where is this documented? Or what am I doing wong? #import Cocoa/Cocoa.h int main (int argc, const char * argv[]) {

Re: Not so long filenames

2008-10-14 Thread Gerriet M. Denkmann
On 14 Oct 2008, at 18:07, Jason Coco wrote: On Oct 14, 2008, at 11:28 , Gerriet M. Denkmann wrote: HFS+ and Finder can use filenames which use in Utf-16 up to 255 shorts. But in the program below there seems to exist some other limit (at least on 10.4.11 Tiger). Where

Re: Not so long filenames

2008-10-15 Thread Gerriet M. Denkmann
On 14 Oct 2008, at 23:43, Sean McBride wrote: On 10/14/08 5:28 PM, Gerriet M. Denkmann said: But in the program below there seems to exist some other limit (at least on 10.4.11 Tiger). Where is this documented? Or what am I doing wong? #import Cocoa/Cocoa.h int main (int argc, const char

Re: Not so long filenames

2008-10-15 Thread Gerriet M. Denkmann
On 15 Oct 2008, at 03:32, Chris Suter wrote: On Wed, Oct 15, 2008 at 7:00 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: So again my question: why it is too long in this context and where is this documented? This looks like a bug in the kernel code. It looks like it checks the UTF8

Length of a filename

2008-10-16 Thread Gerriet M. Denkmann
How can I check the appositeness of a filename? This will not work: if ( [potentialPath length] 255 ) ... error: filename too long because HFS+ uses some decomposed form. This might work: if ( [[ NSString stringWithUTF8String: [potentialPath fileSystemRepresentation] ] length] 255 ) ...

Re: Length of a filename

2008-10-16 Thread Gerriet M. Denkmann
On 16 Oct 2008, at 16:18, Jean-Daniel Dupas wrote: Le 16 oct. 08 à 11:31, Gerriet M. Denkmann a écrit : How can I check the appositeness of a filename? This will not work: if ( [potentialPath length] 255 ) ... error: filename too long because HFS+ uses some decomposed form. This might

Minimizing Sheets

2008-10-17 Thread Gerriet M. Denkmann
I have an app which overrides -[NSWindow miniaturize:] in a category (to avoid crowding the dock). Works perfectly, but... If this window being minimized has a sheet attached (attachedSheet is non-nil) this will be lost on deminiaturizing. But the modal loop is still running, waiting for

Re: Minimizing Sheets

2008-10-17 Thread Gerriet M. Denkmann
On 17 Oct 2008, at 15:57, Jason Coco wrote: On Oct 17, 2008, at 06:03 , Gerriet M. Denkmann wrote: I have an app which overrides -[NSWindow miniaturize:] in a category (to avoid crowding the dock). Works perfectly, but... If this window being minimized has a sheet attached

Re: Not so long filenames

2008-10-26 Thread Gerriet M. Denkmann
On 26 Oct 2008, at 00:30, Postmaster wrote: On 14 Oct 2008, at 21:00, Gerriet M. Denkmann wrote: On 14 Oct 2008, at 18:07, Jason Coco wrote: On Oct 14, 2008, at 11:28 , Gerriet M. Denkmann wrote: HFS+ and Finder can use filenames which use in Utf-16 up to 255 shorts

Re: Not so long filenames

2008-10-28 Thread Gerriet M. Denkmann
On 28 Oct 2008, at 01:39, Jeremy Pereira wrote: On 26 Oct 2008, at 09:55, Gerriet M. Denkmann wrote: On 26 Oct 2008, at 00:30, Postmaster wrote: On 14 Oct 2008, at 21:00, Gerriet M. Denkmann wrote: On 14 Oct 2008, at 18:07, Jason Coco wrote: On Oct 14, 2008, at 11:28 , Gerriet M

  1   2   3   4   5   6   7   8   9   10   >