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

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

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

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

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: 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

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: 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

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: 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

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

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

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

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

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: 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

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 f

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"

boundingRectForGlyphRange is very inaccurate

2017-03-06 Thread Gerriet M. Denkmann
macOS 12.3, Xcode Version 8.2.1 (8C1002). I am trying to get bounding rects in a TextView: NSRange glyphRange =[ layoutManager glyphRangeForCharacterRange: someCharRange actualCharacterRange:

Re: boundingRectForGlyphRange is very inaccurate

2017-03-07 Thread Gerriet M. Denkmann
> On 6 Mar 2017, at 23:26, Ken Thomases wrote: > > On Mar 6, 2017, at 3:41 AM, Gerriet M. Denkmann wrote: >> >> I am trying to get bounding rects in a TextView: >> >> NSRange glyphRange = [ layoutManager glyphRangeForCha

Re: boundingRectForGlyphRange is very inaccurate

2017-03-07 Thread Gerriet M. Denkmann
> On 8 Mar 2017, at 06:37, Ken Thomases wrote: > > On Mar 7, 2017, at 4:17 AM, Gerriet M. Denkmann wrote: >> >> On 6 Mar 2017, at 23:26, Ken Thomases wrote: >>> >>> Try using >>> -enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:

How to debug crash in NSOperation?

2017-03-26 Thread Gerriet M. Denkmann
macOS 12.3 This is a rather rare bug (never seen before): Thread 12 Crashed:: Dispatch queue: เสือ :: NSOperation 0x61800184fbd0 (QOS: UTILITY) 0 libsystem_kernel.dylib 0x7fffb3d65dd6 __pthread_kill + 10 1 libsystem_pthread.dylib 0x7fffb3e51787 pthread_kill +

Re: How to debug crash in NSOperation?

2017-03-26 Thread Gerriet M. Denkmann
> On 27 Mar 2017, at 10:39, Ken Thomases wrote: > > On Mar 26, 2017, at 10:06 PM, Gerriet M. Denkmann wrote: >> >> macOS 12.3 >> >> This is a rather rare bug (never seen before): >> >> Thread 12 Crashed:: Dispatch queue: เสือ :: NSOpe

How to convert NSData → Property List Object

2017-03-27 Thread Gerriet M. Denkmann
propertyListFromData:mutabilityOption:format:errorDescription: (which converts an NSData into some property list object) is deprecated. The documentation says: This method is deprecated. Use dataWithPropertyList:format:options:error: instead. But this seems to be the exact opposite: converting

Re: How to convert NSData → Property List Object

2017-03-27 Thread Gerriet M. Denkmann
> On 27 Mar 2017, at 15:49, Felix Franz wrote: > > On 27 Mar 2017, at 10:42, Gerriet M. Denkmann wrote: >> >> propertyListFromData:mutabilityOption:format:errorDescription: (which >> converts an NSData into some property list object) is deprecated. >> >&

Re: How to debug crash in NSOperation?

2017-03-27 Thread Gerriet M. Denkmann
Sent from my iPhone > On 27 Mar 2017, at 23:37, Jens Alfke wrote: > > >> On Mar 26, 2017, at 10:04 PM, Gerriet M. Denkmann >> wrote: >> >> Yes, you are right. And I have to apologise for not spotting this: >> >> *** Terminating app due to u

Re: How to debug crash in NSOperation?

2017-03-27 Thread Gerriet M. Denkmann
Sent from my iPhone > On 28 Mar 2017, at 10:32, Jens Alfke wrote: > > >> On Mar 27, 2017, at 8:25 PM, Gerriet M. Denkmann wrote: >> >> >> >> Sent from my iPhone >> >>> On 27 Mar 2017, at 23:37, Jens Alfke wrote: >>&g

Re: How to debug crash in NSOperation?

2017-03-27 Thread Gerriet M. Denkmann
Sent from my iPhone > On 28 Mar 2017, at 11:41, Quincey Morris > wrote: > >> On Mar 26, 2017, at 22:04 , Gerriet M. Denkmann wrote: >> >> [ arrayOfStrings writeToFile: “directoryPath/SortedKeys.plist” atomically: >> YES ]; ← pseudo code > > A c

Normalisation of filenames

2017-04-01 Thread Gerriet M. Denkmann
I tried (with case-sensitive HFS+ in macOS 12.4): NSString *path = … NSURL *url = [ NSURL fileURLWithPath: path isDirectory: NO ]; NSString *urlPath = url.path; BOOL same = [ urlPath isEqualToString: path ]; for different values of path I got: path = @“/ก่ี”; // consonant + mark + vowel →

Re: Normalisation of filenames

2017-04-01 Thread Gerriet M. Denkmann
> On 2 Apr 2017, at 01:09, Quincey Morris > wrote: > > On Apr 1, 2017, at 04:41 , Gerriet M. Denkmann wrote: >> >> for different values of path I got: >> path = @“/ก่ี”; // consonant + mark + vowel → same = YES >> path = @“/กี่”; // c

Re: Normalisation of filenames

2017-04-01 Thread Gerriet M. Denkmann
> On 2 Apr 2017, at 06:33, Jens Alfke wrote: > > >> On Apr 1, 2017, at 11:58 AM, Gerriet M. Denkmann wrote: >> >> I think that the examples above show, that NSURL does indeed do something >> about normalising Unicode strings. > > That makes sense; I

Re: Normalisation of filenames

2017-04-02 Thread Gerriet M. Denkmann
> On 2 Apr 2017, at 10:59, Aki Inoue wrote: > > >> On Apr 1, 2017, at 4:57 PM, Gerriet M. Denkmann wrote: >> >> >>> On 2 Apr 2017, at 06:33, Jens Alfke wrote: >>> >>> >>>> On Apr 1, 2017, at 11:58 AM, Gerriet M. Denkmann

Re: Normalisation of filenames

2017-04-04 Thread Gerriet M. Denkmann
> On 3 Apr 2017, at 05:58, Aki Inoue wrote: > >>> This is the standard Unicode Normalization behavior. Each Unicode character >>> is assigned the Unicode Combining Property, an integer value defining the >>> canonical ordering of combining marks. >>> >>> The Unicode Combining Property for THA

iOS TableView moving down

2017-04-22 Thread Gerriet M. Denkmann
I got an iOS app where one scene contains a TableView which fills the whole screen. Works fine. But now I want to move the table view down 1 cm (leaving 1 cm unused space at the top of the screen above the table view). Reason: top of the table view (which contains a SearchField) is rather hard

Re: iOS TableView moving down

2017-04-28 Thread Gerriet M. Denkmann
> On 23 Apr 2017, at 14:45, Quincey Morris > wrote: > > On Apr 22, 2017, at 23:55 , Gerriet M. Denkmann wrote: >> >> But now I want to move the table view down 1 cm (leaving 1 cm unused space >> at the top of the screen above the table view). >> Reason: t

Re: iOS TableView moving down

2017-04-30 Thread Gerriet M. Denkmann
> On 29 Apr 2017, at 11:56, Saagar Jha wrote: > > > Saagar Jha > >> On Apr 28, 2017, at 20:22, Gerriet M. Denkmann wrote: >> >>> >>> On 23 Apr 2017, at 14:45, Quincey Morris >>> wrote: >>> >>> On Apr 22, 2017, at 2

strange behaviour of hasPrefix

2017-05-03 Thread Gerriet M. Denkmann
// strange behaviour for probably all combining marks (macOS 12.4): NSString *pintu = @"-ฺ";// HYPHEN-MINUS + THAI CHARACTER PHINTHU // ok NSString *test1 = pintu; [ self printTestString: test1 ]; // prints: length 2 0x2d 0xe3a “-ฺ” ok: has prefix “

NSTimer or what?

2017-06-19 Thread Gerriet M. Denkmann
macOS 11+ Some Cocoa app which has to do: 1. something a few seconds later 2. some other thing repeatedly about every 0.1 second. What is the most efficient (energy-wise) way to do this: NSTimer (with tolerance) NSRunLoop performSelector:target:argument:order:modes: NSObject

Cursor outside Rect without polling

2017-06-19 Thread Gerriet M. Denkmann
macOS. Some Cocoa app wants to know whether the cursor moved from any point to a point outside of some rect. Currently I use polling (which looks kind of inefficient). I tried NSTrackingArea, but this does not work: 1. if the cursor is initially NOT in the rect, the app does not get notified:

Re: NSTimer or what?

2017-06-20 Thread Gerriet M. Denkmann
> On 20 Jun 2017, at 16:24, Alastair Houghton > wrote: > > On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote: >> >> macOS 11+ >> >> Some Cocoa app which has to do: >> 1. something a few seconds later > > The main issue here isn’t energy

Re: NSTimer or what?

2017-06-20 Thread Gerriet M. Denkmann
> On 20 Jun 2017, at 16:24, Alastair Houghton > wrote: > > On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote: >> > >> 2. some other thing repeatedly about every 0.1 second. > > Personally, I’d choose an API that directly supports repeating ti

Writing NSImage

2017-06-20 Thread Gerriet M. Denkmann
macOS 12.5 I create an image like: NSImage *subImage = [ [NSImage alloc] initWithSize: subRect.size ]; [ subImage lockFocus ]; [ self.imagedrawAtPoint:NSMakePoint(0, 0) fromRect: subRect operation:

How to create an animated gif?

2017-06-20 Thread Gerriet M. Denkmann
macOS 12.5 Assume that I have two NSImages, both with the same size, how can I create an animated gif which alternates between these two images? Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: How to create an animated gif?

2017-06-22 Thread Gerriet M. Denkmann
> On 21 Jun 2017, at 23:56, Alastair Houghton > wrote: > > On 21 Jun 2017, at 16:09, Jens Alfke wrote: >> >> On Jun 20, 2017, at 11:17 PM, Gerriet M. Denkmann >> wrote: >>> >>> Assume that I have two NSImages, both with the same size, how ca

Doubled Pixels

2017-06-23 Thread Gerriet M. Denkmann
macOS 12.5 I try to make a sub image (subRect has size 32 x 32) like: NSRect pubRect = NSZeroRect; pubRect.size = subRect.size; NSImage *subImage = [ [NSImage alloc] initWithSize: subRect.size ]; [ subImage lockFocus ]; [ self.imagedrawAtPoint:NSMakePoint(0, 0)

Re: Doubled Pixels

2017-06-23 Thread Gerriet M. Denkmann
> On 23 Jun 2017, at 23:37, Jens Alfke wrote: > > >> On Jun 23, 2017, at 8:45 AM, Gerriet M. Denkmann wrote: >> >> the image looks fine, but when I write subData to disk, it has 64 x 64 >> pixels. > > You’re probably running this on a computer with a

Re: Doubled Pixels

2017-06-25 Thread Gerriet M. Denkmann
> On 25 Jun 2017, at 09:29, Graham Cox wrote: > > You could get the colorSpaceName from the source image and use that. If > there’s no conversion needed between the images it’ll probably be faster > (though seems you are giving yourself the option of creating a grayscale > version here). The

Re: Doubled Pixels

2017-06-25 Thread Gerriet M. Denkmann
> On 26 Jun 2017, at 08:03, Graham Cox wrote: > >> On 25 Jun 2017, at 7:39 pm, Gerriet M. Denkmann wrote: >> >> Which of these two lines is preferable: >> NSString *colorSpaceName = useColour ? NSDeviceRGBColorSpace : >> NSDeviceWhiteColorSpac

UITableViewController

2017-06-28 Thread Gerriet M. Denkmann
I have (iOS 10.3) a UIViewController which contains: Other Stuff UITableView Now I want to add a UIRefreshControl to my TableView. The documentation says: that UIRefreshControl “is specifically designed for use in a table view that’s managed by a table view controller, using it in a different c

Re: UITableViewController

2017-06-28 Thread Gerriet M. Denkmann
> On 28 Jun 2017, at 14:37, Quincey Morris > wrote: > > On Jun 28, 2017, at 00:21 , Gerriet M. Denkmann wrote: >> >> Ok, so I removed my TableView from the scene and tried to drag a >> UITableViewController into its place. >> But Xcode wou

Re: UITableViewController

2017-06-28 Thread Gerriet M. Denkmann
> On 29 Jun 2017, at 00:48, Quincey Morris > wrote: > > On Jun 28, 2017, at 01:38 , Gerriet M. Denkmann wrote: >> >> I did just that. > > Not quite … > >> I have a Master View Controller Scene with a MasterViewController ← >> UIViewController

Re: UITableViewController

2017-06-29 Thread Gerriet M. Denkmann
> On 29 Jun 2017, at 12:13, Quincey Morris > wrote: > > On Jun 28, 2017, at 22:02 , Gerriet M. Denkmann wrote: >> >> I had to do two more steps: >> >> 1. give the segue an identifier, like: “EmbedSegueToTableViewController” >> >> 2. in the

Helper tool

2013-09-13 Thread Gerriet M. Denkmann
I have a helper tool (started via SMJobBless from the main app). Its launchd.plist contains (no idea why, probably I copied this from some sample code): LaunchOnlyOnce = YES RunAtLoad = YES OnDemand = NO The problem: it runs even when the the main app has never asked it to run. Obviously it

Re: Helper tool

2013-09-13 Thread Gerriet M. Denkmann
On 13 Sep 2013, at 22:10, Charles Srstka wrote: > On Sep 13, 2013, at 10:09 AM, Charles Srstka wrote: > >> On Sep 13, 2013, at 8:47 AM, "Gerriet M. Denkmann" >> wrote: >> >>> I have a helper tool (started via SMJobBless from the main app). >&

Re: Helper tool

2013-09-15 Thread Gerriet M. Denkmann
On 13 Sep 2013, at 22:09, Charles Srstka wrote: > On Sep 13, 2013, at 8:47 AM, "Gerriet M. Denkmann" > wrote: > >> I have a helper tool (started via SMJobBless from the main app). >> >> Its launchd.plist contains (no idea why, probably I

RunLoop in Helper Tool

2013-09-15 Thread Gerriet M. Denkmann
I have a Helper Tool, running as root, started via SMJobBless and communicating vie Xpc. Works fine, but: 1. it cannot stop (CFRunLoopStop), 2. Timers never fire 3. NSRunLoop currentMode returns nil. Maybe all three things are related. To 1: if ( asked to quit ) { NSRunLoop *currentRun

Re: Helper tool

2013-09-15 Thread Gerriet M. Denkmann
> On Sep 13, 2013, at 6:47 AM, Gerriet M. Denkmann wrote: > >> I have a helper tool (started via SMJobBless from the main app). >> >> Its launchd.plist contains (no idea why, probably I copied this from some >> sample code): >> LaunchOnlyOnce = YES

Re: RunLoop in Helper Tool

2013-09-15 Thread Gerriet M. Denkmann
having a better understanding of what is going on. Thanks! Gerriet. > Le 15 sept. 2013 à 10:32, Gerriet M. Denkmann a écrit : > >> I have a Helper Tool, running as root, started via SMJobBless and >> communicating vie Xpc. >> >> Works fine, but: >> 1. it cannot

NSDistributedNotificationCenter and Helper Tool

2013-09-15 Thread Gerriet M. Denkmann
I have a Helper Tool, running as root, started via SMJobBless and communicating vie Xpc. Sometimes it does: [[NSOperationQueue mainQueue] addOperationWithBlock:^ { NSDistributedNotificationCenter *d = [ NSDistributedNotificationCenter defaultCenter ]; NSL

Re: NSDistributedNotificationCenter and Helper Tool

2013-09-15 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 00:26, Jeff Johnson wrote: > You need to use the option NSNotificationPostToAllSessions. Jeff, you are absolutely right. Now everything works as it should. Thank you very much! Kind regards, Gerriet. > > > On Sep 15, 2013, at 12:15 PM, Gerriet M. Denkma

Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
In a new app (not document based) I inserted: #import "ZipProtocol.h" // ZipProtocol.h: @protocol ZipProtocol - (void)command:(NSString *)command withReply: (void (^)( NSString *answerString ))reply; @end #define MAGIC_BUG_REMOVAL // defined or not - makes a strange diff

Re: Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 22:10, Charles Srstka wrote: > On Sep 16, 2013, at 3:22 AM, Gerriet M. Denkmann wrote: > >> In a new app (not document based) I inserted: >> >> #import "ZipProtocol.h" >> >> // ZipProtocol.h: >> @protocol ZipProtoco

Re: Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 22:13, Charles Srstka wrote: > On Sep 16, 2013, at 3:22 AM, Gerriet M. Denkmann wrote: > >> ree =[ aCo remoteObjectProxyWithErrorHandler: ^(NSError *err) >> { >> // if h

Re: Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 22:21, Charles Srstka wrote: > On Sep 16, 2013, at 10:16 AM, "Gerriet M. Denkmann" > wrote: > >> If (and only if) MAGIC_BUG_REMOVAL is defined, I see: >> Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a >> h

Re: Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 23:16, Charles Srstka wrote: > On Sep 16, 2013, at 10:27 AM, "Gerriet M. Denkmann" > wrote: > >> Maybe I was not very clear. >> The problem is NOT that the helper app does not start. There just is no >> helper app, there is n

Re: Very strange Xpc magic

2013-09-16 Thread Gerriet M. Denkmann
On 16 Sep 2013, at 23:13, Keary Suska wrote: > > On Sep 16, 2013, at 9:27 AM, Gerriet M. Denkmann wrote: > >> >> On 16 Sep 2013, at 22:21, Charles Srstka wrote: >> >>> On Sep 16, 2013, at 10:16 AM, "Gerriet M. Denkmann" >>> wrote:

Re: Progress for archiving/dearchiving

2013-09-16 Thread Gerriet M. Denkmann
On 17 Sep 2013, at 00:26, Graham Cox wrote: > > What I was sort of hoping was that there was a way to figure out from the > archive how many objects there were without having to archive the number > explicitly. For example, the root level of an archive is a dictionary, which > has a count, b

Re: Still can't get autolayout to work the way I want

2013-09-20 Thread Gerriet M. Denkmann
On 20 Sep 2013, at 12:12, Kyle Sluder wrote: > On Sep 19, 2013, at 4:23 PM, Brad O'Hearne wrote: >> >> Anyway, you get the point. I have found myself actually devoting time to >> trying to reverse-think how some of these auto-generated constraints appear, >> because some of them are so wacky

Strange behaviour of iPhone

2013-09-21 Thread Gerriet M. Denkmann
I just created a new iOS app - universal, Master-Detail, no CoreData and added the following into application:didFinishLaunchingWithOptions: // --- #define BUG_FIX1 #if DEBUG NSLog(@"%s Debug build - no bugs here",__FUNCTION__); #else // Release #ifdef BUG_FIX1

Re: Strange behaviour of iPhone

2013-09-21 Thread Gerriet M. Denkmann
legal C-code, why does the compiler not complain? This final (and most important) question: is this legal C-code, and if not, which C-rule gets violated? Kind regards, Gerriet. >> On Sep 21, 2013, at 9:00 AM, "Gerriet M. Denkmann" >> wrote: >> >> I j

Re: Strange behaviour of iPhone

2013-09-21 Thread Gerriet M. Denkmann
On 22 Sep 2013, at 00:38, "Mills, Steve" wrote: >> On Sep 21, 2013, at 12:24, "Gerriet M. Denkmann" >> wrote: >> >> 1. tupelsP lives outside the block > > Because once the block containing the array exits scope, so does the memory > o

Very small rect in drawRect:

2013-09-27 Thread Gerriet M. Denkmann
I have a CustomView inside a ScrollView. Works fine. But sometimes (don't know what causes this, or how to reproduce it) my drawRect: method gets called with a very small rect: -[DriftView drawRect:] Ignore very small rect {{0, 0}, {1, 1}}; visibleRect {{0, 0}, {1393, 189}} I just ignore these

Re: Very small rect in drawRect:

2013-09-27 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 12:21, Quincey Morris wrote: > On Sep 27, 2013, at 22:05 , "Gerriet M. Denkmann" > wrote: > >> The backtrace does offer me no clues: >> >> #1: 0x7fff8d0f2140 AppKit`-[NSView _drawRect:clip:] + 4437 >

Re: Very small rect in drawRect:

2013-09-27 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 13:46, Jens Alfke wrote: > On Sep 27, 2013, at 11:39 PM, Gerriet M. Denkmann > wrote: > >> No other values for rect (I am not resizing the window). >> For the 1-pixel rect I am still waiting - this does happen not very often. > > Does it mat

Re: Very small rect in drawRect:

2013-09-28 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 14:18, Quincey Morris wrote: > On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" > wrote: > >> My CustomView (aka DriftView) has no subviews at all. It only has a >> superview: the ScrollView. > > What I was trying to draw your att

Re: Very small rect in drawRect:

2013-09-28 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 14:18, Quincey Morris wrote: > On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" > wrote: > >> My CustomView (aka DriftView) has no subviews at all. It only has a >> superview: the ScrollView. > > What I was trying to draw your att

Helping Arc with: "PerformSelector may cause a leak because its selector is unknown"

2013-10-21 Thread Gerriet M. Denkmann
I am trying to convert this to Arc: - (BOOL)doSomethingWithSelector: (SEL)aSelector { [...] NSNumber *status = [ self performSelector: aSelector withObject: a withObject: b ]; [...] } Xcode 5.0 complains: "PerformSelector may cause a leak because its selector is unkn

Re: Helping Arc with: "PerformSelector may cause a leak because its selector is unknown"

2013-10-22 Thread Gerriet M. Denkmann
ject: a > withObject: b ]; > #pragma clang diagnostic pop > > Hope that helps. This certainly helps: at least I get a clean compile. But telling the compiler about the type of selector to expect would be even better. Can this be done? Kind regards, Gerriet. > > On 22/10/201

Arc: Switch case is in protected scope

2013-10-22 Thread Gerriet M. Denkmann
Converting to Arc (Xcode 5.0). This works fine without Arc (regardless whether TRIGGER_ERROR is defined or not): NSMutableString *mus = [ NSMutableString string ]; NSString *word = @"abc"; switch( self.colourType ) { case colour_link: [ mus

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Gerriet M. Denkmann
ther this is a compiler bug) Kind regards Gerriet. >> On 2013年10月22日, at 15:41, "Gerriet M. Denkmann" wrote: >> >> Converting to Arc (Xcode 5.0). >> >> This works fine without Arc (regardless whether TRIGGER_ERROR is defined or >> not):

operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
The documentation tells me that NSProcessInfo operatingSystemVersionString "is human readable, localized, and is appropriate for displaying to the user. This string is not appropriate for parsing." Ok. So what do I use for parsing? like: if ( current_os_x_version < 10.9 ) then do something...

Re: operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
ot; version = "Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64" Maybe there is something which gives me "10.9" or "10.8.5" or anything more Mac-like? > > On Oct 25, 2013, at 11:49, Gerriet

Re: operatingSystemVersionString replacement

2013-10-24 Thread Gerriet M. Denkmann
On 25 Oct 2013, at 11:24, Greg Parker wrote: > On Oct 24, 2013, at 8:49 PM, Gerriet M. Denkmann wrote: >> The documentation tells me that NSProcessInfo operatingSystemVersionString >> "is human readable, localized, and is appropriate for displaying to the >>

NSSearchField and CR

2013-10-31 Thread Gerriet M. Denkmann
I have an NSSearchField with sendsWholeSearchString = NO in order to do incremental searches. But if the content of the search field is a regular expression, I only want to process it when the regular expression is complete, i.e. when the user enters CR (aka "return"). Is there a way to disting

Re: NSSearchField and CR

2013-10-31 Thread Gerriet M. Denkmann
On 31 Oct 2013, at 22:07, Kyle Sluder wrote: >> On Oct 31, 2013, at 6:10 AM, "Gerriet M. Denkmann" >> wrote: > >> >> I have an NSSearchField with sendsWholeSearchString = NO in order to do >> incremental searches. >> But if the content of

Speed of Arc on iPhone

2013-11-01 Thread Gerriet M. Denkmann
Messing with an iPhone app (iOS 7.0.3) Release build on Xcode Version 5.0.1 (5A2053) I noticed that by switching Arc off in two crucial files the speed of some operation almost doubled. So: are there any rules of thumb what to do and what not to do to avoid an Arc slowdown? Or: are there situa

Pasteboard corrupts data

2013-11-03 Thread Gerriet M. Denkmann
When I select in an NSTextView with isRichText = YES the character "。" = HALFWIDTH IDEOGRAPHIC FULL STOP U+FF61 Utf-8: EF BD A1and then look at the pasteboards (using Clipboard Viewer Version 4.0) I see: public-utf8-plain-text and NSStringPasteboardType both have: "ef bd a1" which is ok. But p

MDItemCopyAttributes replacement for audio

2013-11-05 Thread Gerriet M. Denkmann
I have a folder with some sound snippets. I can use MDItemCopyAttributes to get useful information, like Album, Titel etc. But when I copy this folder into my app (Content/Resources/...) then MDItemCopyAttributes has none of this information. Maybe Spotlight refuses to index app contents. So: h

Re: MDItemCopyAttributes replacement for audio

2013-11-05 Thread Gerriet M. Denkmann
On 6 Nov 2013, at 01:57, Jens Alfke wrote: > > On Nov 5, 2013, at 9:49 AM, Gerriet M. Denkmann wrote: > >> Maybe Spotlight refuses to index app contents. > > Right. > >> So: how can I get this information directly from the sound files? >> I found so

Fonts on iOS

2013-11-20 Thread Gerriet M. Denkmann
The Thonburi font (default font for Thai) has some issues (since 10.9 / iOS 7). (E.g. writing ผฺ that is THAI CHARACTER PHO PHUNG + THAI CHARACTER PHINTHU, the latter (which is a non-spacing mark) is NOT displayed under the preceding character, but next to it; should look similar to พฺ ) On OS X

Sending a message to a Toll free bridge

2013-11-25 Thread Gerriet M. Denkmann
The documentation states: "CFArray is “toll-free bridged” with its Cocoa Foundation counterpart, NSArray. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an NSArray * parameter, you c

Autosizing an iPhone

2013-11-27 Thread Gerriet M. Denkmann
A universal app. On iPad: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com

overlapping status bar

2013-11-29 Thread Gerriet M. Denkmann
On iPad 7.0.4: AViewController *a = ... BViewController *b = ... UISplitViewController *spv = [ [ UISplitViewController alloc ] init ]; spv.viewControllers = @[ a, b ]; spv.delegate = ...; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController

Re: overlapping status bar

2013-11-29 Thread Gerriet M. Denkmann
On 30 Nov 2013, at 00:42, Kyle Sluder wrote: >> On Nov 29, 2013, at 1:18 AM, "Gerriet M. Denkmann" >> wrote: >> >> The problem: the status bar is visible (as it should be) but it overlaps >> both view a and b, which looks ugly. >> Is there any

Re: overlapping status bar

2013-11-29 Thread Gerriet M. Denkmann
On 30 Nov 2013, at 00:42, Kyle Sluder wrote: >> On Nov 29, 2013, at 1:18 AM, "Gerriet M. Denkmann" >> wrote: >> >> The problem: the status bar is visible (as it should be) but it overlaps >> both view a and b, which looks ugly. >> Is there any

ToolTips for Matrix Cells

2013-11-30 Thread Gerriet M. Denkmann
I have a Matrix containing ButtonCells. In IB I have set a ToolTip for each ButtonCell. But when I hover the mouse over these cells, nothing is shown. When I set a tooltip for the matrix, it will be shown - but this is of no interest to me. Is there a way to show the ButtonCell-ToolTips? Gerri

Re: Fast hash of NSData?

2013-12-02 Thread Gerriet M. Denkmann
Assuming that a typical image has 243.3 k Bytes, or 1 993 221 bits. And that a hash has 64 bits. Then there are 2^1 993 221 different images, and 2^64 hash values. One hash value is thus shared on average by 2^1 993 157 images. = (2^10)^199 315.7 = 10^600 000 So it does not look so very unlike

Re: ToolTips for Matrix Cells

2013-12-03 Thread Gerriet M. Denkmann
On 4 Dec 2013, at 00:13, Scott Ribe wrote: > On Nov 30, 2013, at 1:11 AM, Gerriet M. Denkmann wrote: > >> I have a Matrix containing ButtonCells. In IB I have set a ToolTip for each >> ButtonCell. >> But when I hover the mouse over these cells, nothing is shown. >

Re: ToolTips for Matrix Cells

2013-12-03 Thread Gerriet M. Denkmann
On 4 Dec 2013, at 01:47, Jerry Krinock wrote: > > On 2013 Nov 30, at 00:11, Gerriet M. Denkmann wrote: > >> I have a Matrix containing ButtonCells. In IB I have set a ToolTip for each >> ButtonCell. >> But when I hover the mouse over these cells, nothing is

WebView blocks User Interface

2013-12-05 Thread Gerriet M. Denkmann
10.9.0. Given a search field, the user enters some chars, and a WebView is filled with all words containing these chars. Works fine, but one problem: When the user wants all words containing "no" but types a bit slowly, then this happens: - actionMethodFromSearchField: sender receives "

<    4   5   6   7   8   9   10   11   >