Document Attributes into Pdf

2009-09-16 Thread Gerriet M. Denkmann
I read some text via: NSTextStorage *textStorage = [textView textStorage]; NSDictionary *documentAttributes; BOOL ok = [textStorage readFromURL:url options:nil documentAttributes: & documentAttributes error: NULL]; Then I print it like this: NSPrintInfo *printInfo = [ self printInfo

Re: Printing with Snow Leopard

2009-09-12 Thread Gerriet M. Denkmann
Apple framework. Please include an isolated test case, if possible (that will greatly speed up investigation into the issue, especially if it is a recent regression). Bug ID# 7218833. thanks, corbin On Sep 10, 2009, at 10:54 PM, Gerriet M. Denkmann wrote: An app which ran without probl

Printing with Snow Leopard

2009-09-10 Thread Gerriet M. Denkmann
An app which ran without problems on Leopard likes to crash on Snow Leopard (10.6.1) (both in i386 and x86_64). How to crash: print several times; might crash the first time, might crash the seventh time, but crash it will. The backtrace and the location of the crash varies wildly. In almos

Snow Leopard Documentation in Spotlight

2009-09-08 Thread Gerriet M. Denkmann
Has anybody succeeded in finding information from /Developer/ Documentation/DocSets in Spotlight? E.g. "NSBlockOperation" gives two references in Spotlight, none of which come from the documentation. I know that Xcode →Help → Developer Documentation can be used by humans. But I want to sea

Re: Symbolic Links in Snow Leopard

2009-09-06 Thread Gerriet M. Denkmann
On 7 Sep 2009, at 06:53, Greg Guerin wrote: Gerriet M. Denkmann wrote: This is the directory used (/Volumes/à’•à¸¡à’√à¸˙/ Users/gerriet/ Downloads): -rw-r--r--@ 1 gerriet staff 36 6 Sep 19:30 abc -rw-r--r--@ 1 gerriet staff 47908 6 Sep 19:37 abc alias lrwxr-xr-x 1 gerriet staff 3 4 Sep 21

bookmarkDataWithContentsOfURL crashes

2009-09-06 Thread Gerriet M. Denkmann
This code: NSString *patx = @"/Volumes/เม่น/Users/gerriet/Downloads/abc alias"; <--- this really is an alias, created in Finder. NSURL *u2a = [ NSURL fileURLWithPath: patx ]; NSLog(@"%s will call bookmarkDataWithContentsOfURL",__FUNCTION__); // the next line will create "malloc: *** error for

Symbolic Links in Snow Leopard

2009-09-06 Thread Gerriet M. Denkmann
I am trying to replace the deprecated fileSystemAttributesAtPath: 1. Although Kyle Sluder stated: The header file describes the correct behavior. The current behavior is the only one that makes sense. I am a bit troubled by the documentation stating that "This behavior may change in a future

Re: Services Menu in Snow Leopard

2009-09-05 Thread Gerriet M. Denkmann
On 5 Sep 2009, at 17:08, Jean-Daniel Dupas wrote: Le 5 sept. 2009 à 06:26, Gerriet M. Denkmann a écrit : I have an app which provides info about files, folders, symlinks, etc. In Leopard the Services Menu of e.g. Finder did show my "Get Information" regardless whether a file o

Re: Services Menu in Snow Leopard

2009-09-05 Thread Gerriet M. Denkmann
On 5 Sep 2009, at 11:42, Kyle Sluder wrote: On Sep 4, 2009, at 9:26 PM, "Gerriet M. Denkmann" > wrote: But, as I said, it IS working for files - only folders don't work. You need to declare that your service is valid in a UTI context that covers all your needs. P

Services Menu in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
I have an app which provides info about files, folders, symlinks, etc. In Leopard the Services Menu of e.g. Finder did show my "Get Information" regardless whether a file or a folder was selected. In Snow Leopard the Services Menu of Finder is empty whenever a folder is selected (files and

Re: defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
On 5 Sep 2009, at 00:24, Tim Murison wrote: On 04/09/09 10:38 AM, "Gerriet M. Denkmann" wrote: But it fails to mention, what I should use instead. Any ideas? Take a look at serviceConnectionWIthName:rootObject:, new in 10.5. Thank you! This looks much more appropiat

defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann
Snow Leopard tells me about defaultConnection (NSConnection): Returns the default NSConnection object for the current thread. (Deprecated in Mac OS X v10.6.) But it fails to mention, what I should use instead. Any ideas? Kind regards, Gerriet. ___

NSMetadataQuery for Documentation in Snow Leopard

2009-09-03 Thread Gerriet M. Denkmann
I have an app which uses NSMetadataQuery to get information. NSString * searchString = @"NSDate"; NSString *predicateFormatContent = @"kMDItemTextContent like %@"; NSPredicate *predicate = [ NSPredicate predicateWithFormat: predicateFormat, searchString ]; [ query setPredicate: predicate]; NS

Input Managers in Snow Leopard

2009-09-03 Thread Gerriet M. Denkmann
I heard some rumors that Input Managers do no longer work on Snow Leopard. So I asked Xcode 3.2 for "Input Managers" and got lots of documents which contain the words "input" and "manager" but found no information about "Input Managers". If this rumor is indeed true: what is a recommended

Re: Objective C Compiler Settings

2009-06-28 Thread Gerriet M. Denkmann
On 29 Jun 2009, at 07:10, Graham Cox wrote: On 29/06/2009, at 9:18 AM, Michael Ash wrote: On Sun, Jun 28, 2009 at 4:12 PM, Tommy Nordgren wrote: Are there any compiler flags you can provide when compiling Objective C code, that causes an exception to be triggered when a category implements

Re: Approaches for this Matching Problem?

2009-06-22 Thread Gerriet M. Denkmann
On 22 Jun 2009, at 11:41, Chris Suter wrote: On Mon, Jun 22, 2009 at 6:10 PM, Steve Cronin wrote: But what is the right solution?? For finding word boundaries, I think you're supposed to use NSAttributedString's nextWordFromIndex:forward: and doubleClickAtIndex: methods. There also is C

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 15:21, Bill Monk wrote: On Jun 12, 2009, at 5:43 AM, "Gerriet M. Denkmann" wrote: StringPtr c = (void *)response; NSUInteger cle = *c; char *cu = malloc( cle + 1); memcpy( cu, c + 1, cle);

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 09:08, Tito Ciuro wrote: Hi Arun, How about -[NSProcessInfo hostname]? Check the following document for more info: I just added this to my code: NSProcessInfo *pi = [ [ NSProcessInfo alloc ] init ]; NSString *d = [ pi hostName ];

Re: API for fetching the computer name in cocoa

2009-06-12 Thread Gerriet M. Denkmann
On 12 Jun 2009, at 08:58, Graham Cox wrote: On 12/06/2009, at 4:24 PM, Gerriet M. Denkmann wrote: On 11 Jun 2009, at 18:55, Graham Cox wrote: On 12/06/2009, at 2:08 AM, Arun wrote: Hi All, Is there any API in cocoa which can be used to fetch computer name which is getting displayed

Re: API for fetching the computer name in cocoa

2009-06-11 Thread Gerriet M. Denkmann
On 11 Jun 2009, at 18:55, Graham Cox wrote: On 12/06/2009, at 2:08 AM, Arun wrote: Hi All, Is there any API in cocoa which can be used to fetch computer name which is getting displayed in Finder? I'm not sure if there's a better way, but you can use the Gestalt function with the gestaltUs

Re: Resolution Independent View?

2009-05-13 Thread Gerriet M. Denkmann
On 13 May 2009, at 10:28, Chunk 1978 wrote: i suppose i could still try to do what i'm attempting by being slightly larger, but were your results on different screens drastically different in most cases? iBook (1024 x 768): CGDisplayScreenSize says: 250 x 180. My doctored numbers: 245.48352

Re: Resolution Independent View?

2009-05-13 Thread Gerriet M. Denkmann
On 12 May 2009, at 16:33, Alastair Houghton > wrote: If, however, you really want the display to physically show a 5cm x 5cm block, you can obtain the screen's actual dimensions in millimeters from CGDisplayScreenSize() and then use those numbers in conjunction with the pixel dimensions to calc

Re: Minimize All - sends what?

2009-05-05 Thread Gerriet M. Denkmann
On 6 May 2009, at 11:41, Graham Cox wrote: On 06/05/2009, at 11:01 AM, Gerriet M. Denkmann wrote: But what is called when I Option-click Window -> Minimize (the Menu Item changes to "Minimize All")? I cannot find any information in Interface Builder. And see no obvious method

Minimize All - sends what?

2009-05-05 Thread Gerriet M. Denkmann
In a Cocoa app when I click Window -> Minimize -[NSWindow performMiniaturize:] is called, which then calls -[NSWindow miniaturize:]. When I click the yellow button of a window, -[NSWindow miniaturize:] is called directly. Seen and checked in Debugger. But what is called when I Option-cl

NSMetadataQuery and /usr/local

2009-05-04 Thread Gerriet M. Denkmann
In a Cocoa app of mine I do use NSMetadataQuery with and setSearchScopes: {some array including "/usr/local/include"). I know that two files in my /usr/local/include do contain the string "u_versionToString". Nothing is found. Probably because Spotlight in it's infinite wisdom did dec

Re: parsing a string into words

2009-04-25 Thread Gerriet M. Denkmann
On 26 Apr 2009, at 02:09, Aki Inoue wrote: In AppKit land, -[NSAttributedString doubleClickAtIndex:] would help you. Thanks a lot! I tested all three methods and found that: 1. NSTextView takes about 900 μsec to parse a Thai sentence into 17 words. 2. NSAttributedString took only 530 μs

Re: parsing a string into words

2009-04-25 Thread Gerriet M. Denkmann
On 25 Apr 2009, at 09:21, Michael Ash wrote: On Fri, Apr 24, 2009 at 9:24 PM, Gerriet M. Denkmann wrote: I want to parse a string into words. Currently I do: NSString *theString = NSUInteger stringLength = [ theString length ]; NATextView *theTextView = [[NSTextView alloc

parsing a string into words

2009-04-24 Thread Gerriet M. Denkmann
I want to parse a string into words. Currently I do: NSString *theString = NSUInteger stringLength = [ theString length ]; NATextView *theTextView = [[NSTextView alloc] initWithFrame: NSMakeRect(0,0,99,99) ]; [ theTextView setString: theString ]; for( NSUInteger t = 0; t < stringLength;

Re: NSSearchField and Thai

2009-04-23 Thread Gerriet M. Denkmann
On 23 Apr 2009, at 15:14, David Allouch wrote: For example. Take a cocoa app (I just tried with Camino). After adding "Thai" in the international system preferences, i select Thai from the input menu. I go to the "Google" NSSearchField of camino and type "oh" which appear in Thai. Then pre

Thai in Dictionary.app

2009-04-21 Thread Gerriet M. Denkmann
When I enter: THAI CHARACTER KHO KHWAI, SARA UU, MAI EK I get the same words shown as with: KHO KHWAI, MAI EK, SARA UU. This is a very good feature. But when I enter: KHO KHAI, SARA II, MAI EK I get only those keys which have these letters in exactly this order. Why? Bug or feature? Is there

Re: Select Object in NSDictionaryController

2009-04-20 Thread Gerriet M. Denkmann
On 20 Apr 2009, at 23:05, Keary Suska wrote: On Apr 19, 2009, at 1:29 AM, Gerriet M. Denkmann wrote: I have a table with two columns, labeled "Key" and "Value" bound to myDictionaryController.key and myDictionaryController.value. Now I want to select a row p

Select Object in NSDictionaryController

2009-04-19 Thread Gerriet M. Denkmann
I have a table with two columns, labeled "Key" and "Value" bound to myDictionaryController.key and myDictionaryController.value. Now I want to select a row programmatically (e.g. [ myDictionaryController selectRowWIthKey: @"someKey" ]; ). But such a method I cannot find. And trying to use t

Re: Table with all Key-Value Pairs

2009-04-16 Thread Gerriet M. Denkmann
On 15 Apr 2009, at 19:44, Volker in Lists wrote: You may want to download an example from Apple ;-) : http://developer.apple.com/samplecode/DictionaryController/index.html Thanks for this link. It did help me a lot. One problem though: If I bind the content of my dictionary controller to

Re: localizedCompare: with Thai

2009-04-15 Thread Gerriet M. Denkmann
k "KO KHAI, SARA II, MAI EK" = "KO KHAI, MAI EK, SARA II" ? Or does it follow some rule like: "The order of consecutive Nonspacing_Marks does not matter" ? Kind regards Gerriet Deborah Goldsmith Apple Inc. golds...@apple.com On Apr 15, 2009, at 12:13 AM, Gerri

Table with all Key-Value Pairs

2009-04-15 Thread Gerriet M. Denkmann
I have "My Array Controller" which displays it's items (NSDictionaries) in an NSTableView. So far so good. But now I want to have another NSTableView which has two columns "Key" and "Value" and which shows all Key-Value-pairs of "My Array Controller".selection (or "My Array Controller".sel

localizedCompare: with Thai

2009-04-15 Thread Gerriet M. Denkmann
This is the logical order of the Thai word for "low": THAI CHARACTER TO TAO, THAI CHARACTER MAI EK, THAI CHARACTER SARA AM and this is the order usually used in writing (bottom to top): THAI CHARACTER TO TAO, THAI CHARACTER SARA AM, THAI CHARACTER MAI EK. Both strings look (at least in 10.5.6) i

Re: Undocumented flags in LSCopyItemInfoForRef

2009-04-10 Thread Gerriet M. Denkmann
On 10 Apr 2009, at 15:25, Jean-Daniel Dupas wrote: Le 10 avr. 09 à 10:13, Gerriet M. Denkmann a écrit : On 10 Apr 2009, at 14:10, Jean-Daniel Dupas wrote: Le 10 avr. 09 à 07:06, Gerriet M. Denkmann a écrit : LSItemInfoFlags, returned by LSCopyItemInfoForRef() when the queried item is

Re: Undocumented flags in LSCopyItemInfoForRef

2009-04-10 Thread Gerriet M. Denkmann
On 10 Apr 2009, at 14:10, Jean-Daniel Dupas wrote: Le 10 avr. 09 à 07:06, Gerriet M. Denkmann a écrit : LSItemInfoFlags, returned by LSCopyItemInfoForRef() when the queried item is an application, contains several undocumented flags (i.e. flags which are NOT documented in LSInfo.h nor in

Undocumented flags in LSCopyItemInfoForRef

2009-04-09 Thread Gerriet M. Denkmann
LSItemInfoFlags, returned by LSCopyItemInfoForRef() when the queried item is an application, contains several undocumented flags (i.e. flags which are NOT documented in LSInfo.h nor in the Launch Services Reference). E.g. iTunes.app has (among well documented flags) also: 0x6804000. Wher

Re: finder file size

2009-04-08 Thread Gerriet M. Denkmann
On 9 Apr 2009, at 02:03, "Sean McBride" wrote: On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and since I'm just learning Cocoa I was trying to avoid it if I could. But if it's

asl_search abysmally slow

2009-03-20 Thread Gerriet M. Denkmann
I am trying to access the Apple System Log facility. char *lastMessageId = "765123"; aslmsg q = asl_new(ASL_TYPE_QUERY); asl_set_query(q, kAslMessageId, lastMessageId, ASL_QUERY_OP_GREATER | ASL_QUERY_OP_NUMERIC ); aslresponse r = asl_search( NULL, q); // r will contain all messages after 7

Re: Messages between Threads

2009-03-15 Thread Gerriet M. Denkmann
On 15 Mar 2009, at 15:43, Joar Wingfors wrote: On 15 mar 2009, at 01.14, Paul Sanders wrote: I was referring to where the OP said: "but would it be safe, given the fact that sum and count are bound to some textFields / progressIndicator" And presumably it would not be as the instance var

Messages between Threads

2009-03-14 Thread Gerriet M. Denkmann
I have a Main object which has: - (void)add2Number: (NSNumber *)n; { self.sum += [ n intValue ];;// bound to TextField self.count++; // bound to TextField and ProgressIndicator } The UserInterface has a Start/Stop button which does (on St

Re: User In-Activity hook? And a request

2009-03-09 Thread Gerriet M. Denkmann
On 6 Mar 2009, at 02:24, Shawn Erickson wrote: On Thu, Mar 5, 2009 at 8:58 AM, m wrote: For the archives, the blog Torsten linked to had this bit of code: double CGSSecondsSinceLastInputEvent(long evType); double idleTime = CGSSecondsSinceLastInputEvent(-1); You should note that those are

NSUserCancelledError and the Dock

2009-02-23 Thread Gerriet M. Denkmann
I have a document based Cocoa app which uses: - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError This app checks the content of "absoluteURL" and if this content is not nice, shows a Panel: "Content of ... is not nice. Cancel - Open Anyway. When

Application Activation

2009-02-22 Thread Gerriet M. Denkmann
There are two ways an app can become active: 1. by explicit user action (clicking in Finder, clicking in Dock, using Command-Tab) or: 2. without user action (frontmost app is closed or hidden, so the next app becomes active). I would like to perform some action (like displaying an NSOpenPan

Distributed Objects on Leopard

2009-02-20 Thread Gerriet M. Denkmann
My Cocoa app communicates with a worker thread via NSConnection. The main thread does: - (IBAction)getNext:(id)sender; { (void)sender; NiceThing *new = [ theWorker anotherNiceThing: niceThing ]; [ self setValue: new forKey: @"niceThing" ]; } And the worker thread does:

Re: display unicode string one character at a time, not at simple as it seems

2009-02-18 Thread Gerriet M. Denkmann
On 18 Feb 2009, at 14:18, mathew davis wrote: ideally I'd like to break the string in to: the smallest possible segments which do not need to horizontally overlap when displayed in order to make sense to a reader. so the composed character sequence: g̈ U+006

Profiling with Shark

2009-02-15 Thread Gerriet M. Denkmann
There has been a repeated advise to use Shark.app to measure before optimisation. So I decided to follow this advise. Started my app, then started Shark and selected my app, hit Start, did something in my app, hit Stop. Got an impressive display which consisted (almost exclusively) of cal

64 bit problem with Spotlighter

2009-02-09 Thread Gerriet M. Denkmann
I just build /Developer/Examples/AppKit/Spotlighter. Works fine in 32 bit mode. Then I tried "32/64-bit Universal", but now the "Grouped Results" are always empty. So: is there a bug in Apple's code? Or are some 64 bit libraries broken? And what can I do to get this working in 64-bit? Kind

Re: CGFloat and 64 Bit

2009-02-09 Thread Gerriet M. Denkmann
On 9 Feb 2009, at 12:43, Rob Keniger wrote: On 08/02/2009, at 9:52 PM, Gerriet M. Denkmann wrote: When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2

CGFloat and 64 Bit

2009-02-08 Thread Gerriet M. Denkmann
When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4); Is this the only and correct way to use NSMakeSize() ? Looks kind of ugly. A somehow related q

Thai Dictionary

2009-01-30 Thread Gerriet M. Denkmann
I have just made a Thai-Englisch Dictionary, based on stardict- lexitron-te-2.4.2.tar.bz2 from . But when I enter: ผล I get a list of 79 words, which are not in alphabetic order at all. Not even odered via compare: much less the correct

Finding Thai Words

2009-01-30 Thread Gerriet M. Denkmann
The logical order for Thai words is: consonant, tone mark, vowel. But if one writes with a pen, one almost always writes: consonant, SARA I, MAI EK - because this is a natural order from bottom to top. The good thing is: the find in NSString (without NSLiteralSearch) does not care about the

Re: Not Resolving Aliases

2009-01-26 Thread Gerriet M. Denkmann
On 27 Jan 2009, at 11:05, Scott Ribe wrote: I have given up on NSWorkspace, LaunchServices and now send the path via Distributed Objects. Hey, that surprises me ;-) Give what you said, my next attempt would have been constructing an open Apple Event... (Don't know if it would work, because

Re: Not Resolving Aliases

2009-01-26 Thread Gerriet M. Denkmann
On 27 Jan 2009, at 07:39, Scott Ribe wrote: What are you actually trying to do? I was trying to send the path of a symbolic link (not the content of this link, which anyway might not exist) to another app. This other app displays all sort of information or metadata about this path. Th

Context Menu in NSBrowser

2009-01-26 Thread Gerriet M. Denkmann
All NSViews show, when control-clicked, their context menu. But not the NSView subclass NSBrowser. Is this a documented feature or a bug? And what is the recommended workaround? Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Opening Symbolic Links

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:46 PM, Gerriet M. Denkmann wrote: I have a text file, called Text. I did in Terminal: ln -s Text SymlinkToText When I try to open SymlinkToText in TextEdit "SymlinkToText" is shown in the Open Panel, but when I

Re: Opening Invisible Files

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:40 PM, Gerriet M. Denkmann wrote: I want my NSOpenPanel to show all files - same as the Finder does, if one adds AppleShowAllFiles = YES to: ~/Library/Preferences/ com.apple.finder.plist. Is there a way to accomplish this

Re: Opening Symbolic Links

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Rob Keniger wrote: On 24/01/2009, at 11:46 PM, Gerriet M. Denkmann wrote: I have a text file, called Text. I did in Terminal: ln -s Text SymlinkToText When I try to open SymlinkToText in TextEdit "SymlinkToText" is shown in the Open Panel, but when I

Re: Not Resolving Aliases

2009-01-25 Thread Gerriet M. Denkmann
On 25 Jan 2009, at 09:31, Michael Ash wrote: On Sat, Jan 24, 2009 at 9:54 AM, Gerriet M. Denkmann wrote: When I do: [ sharedWorkspace openFile: @"/path/to/symlink" withApplication: @"SomeApp" ] then "SomeApp" does NOT get "/path/to/symlink"

Not Resolving Aliases

2009-01-24 Thread Gerriet M. Denkmann
When I do: [ sharedWorkspace openFile: @"/path/to/symlink" withApplication: @"SomeApp" ] then "SomeApp" does NOT get "/path/to/symlink" but the content of the symlink. Same for Aliases. Is there a way to open a path without resolving aliases? Kind regards, Gerriet. __

Opening Symbolic Links

2009-01-24 Thread Gerriet M. Denkmann
I have a text file, called Text. I did in Terminal: ln -s Text SymlinkToText When I try to open SymlinkToText in TextEdit "SymlinkToText" is shown in the Open Panel, but when I select it, the "Open"-button is disabled. Is this a bug or a feature (in 10.5.6) ? I believe this did work in Tiger

Opening Invisible Files

2009-01-24 Thread Gerriet M. Denkmann
I want my NSOpenPanel to show all files - same as the Finder does, if one adds AppleShowAllFiles = YES to: ~/Library/Preferences/ com.apple.finder.plist. Is there a way to accomplish this? Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa

Re: Find with Nonspacing_Mark

2008-12-29 Thread Gerriet M. Denkmann
everything works perfectly now. Kind regards, Gerriet. On 2008/12/28, at 21:39, "Gerriet M. Denkmann" wrote: On 29 Dec 2008, at 03:02, "Gerriet M. Denkmann" wrote: I have a NSTextView which contains "บุ" that is: THAI CHARACTER BO BAIMAI + THA

Re: Find with Nonspacing_Mark

2008-12-28 Thread Gerriet M. Denkmann
On 29 Dec 2008, at 03:02, "Gerriet M. Denkmann" wrote: I have a NSTextView which contains "บุ" that is: THAI CHARACTER BO BAIMAI + THAI CHARACTER SARA U, which is a consonant, followed by a vowel. When I use the Find Panel to search for "บ" (using "Cont

Modify appearance of NSSegmentedControl

2008-12-28 Thread Gerriet M. Denkmann
I have an NSSegmentedControl with segmentCount = 1, segmentStyle = NSSegmentStyleSmallSquare (used in a Toolbar). When the NSSegmentedControl has state = NSOnState, the backgroung is light gray with black text. I want to have a dark gray background with white text. (Same as a Round Textur

Find with Nonspacing_Mark

2008-12-28 Thread Gerriet M. Denkmann
I have a NSTextView which contains "บุ" that is: THAI CHARACTER BO BAIMAI + THAI CHARACTER SARA U, which is a consonant, followed by a vowel. When I use the Find Panel to search for "บ" (using "Contains" or: "Starts with") nothing is found. Same in TextEdit; same with any character + No

Re: warning: unused parameter '_value'

2008-12-23 Thread Gerriet M. Denkmann
On 23 Dec 2008, at 02:45, Nathan Vander Wilt li...@calftrail.com> wrote: On Dec 22, 2008, at 4:42 AM, Gerriet M. Denkmann wrote: When I use [GCC_WARN_UNUSED_PARAMETER, -Wunused-parameter] I get (in Release build, not in Development) for every @synthesize statement a warning: warning: unu

warning: unused parameter '_value'

2008-12-22 Thread Gerriet M. Denkmann
When I use [GCC_WARN_UNUSED_PARAMETER, -Wunused-parameter] I get (in Release build, not in Development) for every @synthesize statement a warning: warning: unused parameter '_value' There is no "value" nor "_value" in the source to be found. What am I doing wrong? Xcode Version 3.1.1; gcc 4.

Toll Free Garbage

2008-12-21 Thread Gerriet M. Denkmann
Assume some plug-in, which must work with garbage collection on or off. Assume further, that there is a method (not under our control): - (NSString *)copySomething; And that this method returns either an NSString* or a toll free bridged CFStringRef, of which we are the owner (because the name

User Default Bindings

2008-12-18 Thread Gerriet M. Denkmann
I have User Defaults (Preferences) like: MainDict = { Peter = { Income = 20, Age = 77 }, Nancy = { Income = 24, Age = 37 } } That is, the preferences contain a dictionary (MainDict) which contains two sub-dictionaries (Peter and Nancy). When in IB I bind an NSTextField to: S

Re: Pressable Button

2008-12-17 Thread Gerriet M. Denkmann
Following Peters advice: Consider using a single-segment NSSegmentedControl. It has this behavior built-in. I am not completely satisfied: I want the NSOnState shown as done in an NSButton with buttonType = NSOnOffButton and bezelStyle = NSTexturedSquareBezelStyle. In the header file I

Re: Pressable Button

2008-12-16 Thread Gerriet M. Denkmann
On 17 Dec 2008, at 00:56, Stéphane Sudre wrote: On Dec 16, 2008, at 4:02 PM, Gerriet M. Denkmann wrote: I am trying to build a pressable button: an on-off button (subclass of NSButton), which, if pressed for more than 0.3 seconds, displays a context menu. My idea was: Start a non

Re: Where is the Computer Image ?

2008-12-16 Thread Gerriet M. Denkmann
On 16 Dec 2008, at 08:43, Brandon Walkin wrote: The image is in /System/Library/CoreServices/CoreTypes.bundle/ Contents/Resources This works fine: NSImage *anImage = [ NSImage imageNamed: NSImageNameComputer ]; but how to get an image of a black MacBook? (My computer is white.) Is hardcodin

Pressable Button

2008-12-16 Thread Gerriet M. Denkmann
I am trying to build a pressable button: an on-off button (subclass of NSButton), which, if pressed for more than 0.3 seconds, displays a context menu. My idea was: Start a non-repeating timer in mouseDown: and schedule it with NSEventTrackingRunLoopMode. In mouseUp: invalidate the timer.

Re: Where is the Computer Image ?

2008-12-15 Thread Gerriet M. Denkmann
On 15 Dec 2008, at 19:24, John C. Randolph wrote: On Dec 14, 2008, at 8:53 PM, Gerriet M. Denkmann wrote: Finder.app can show in its Sidebar an image of a computer. I want to create a button with this same (or similar) image. I can use [ sharedWorkspace iconForFile: fullPath ] to get an

Toolbar View Item Size

2008-12-14 Thread Gerriet M. Denkmann
Toolbar Programming Topics for Cocoa -> Setting a Toolbar Item’s Size says about view items: "The minSize and maxSize toolbar must not be left unset (or the view will not display), and unless you are implementing intelligent stretching behavior in a view item, both theminSize and maxSize

Where is the Computer Image ?

2008-12-14 Thread Gerriet M. Denkmann
Finder.app can show in its Sidebar an image of a computer. I want to create a button with this same (or similar) image. I can use [ sharedWorkspace iconForFile: fullPath ] to get an image of a home folder, or of a disk partition. But I cannot find a computer image. Also looked at "Icon Servic

Submenu in ToolbarItem

2008-12-14 Thread Gerriet M. Denkmann
I have an NSToolbar which has NSToolbarItems with [toolbarItem view] = NSButton. When [toolbar displayMode] = NSToolbarDisplayModeLabelOnly and I press the label [toolbarItem menuFormRepresentation] shows its submenu. Otherwise (Icon visible) [toolbarItem label] gets shown, which does nothi

Re: Override load/save for NSDictionary ?

2008-12-05 Thread Gerriet M. Denkmann
On 5 Dec 2008, at 23:40, "Michael Ash" <[EMAIL PROTECTED]> wrote: On Fri, Dec 5, 2008 at 6:58 AM, Graham Cox <[EMAIL PROTECTED]> wrote: I'd love to know what you think is wrong with the file format that keyed archiving creates that your own would improve on? I can only speak for myse

Re: Controlled Font Substitution

2008-12-04 Thread Gerriet M. Denkmann
On 4 Dec 2008, at 01:34, Aki Inoue wrote: Mac OS X ships with Thonburi as the Thai system font, and that's the font usually you get for Thai character substitution. Yes. And Thonburi is much more readable than Lucida Grande, which was used on Tiger. The font substitution system is applyin

Controlled Font Substitution

2008-12-03 Thread Gerriet M. Denkmann
When NSTextView and its friends try to display characters and encounter a character not present in the current font (e.g. THAI CHARACTER MO MA in Monaco 10pt.) then they have to get a corresponding glyph from some other font. The problem: they sometimes pick up a font which is not suitabl

Re: Xcode messes up my Log Files

2008-12-02 Thread Gerriet M. Denkmann
On 2 Dec 2008, at 17:36, Patrick Mau wrote: Somebody wrote a nice Xcode plugin at: http://0xced.blogspot.com/2008/09/quietxcode.html I never tried it myself, but thought it was a cool idea when I googled for a similar problem. I just tried it: works perfectly. But it is (at least to me) s

Re: Viewing Documentation in Safari

2008-12-02 Thread Gerriet M. Denkmann
On 2 Dec 2008, at 22:53, Johnson <[EMAIL PROTECTED]> wrote: Gerriet, (This really belongs on the xcode-users mailing list rather than cocoa- dev, I think.) I do not think so. Viewing the documentation is an integral part of programming in Cocoa. And I never use Xcode to read documentat

Xcode messes up my Log Files

2008-12-01 Thread Gerriet M. Denkmann
Whenever Xcode is running, I get hundreds of lines like: 02/12/2008 14:02:37 Xcode[451] Xcode(451,0xb0103000) malloc: free_garbage: garbage ptr = 0x3af12c0, has non-zero refcount = 1 in my Log Files (Console Messages). I am ready to believe that this is something quite innocent and not to be

Viewing Documentation in Safari

2008-12-01 Thread Gerriet M. Denkmann
When I try to open the "String Programming Guide for Cocoa" in Safari, it tells me that: “index.html” is a web application which was downloaded from the Internet. Are you sure you want to open it? Xcode downloaded this file on 26 November 2008 from developer.apple.com. First of all, I st

Re: Sorting an NSTableView

2008-11-30 Thread Gerriet M. Denkmann
On 30 Nov 2008, at 14:05, Patrick Mau wrote: Hello Gerriet If you select the table column and look at the inspector window, you'll find a "Sort key" and "Selector" input field. These are used to create the NSSortDescriptor. Regards Patrick (Small screenshot attached, sorry if it's again

Sorting an NSTableView

2008-11-29 Thread Gerriet M. Denkmann
I have an NSTableView, filled by an NSArrayController. A column has "Creates Sort Descriptor" selected in InterfaceBuilder. And right: when I click on this column, an NSSortDescriptor gets created with the selector "compare:". Works fine; only "compare:" is quite unusable; the documentation q

Re: [Reposted] Document based resource strategy

2008-11-26 Thread Gerriet M. Denkmann
On 26 Nov 2008, at 09:14, Jason Stephenson wrote: Gerriet M. Denkmann wrote: What version of Xcode do you have installed? I have 3.1.1 and Safari just says: "No file exists at the address “/Developer/ Documentation/DocSets/ com.apple.ADC_Reference_Library.CoreReference.docset/Con

Re: Testing apps on 10.*

2008-11-25 Thread Gerriet M. Denkmann
On 26 Nov 2008, at 02:28, Gregory Weston <[EMAIL PROTECTED]> wrote: macdev wrote: I was wondering what the common ways are to test my application on OSX 10.* versions. Besides having a separate machine each having a different version, is there any other way you guys are using to test your ap

Re: [Reposted] Document based resource strategy

2008-11-25 Thread Gerriet M. Denkmann
On 26 Nov 2008, at 00:26, Keary Suska <[EMAIL PROTECTED]> wrote: On Nov 24, 2008, at 4:40 PM, Carlos Eduardo Mello wrote: I started with the document based template in Xcode, and now I want to organize my resources in nib files. Here is a list of ideas/ questions I have about this whole plan

Where are the Companion Guides?

2008-11-23 Thread Gerriet M. Denkmann
Opening "NSOperationQueue Class Reference" I see a link: Companion guide Threading Programming Guide but when I click on it, Safari says: No file exists at the address “/Developer/Documentation/DocSets/ com.apple.ADC_Reference_Library.CoreReference.docset/Contents/ Resources/Documents/do

Re: what replaces ICARegisterEventNotificationPB

2008-11-20 Thread Gerriet M. Denkmann
On 21 Nov 2008, at 00:56, Scott Anguish <[EMAIL PROTECTED]> wrote: please file a bug on the doc.. it should tell you this. bugreporter.apple.com Well, why don't you do it yourself? No, this is not an attack on you, Mr. Anguish. But almost daily I see some Apple engineer advising people to

Re: InputManagers in Leopard

2008-11-20 Thread Gerriet M. Denkmann
On 19 Nov 2008, at 23:16, "Michael Ash" <[EMAIL PROTECTED]> wrote: On Wed, Nov 19, 2008 at 7:04 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: I know that InputManagers are "now officially unsupported." And also that "this functionality is like

InputManagers in Leopard

2008-11-19 Thread Gerriet M. Denkmann
I know that InputManagers are "now officially unsupported." And also that "this functionality is likely to be disabled in a future release." But while it is still possible I would like to continue using them. So I copied my thing into the /Library/InputManagers folder. Then did sudo chown -R r

Re: Opening Ports in Leopard

2008-11-19 Thread Gerriet M. Denkmann
On 19 Nov 2008, at 15:59, Kyle Sluder wrote: On Wed, Nov 19, 2008 at 12:08 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: In an other programm (doing Distributed Objects between computers) I found out that int y = bind( newSocket, (struct sockaddr *)&serverAddre

Re: Opening Ports in Leopard

2008-11-18 Thread Gerriet M. Denkmann
On 19 Nov 2008, at 01:00, "Michael Ash" <[EMAIL PROTECTED]> wrote: On Tue, Nov 18, 2008 at 4:49 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: On 18 Nov 2008, at 15:27, Stefan Werner wrote: Aren't port numbers 0-1023 privileged under Unix and therefore o

Re: Opening Ports in Leopard

2008-11-18 Thread Gerriet M. Denkmann
On 18 Nov 2008, at 15:27, Stefan Werner wrote: Aren't port numbers 0-1023 privileged under Unix and therefore only to applications running as root? If you're running your application as a regular user, it can't open a listening socket on port 123. It should still be perfectly able to send

Re: Opening Ports in Leopard

2008-11-18 Thread Gerriet M. Denkmann
time synchronization turned on already (in the Date and Time prefpane)? The built-in ntpd uses that port, so you'll need to either disable that or use another port. ntpd is turned off. (I just checked again in System Preferences). On 17 Nov 2008, at 12:40, Gerriet M. Denkmann wrote: I am tryi

<    4   5   6   7   8   9   10   11   >