Re: dispatch_source does not work

2014-11-05 Thread Gerriet M. Denkmann
t; ___ Peter Hartmann > > mailto:hphartm...@justmail.de > > > Am 05.11.2014 um 07:50 schrieb Gerriet M. Denkmann : > >> I want to monitor a file for changed content. >> Polling is generally not a good idea, so I tried dispatch_source. >> >> But it does not work

when has AutoLayout finished its work?

2014-11-25 Thread Gerriet M. Denkmann
Document based Cocoa app; Window has CustomView inside ScrollView; uses autolayout. 10.10.1 Problem: the autolayout stuff keeps butting in and setting the frameSize of my CustomView to (0,0). So I need some method like: autolayoutHasFinishedItsWork, but cannot find such. windowDidLoad of DaysW

Re: when has AutoLayout finished its work?

2014-11-25 Thread Gerriet M. Denkmann
> On 26 Nov 2014, at 13:15, Ken Thomases wrote: > > On Nov 25, 2014, at 11:50 PM, Gerriet M. Denkmann > wrote: > >> Document based Cocoa app; Window has CustomView inside ScrollView; uses >> autolayout. 10.10.1 >> >> Problem: the autolayout stuff kee

Re: when has AutoLayout finished its work?

2014-11-26 Thread Gerriet M. Denkmann
> On 26 Nov 2014, at 13:15, Ken Thomases wrote: > > On Nov 25, 2014, at 11:50 PM, Gerriet M. Denkmann > wrote: > >> Document based Cocoa app; Window has CustomView inside ScrollView; uses >> autolayout. 10.10.1 >> >> Problem: the autolayout stuff kee

Re: when has AutoLayout finished its work?

2014-11-26 Thread Gerriet M. Denkmann
> > >> Finally I settled with: >> >> - (void)windowDidLoad >> { >> [super windowDidLoad]; >> [ self performSelector: @selector(updateFrame:) withObject: @(0) >> afterDelay: 1 ]; >> } >> >> This has the (small) disadvantage that the window initially shows a boring >> grey cu

Open Recent Crash

2014-12-13 Thread Gerriet M. Denkmann
Whenever I do in TextEdit: File → Open Recent I get a crash. Obviously the list of recent documents is somehow corrupted. So I renamed "~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist" to: "LSSharedFileList bad.plist", started TextEdit and got the same crash. Also got a new "LSSh

Observing changes in Table

2014-12-17 Thread Gerriet M. Denkmann
A TableView with an ArrayController which has an Array of MutableDictionaries; keys corresponding to TableColumns. The table is editable and the dictionary of the edited row gets changed. All as expected. But I want to know when any value of any row has been changed by the user, in order to upd

Re: Observing changes in Table

2014-12-17 Thread Gerriet M. Denkmann
> On 17 Dec 2014, at 18:32, Jerry Krinock wrote: > > >> On 2014 Dec 17, at 02:02, Gerriet M. Denkmann wrote: >> >> A TableView with an ArrayController which has an Array of >> MutableDictionaries; keys corresponding to TableColumns. >> The table is ed

How to make a TableColumn unsortable

2014-12-17 Thread Gerriet M. Denkmann
I tried: myTableColumn.sortDescriptorPrototype = nil; But clicking in the Header still sorts it. What am I missing? Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. C

AutoLayout

2014-12-24 Thread Gerriet M. Denkmann
OS X 10.10.1; Xcode Version 6.1.1 (6A2008a) A window has: Content View → NSSplitView top split NSView → NSBox → 2 NSTextFields + NSScrollView → NSClipView → NSTableView bottom NSView → NSBox → NSScrollView → NSClipView → NSTextView Xcode shows no warnings. App works fine, but the firs

Where are my bytes?

2015-04-04 Thread Gerriet M. Denkmann
When I look at " /Library/Dictionaries/Apple Dictionary.dictionary/Contents/Info.plist" in Finder, it shows a preview and says 5 kB. Ok. But: Finder → FIle → Get Info says: 4,893 bytes (Zero bytes on disk) And lstat shows: st_size = 4893 (file size, in bytes) st_blocks = 0 (

Re: Where are my bytes?

2015-04-04 Thread Gerriet M. Denkmann
; Gerriet. > Michael David Crawford, Consulting Software Engineer > mdcrawf...@gmail.com > http://www.warplife.com/mdc/ > > Available for Software Development in the Portland, Oregon Metropolitan > Area. > > > On Sat, Apr 4, 2015 at 2:23 AM, Gerriet M. D

Re: Where are my bytes?

2015-04-04 Thread Gerriet M. Denkmann
> On 4 Apr 2015, at 17:21, Ken Thomases wrote: > > On Apr 4, 2015, at 4:23 AM, Gerriet M. Denkmann wrote: > >> When I look at " /Library/Dictionaries/Apple >> Dictionary.dictionary/Contents/Info.plist" in Finder, it shows a preview and >> says 5 kB.

Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
OS X 10.10.2 NSString *string = @"abc 🚲 xyz";// BICYCLE = U+1F6B2 NSCharacterSet *charSet = [ NSCharacterSet characterSetWithCharactersInString: string ]; BOOL pq = [ charSet longCharacterIsMember: 0x1F6B2 ]; NSLog(@"%s CharacterSet from \"%@\" contains %s🚲

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
> On 6 Apr 2015, at 23:36, Charles Srstka wrote: > >> >> On Apr 6, 2015, at 11:19 AM, Gerriet M. Denkmann >> wrote: >> >> OS X 10.10.2 >> >> NSString *string = @"abc 🚲 xyz";// BICYCLE =

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
> On 6 Apr 2015, at 23:52, Steve Mills wrote: > > On Apr 6, 2015, at 11:45:52, Gerriet M. Denkmann wrote: >> >>> >>>>NSString *string = @"abc 🚲 xyz";// BICYCLE = U+1F6B2 >>> >> >> If this is so: why did my co

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
> On 7 Apr 2015, at 00:15, Quincey Morris > wrote: > > On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann wrote: >> >> Where is my bicycle gone? What am I doing wrong? > > Before this thread heads further into outer space… > > I suspect it [NSCharacte

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
> On 7 Apr 2015, at 03:42, Quincey Morris > wrote: > > On Apr 6, 2015, at 12:29 , Greg Parker wrote: >> >> my understanding is that when Cocoa says "character" it usually means >> "UTF-16 code unit". @"🚲".length == 2, for example. Cocoa's string API >> designed when Unicode was still a true

Re: Where is my bicycle?

2015-04-06 Thread Gerriet M. Denkmann
> On 7 Apr 2015, at 05:44, Greg Parker wrote: > > >> On Apr 6, 2015, at 11:15 AM, Gerriet M. Denkmann >> wrote: >> >> 2. characterSetWithCharactersInString seems to take only the lower 16 bits >> of the code points in the string. Bug. >> Wor

Re: Where is my bicycle?

2015-04-07 Thread Gerriet M. Denkmann
> On 7 Apr 2015, at 00:15, Quincey Morris > wrote: > > On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann wrote: > > A suggestion, though: > > Try building your character set using ‘characterSetWithRange:’ and/or the > NSMutableCharacterSet methods that add ranges,

Where is kUCHighSurrogateRangeStart in Swift 1.2

2015-04-09 Thread Gerriet M. Denkmann
Using Xcode 6.2 my Swift program compiled and run fine. Now Xcode 6.3 complains of unresolved identifier kUCHighSurrogateRangeStart. This is defined in: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/TextCommon.h . How to make S

UISearchResultsUpdating

2015-04-14 Thread Gerriet M. Denkmann
Using UISearchController with an UISearchBar with 3 scope buttons (xCode 6.3, iOS 8.3) I never get notified when the scope changes. The documentation about updateSearchResultsForSearchController in UISearchResultsUpdating says: “This method is automatically called whenever the search bar becom

My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
I created a new project, iOS, Master-Detail and edited Info.plist: Supported interface orientations = Portrait (bottom home button) and Portrait (top home button). Supported interface orientations (iPad) contains all 4 orientations (unchanged) Run on iPad → as expected But run on iPhone, only

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
> On 14 Apr 2015, at 21:21, Jens Alfke wrote: > > >> On Apr 14, 2015, at 4:57 AM, Roland King wrote: >> >> Read the manual. Excellent advice. I have been following this since hours. As to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none get

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
ne that > says Upside Down? > Only the first two: Portrait and Upside Down. > > > On Apr 14, 2015, at 10:35 AM, Gerriet M. Denkmann wrote: > >> >>> On 14 Apr 2015, at 21:21, Jens Alfke wrote: >>> >>> >>>> On Apr 14, 2015, at 4:5

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
tion. > > > > > On Apr 14, 2015, at 10:44 AM, Gerriet M. Denkmann wrote: > >> >>> On 14 Apr 2015, at 21:40, Alex Zavatone wrote: >>> >>> So, just to be clear, when you click on your Target iOS app and select >>> General in the main

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
> On 14 Apr 2015, at 22:00, Roland King wrote: > > >> On 14 Apr 2015, at 22:35, Gerriet M. Denkmann wrote: >> >> >>> On 14 Apr 2015, at 21:21, Jens Alfke wrote: >>> >>> >>>> On Apr 14, 2015, at 4:57 AM, Roland King wrote:

How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
On iPad (portrait orientation) there is on the left a MasterView, overlapping the DetailView. (i.e. splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView, the MasterView slides away. (i.e. splitViewController.displayMode → UISplitViewCont

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
> On 15 Apr 2015, at 08:59, Roland King wrote: > > >> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann wrote: >> >> On iPad (portrait orientation) there is on the left a MasterView, >> overlapping the DetailView. >>

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
Controller property. But then: how to get the UIStoryboardPopoverSegue ? Kind regards, Gerriet. > > Cheers, > Dave > >> On Apr 14, 2015, at 10:13 PM, Gerriet M. Denkmann >> wrote: >> >> >>> On 15 Apr 2015, at 08:59, Roland King wrote: >>> >>> >

Master - Detail: How to get back?

2015-04-14 Thread Gerriet M. Denkmann
Using the Xcode template: iOS - Master-Detail, the Detail view has (in the top left corner) a Back-Button, which works fine. Now I added another UIBarButtonItem called: “Do something and go back” connected to some IBAction in DetailViewController. But how to make it go back to the MasterView?

Re: Master - Detail: How to get back?

2015-04-15 Thread Gerriet M. Denkmann
> On 15 Apr 2015, at 14:51, Quincey Morris > wrote: > > On Apr 14, 2015, at 23:47 , Gerriet M. Denkmann wrote: >> >> Using the Xcode template: iOS - Master-Detail, the Detail view has (in the >> top left corner) a Back-Button, which works fine. >> &g

Re: Master - Detail: How to get back?

2015-04-15 Thread Gerriet M. Denkmann
> On 15 Apr 2015, at 15:37, Quincey Morris > wrote: > > On Apr 15, 2015, at 01:18 , Gerriet M. Denkmann wrote: >> >> In DetailViewController I added: >> >> - (IBAction)unwindToMainMenu:(UIStoryboardSegue*)sender > > I dunno offhand, but you origi

Re: How to remove iPad popover?

2015-04-15 Thread Gerriet M. Denkmann
> > > On Tue, Apr 14, 2015, at 11:49 PM, Gerriet M. Denkmann wrote: >> And if there is any way (easy or not) to get this (in a non-deprecated >> way), I would be very interested to hear about it. > > There is not. Please file a Radar. I filed two: 20549495 Unabl

Re: Master - Detail: How to get back?

2015-04-15 Thread Gerriet M. Denkmann
While my iPhone can use the “DoSomethingAndGoBackToMasterView” button fine, the same button does nothing for iPad. Of course iPad does not need an unwinding segue - both master and detail view are always visible (at least in landscape orientation). But the “DoSomething” part is still needed. C

Re: Master - Detail: How to get back?

2015-04-15 Thread Gerriet M. Denkmann
>> Can this be done? Or is there a better way to make my button work both >> for iPhone and iPad? > > Well, my first question is: can you just put your work in the > implementation of the unwind selector? That is the way the work is done. > The unwind itself will be a no-op > if the split view

Re: Master - Detail: How to get back?

2015-04-16 Thread Gerriet M. Denkmann
> On 16 Apr 2015, at 13:41, Roland King wrote: > > >> >> 5. Run >> >> iPhone - tapping on "Do & Back" prints: >> 2015-04-16 12:16:52.799 Dummi[28069:20737983] -[MasterViewController >> doSomethingAndBackToMaster:] did something with "2015-04-16 05:16:49 +", >> will do: [ perform]

Re: Master - Detail: How to get back?

2015-04-16 Thread Gerriet M. Denkmann
> On 16 Apr 2015, at 21:42, Kyle Sluder wrote: > > On Apr 15, 2015, at 10:49 PM, Gerriet M. Denkmann > wrote: >> >> >> >> >> 3.Run >> >> Run on iPhone: >> Back Button is called "Master" >> >> Run on i

How to remove Keyboard when UITableView gets scrolled

2015-04-18 Thread Gerriet M. Denkmann
I have a UITableView with a UISearchController. One types into the search field and the table is filled with appropriate entries. But only a small part of the table is visible, the rest is obscured by the keyboard. When one stops typing and starts scrolling the table it would be nice if the ke

Re: How to remove Keyboard when UITableView gets scrolled

2015-04-18 Thread Gerriet M. Denkmann
> On 18 Apr 2015, at 21:07, Michael Babin wrote: > >> On Apr 18, 2015, at 5:32 AM, Gerriet M. Denkmann >> wrote: >> >> Anyway: how can I detect that the table did start scrolling? >> Using a timer to periodically check the index of the top row seems

The Case of the Dancing Keyboard

2015-04-22 Thread Gerriet M. Denkmann
An UITableViewController with an UISearchController in iOS 8.3 When I click in the SearchBar the following dance happens: Keyboard comes; Keyboard goes away; Background becomes gray; Keyboard comes again and now stays. This is sort of difficult to see in the Simulator because it happens too

Re: The Case of the Dancing Keyboard

2015-04-26 Thread Gerriet M. Denkmann
> On 23 Apr 2015, at 12:04, Gerriet M. Denkmann wrote: > > > An UITableViewController with an UISearchController in iOS 8.3 > > When I click in the SearchBar the following dance happens: > Keyboard comes; > Keyboard goes away; > Background becomes gray; > Keyb

Re: The Case of the Dancing Keyboard

2015-04-27 Thread Gerriet M. Denkmann
normal. Sorry for the noise. Gerriet. > On Apr 27, 2015, at 2:04 AM, Gerriet M. Denkmann wrote: > >> >>> On 23 Apr 2015, at 12:04, Gerriet M. Denkmann wrote: >>> >>> >>> An UITableViewController with an UISearchController in iOS 8.3 >

Invalid amor - what does this mean?

2015-05-22 Thread Gerriet M. Denkmann
Using the STKaiti-SC-Black font (display name: Kaiti SC Black) (in TextEdit, Font Book, or whatever) I get lines like this: [some app] CoreText: Invalid ‘amor’ Subtable In name = STKaiti-SC-Black, size = 36.00, matrix = 0x0, descriptor = {attributes = {type = mutable dict, count = 1, entrie

10.10 replacement for SMJobCopyDictionary

2015-05-25 Thread Gerriet M. Denkmann
How to translate this into 10.10 without deprecation warnings? CFDictionaryRef diref = SMJobCopyDictionary( kSMDomainSystemLaunchd, “de.mdenkmann.MyTool” ); if ( diref == nil ) // MyTool is not running Gerriet. ___ Cocoa-dev mailing list (

Why is a comma considered unsafe?

2015-06-24 Thread Gerriet M. Denkmann
When I create a new TextEdit document, add a “-“ (aka. HYPHEN-MINUS), select this “-“ and then move the cursor inside the window I will see in Console.app 10 lines like: 24/06/2015 21:44:17.319 Han Radicals[20349]: _NSExtensionIsSafeExpressionForObjectWithSubquerySubstitutions: Expression cons

How to get Unicode's "General Category" of a character?

2015-07-07 Thread Gerriet M. Denkmann
Given a character (a Unicode code point, to be exact) like U+FF0B (FULLWIDTH PLUS SIGN), I want to know the General Category of this. For this example it would be “Sm" (aka. Math_Symbol or Symbol, Math). I could download the current version of UnicodeData.txt and parse it. But this looks not very

Re: How to get Unicode's "General Category" of a character?

2015-07-07 Thread Gerriet M. Denkmann
. Do I have to download the source from ICU? Kind regards, Gerriet. > > >> On Jul 7, 2015, at 8:03 AM, Gerriet M. Denkmann wrote: >> >> Given a character (a Unicode code point, to be exact) like U+FF0B (FULLWIDTH >> PLUS SIGN), I want to know the General Category

How to zoom with auto layout?

2015-07-29 Thread Gerriet M. Denkmann
10.10.4 I want to zoom (width only) my NSView and want the mid-point of the view to be still in the mid after zooming. The following code works - but only if zooming slowly. How can one avoid the performSelector:afterDelay ? Is there some notification like NSLayoutHasBeenDoneNotification ? I tri

Unsigned Modulo

2015-08-12 Thread Gerriet M. Denkmann
OS X 10.10.4, Xcode 7 beta 3 This code produces some (for me) unexpected results: NSUInteger unsignedSize = 3; NSInteger signedSize = 3; for ( NSInteger rawValue = -6; rawValue < 5; rawValue++ ) { NSInteger modValueU = rawValue; NSInteger modValueS = rawValue; modValueU %

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

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

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. ___

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

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

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

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

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

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

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

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

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

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

Printing to NSData

2009-09-18 Thread Gerriet M. Denkmann
I am doing: NSPrintOperation *po = [ NSPrintOperation printOperationWithView: textView printInfo: printInfo ]; ... PDFDocument *pdfFile = [ [ PDFDocument alloc ] initWithURL: pdfUrl ]; ... do some post-processing here Works fine, but looks rather inefficient, as file-IO is probably the slow

Re: Printing with Snow Leopard

2009-09-18 Thread Gerriet M. Denkmann
ad. 2. Create another view and set it up with the content from your UI. Use this view for printing on a background thread. Thanks for this suggestion. I will try it, when the blocking becomes annoying. -raleigh On Sep 12, 2009, at 6:18 AM, Gerriet M. Denkmann wrote: On 11 Sep 2009, at 21:

Re: Printing to NSData

2009-09-21 Thread Gerriet M. Denkmann
On 22 Sep 2009, at 00:57, David Duncan wrote: On Sep 18, 2009, at 8:35 PM, Gerriet M. Denkmann wrote: Is this a bug or did I miss some magical incantation here? No incantation you've missed. Unless you want to do the pagination and assembly yourself (you probably don't) you wi

Creator Codes in Snow Leopard

2009-09-23 Thread Gerriet M. Denkmann
It has been already discussed that Snow Leopard started to ignore Creator Codes. The user can fix this by selecting a document in Finder and doing File → Get Info → Open With. But it would be much better, if my app could do this itself. So I looked at Launch Services Reference, but could not

Mysterious Snow Crash

2009-09-23 Thread Gerriet M. Denkmann
An app which did run fine since Panther, now crashes in Snow Leopard: -[MyDocument windowControllerDidLoadNib:] done -[HSFDelegate applicationDidFinishLaunching:] done Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all (gdb) bt #0 0x91cbf6b2 in _LSAcquireIconRefFor

How to do what Finder does programmatically

2009-09-23 Thread Gerriet M. Denkmann
On 24 Sep 2009, at 00:51, Scott Anguish wrote: Just so there is no mistake. Discussion of the removal of creator codes, merit of creator codes, etc, isn’t appropriate for here. I don’t have a suggestion for a better location for you to discuss it. Scott [moderator] I am sorry to have

Re: Mysterious Snow Crash

2009-09-23 Thread Gerriet M. Denkmann
On 24 Sep 2009, at 05:08, Kyle Sluder wrote: On Wed, Sep 23, 2009 at 2:47 PM, Gerriet M. Denkmann wrote: Program received signal: “EXC_BAD_ACCESS”. Immediate indication you should run with zombies enabled and try again. Did this. Got same result, same backtrace. As it crashes in

Re: How to do what Finder does programmatically

2009-09-23 Thread Gerriet M. Denkmann
On 24 Sep 2009, at 09:02, cocoa-dev-requ...@lists.apple.com wrote: On 24 Sep 2009, at 00:51, Scott Anguish wrote: Just so there is no mistake. Discussion of the removal of creator codes, merit of creator codes, etc, isnâ•˙t appropriate for here. I donâ•˙t have a suggestion for a better loca

Re: Mysterious Snow Crash

2009-09-23 Thread Gerriet M. Denkmann
On 24 Sep 2009, at 09:12, Kyle Sluder wrote: On Wed, Sep 23, 2009 at 6:59 PM, Graham Cox wrote: (gdb) po *(id*)($ebp+4) Of course this will only work when building i386, not x86_64. On x86_64, I would break on _LSAcquireIconRefForURL and do `po $rdi`. Looking at the disassembly, the first

Re: Mysterious Snow Crash

2009-09-24 Thread Gerriet M. Denkmann
On 24 Sep 2009, at 13:15, Bill Bumgarner wrote: On Sep 23, 2009, at 10:52 PM, Gerriet M. Denkmann wrote: NSLog(@"%s setting url to Downloads; was %@",__FUNCTION__, [self fileURL]); // was: file://localhost/dev/rdisk1s10 Wait. What? Where the HECK did tha

iPhone to Mac Synchronization

2009-09-24 Thread Gerriet M. Denkmann
I am thinking about an iPhone app which (while it is running) collects data and stores it into some file. And there should be a Mac app, which, when the iPhone is connected to the computer, transfers the collected data to the Mac. Like iPhoto does with photos. Is this possible? Or are iTunes

Re: Static Analyzer Question

2009-09-30 Thread Gerriet M. Denkmann
On 30 Sep 2009, at 09:13, Greg Parker wrote: The static analyzer tries to enforce Cocoa's memory management convention, where the retain-edness of the return value depends on the name of the method. By that convention, if the method name contains "new" or "copy" or "alloc" then the return valu

NSValueTransformer Loop

2009-10-02 Thread Gerriet M. Denkmann
I have an NSStepper with maxValue bound to myarr...@count, minValue fixed at 1. value bound to myArrayController selectionIndex and a PlusOneTransformer. Works fine. Also an NSTextField with value bound to myArrayController selectionIndex and a PlusOneTransformer. Looks also ok. But wh

Re: How to iterate over all objects stored with NSCoder

2009-10-13 Thread Gerriet M. Denkmann
On 13 Oct 2009, at 16:56, Michael Robinson wrote: As I lost the source code, I would like to know if there is a way to dump all keys/values from NSCoder so I can use it to help me with my arduous rewrite. Is it possible to do this? Probably. How? Reverse engineer the format. I'll kee

Problems with Thai Fonts in 10.6.1

2009-11-04 Thread Gerriet M. Denkmann
When I write ก๊ัม in TextEdit with the Thonburi font, the vowel and the tone mark get superimposed and form one ugly and unreadable blob (the tone mark should be on drawn above the vowel). And when I write ฟำฝำปำฬำ with Ayuthaya and Silom fonts the ำ are all invisible. None of these pro

performFindPanelAction: in WebView

2010-03-23 Thread Gerriet M. Denkmann
The documentation says about performFindPanelAction: in WebView: "An action method that opens the Find menu and Find panel." In my app though, the only thing it does is beeping (Jump to Selection works, all other MenuItems are gray). The following code: id d = [ NSApp ta

Re: code folding in NSTextView

2010-03-24 Thread Gerriet M. Denkmann
On 25 Mar 2010, at 00:02, Martin Hewitson wrote: > I guess this is an old chestnut, but a google search didn't reveal any good > clues as how one might go about doing code folding in an NSTextView subclass. > > So, does anyone have any suggestions how one might implement such a feature? > Th

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Gerriet M. Denkmann
On 25 Mar 2010, at 10:16, Jerry Krinock wrote: > The font cascade list is mentioned briefly in "Core Text Programming Guide", > but there is no clue as to how to access it. > > Any documentation references on these topics would be appreciated! I have no documentation references but I do it li

Punching holes into IKImageView

2010-04-05 Thread Gerriet M. Denkmann
I have an IKImageView and would like to create holes, i.e. set alpha to zero in some rectangle. And then save the result in some format. What would be the easiest way to do this? 1. Create a CIFilter and do: myIkImageView.imageCorrection = myHoleFIlter save myIkImageView 2.

IKImageView delegate

2010-04-10 Thread Gerriet M. Denkmann
The documentation (updated this morning) says: "An IKImageView object’s delegate [...] is informed of various actions by the image view through delegation messages." This begs the question: What are these "delegation messages" and where are they documented? Also: IKImageView seems to understan

CIContext in 10.6

2010-04-12 Thread Gerriet M. Denkmann
This works (but is deprecated in 10.6): NSOpenGLPixelFormat *pixelFomat = CGLPixelFormatObj b = [ pixelFomat CGLPixelFormatObj ]; CGLContextObj a = CGLGetCurrentContext(); ciContext = [ CIContext contextWithCGLContext:

Re: IKImageView delegate

2010-04-12 Thread Gerriet M. Denkmann
On 12 Apr 2010, at 21:39, Brian Postow wrote: > > On Apr 10, 2010, at 2:13 AM, Gerriet M. Denkmann wrote: > >> The documentation (updated this morning) says: "An IKImageView object’s >> delegate [...] is informed of various actions by the image view through >>

Re: CIContext in 10.6

2010-04-12 Thread Gerriet M. Denkmann
On 12 Apr 2010, at 21:55, Jean-Daniel Dupas wrote: > > Le 12 avr. 2010 à 16:39, Gerriet M. Denkmann a écrit : > >> >> This works (but is deprecated in 10.6): >> >> NSOpenGLPixelFormat *pixelFomat = >> CGLPixelForma

NSKeyedArchiver and NSPoints

2010-04-28 Thread Gerriet M. Denkmann
The following code raise an exception: NSPoint p = NSMakePoint( 47, 11 ); NSValue *v = [ NSValue valueWithPoint: p ]; NSArray *a = [ NSArray arrayWithObject: v ]; NSData *d = [ NSKeyedArchiver archivedDataWithRootObject: a ]; // *** -[NSKeyedArchiver e

UIPickerView and MKMapView

2010-05-05 Thread Gerriet M. Denkmann
I have an MKMapView to which I add a subview. This subview contains a UISegmentedControl, which can be clicked. And a UISlider which can be slidden (if such a word exists). And also a UIPickerView which stubbornly refuses to act. When I try to move the slot machine wheel, it does not budge, but

Font in TextFieldCell in Matrix

2011-08-10 Thread Gerriet M. Denkmann
NSTextField does NOT accept my font. NSTextFieldCell *cell = [ matrix selectedCell ]; NSLog(@"%s cell %@",__FUNCTION__, cell); > cell NSFont *font = [ NSFont fontWithName: @"Osaka-Mono" size: 14 ]; NSLog(@"%s font %@",__FUNCTION__, font); > font "Osaka-Mono 14.00 pt. P [] (0x10052a37

Re: Font in TextFieldCell in Matrix

2011-08-10 Thread Gerriet M. Denkmann
On 10 Aug 2011, at 23:17, Jens Alfke wrote: > > On Aug 10, 2011, at 2:21 AM, Gerriet M. Denkmann wrote: > >> Where is my Osaka font gone? >> What am I doing wrong? > > The only thing I can think of is that the text system is deciding that Osaka > doesn’t have

NSDate description in Lion shows GMT instead of local time

2011-08-26 Thread Gerriet M. Denkmann
The documentation says about -[NSDate description]: "The representation is not guaranteed to remain constant across different releases of the operating system." NSLog(@"someDate: %@", someDate ); Formerly did print the time in the local time zone. Which is a very sensible thing to do. But Li

Blocked in NSFileCoordinator

2011-08-28 Thread Gerriet M. Denkmann
I have a document based app which collects data and updates its document. Works fine in Snow Leopard, hangs in Lion. At start it blocks (see sample at end of post). This initial hang can be avoided, if for the first 3 seconds after launch no saves are allowed. (Rather a crude hack). But even th

Re: Blocked in NSFileCoordinator

2011-08-29 Thread Gerriet M. Denkmann
On 29 Aug 2011, at 22:05, Kyle Sluder wrote: > Saving during loading will now deadlock on Lion, since you're trying to do a > coordinated write while NSDocumentController still has a coordinated read on > your file. Don't save while loading. > > Does -takkeEvent: happen in response to NSUndoMa

keylayout in Lion

2011-09-04 Thread Gerriet M. Denkmann
I have created: /Library/Keyboard Layouts/MyVeryOwn.keylayout (following Technical Note TN2056). This keyboard has always been working and also works in Lion. But: When I press the key 'e' for a long time, there is no list of accented characters popping up. So: what has to be added to MyVeryO

how to get baseline info

2011-09-12 Thread Gerriet M. Denkmann
I have a subclass of NSTextView which does: - (void)setUpData { [ [ self textStorage ] setAttributedString: someAttributedString ]; // uses self.usedFont NSLayoutManager *layoutManager = [ self layoutManager ]; baselineOffset = [ layoutManager defaultBaselineOf

strange values for boundingRectForGlyphRange with SE-Asian fonts

2011-09-12 Thread Gerriet M. Denkmann
I get the bounding rect for all glyphs in my TextView subclass and display them. Looks perfect: the boxes snugly fit the characters. But when a line contains any Thai character (similar for Laos, Burma, Khmer) then the boxes are strangly wide. Why? Is there some good reason for this? Or am I doi

How to subscribe to Xcode users list?

2011-09-14 Thread Gerriet M. Denkmann
Several Apple pages have links to or , but when I try to open these pages I get: "The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly. You migh

Re: How to subscribe to Xcode users list?

2011-09-14 Thread Gerriet M. Denkmann
On 14 Sep 2011, at 22:26, Andy Lee wrote: > Yup, I sent feedback about it a while back, to both the official feedback > address and a non-official person. If you start from http://lists.apple.com > and drill down I think you'll get where you want (though I have not tested > subscribing). The

why does print block in Lion?

2011-09-17 Thread Gerriet M. Denkmann
In my TestDocument (subclass of NSDocument) I added the following code (see comments inside, which explain what's happening when I do File → Print...): - (NSPrintOperation *)printOperationWithSettings:(NSDictionary *)printSettings error:(NSError **)outError { NSLog(@"%s printSettings %@

<    1   2   3   4   5   6   7   8   9   10   >