Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Gerriet M. Denkmann
Core Data model with two entities: A and B. A has property aValue and a relation theBs to one or more Bs. B has a property bValue. Two NSTableViews (tabelView1 and tableView2 ) with each controlled by an NSArrayController (arrayController1 and arrayController2). Everything works fine when I se

NSTabView Bindings

2009-12-21 Thread Gerriet M. Denkmann
I am trying to bind "editable" of an NSTableColumn to ObjectController tabView.selectedIndex (The tab view has two items: Read and Edit. When the first item is selected, my table column should not be editable). But I am told: [ valueForUndefinedKey:]: this class is not key value coding-complia

Re: Core Data _NSFaultingMutableSet Exception

2009-12-21 Thread Gerriet M. Denkmann
On 22 Dec 2009, at 13:38, Graham Cox wrote: > > On 22/12/2009, at 4:05 PM, Gerriet M. Denkmann wrote: > >> When later I reset the filterPredicates back to the simple (working) mode, I >> get another exception: >> HIToolbox: ignoring exception 'Cannot remove a

Re: Core Data _NSFaultingMutableSet Exception

2009-12-22 Thread Gerriet M. Denkmann
On 22 Dec 2009, at 16:20, Jerry Krinock wrote: > On 2009 Dec 21, at 21:05, Gerriet M. Denkmann wrote: > >> But when I use: >> [ arrayController1 setFilterPredicate: "aValue BEGINSWITH[n] "a" AND ANY >> theBs.bValue == "xx""]; >

Return in NSSearchField

2010-01-03 Thread Gerriet M. Denkmann
The docs say: " By default, the cell’s action is invoked during typing after a short delay." And it also "sends the action message when the user presses the Return key". Both are things I like as they are. But: I would also like to know, whether the action was send because the user did press

Re: Is it possible to change the color of selected columns in NSTableView?

2010-01-07 Thread Gerriet M. Denkmann
On 8 Jan 2010, at 00:35, Andreas K?nner wrote: > > I want to change the default dark blue color for selected columns in > NSTableView to a light gray. Is this possible at all? In order make selected cells light blue I use a subclass of NSTextFieldCell which has only one method: - (NSColor *

pointer being freed was not allocated when rotating an iPhone

2010-01-11 Thread Gerriet M. Denkmann
When I rotate my iPhone in the Simulator, I get: ... malloc: *** error for object 0x1091000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug (gdb) bt #0 0x980d2072 in malloc_error_break () #1 0x97fe1303 in free () #2 0x0015ce49 in dataReleaseInfo () #3

Re: pointer being freed was not allocated when rotating an iPhone

2010-01-11 Thread Gerriet M. Denkmann
On 11 Jan 2010, at 19:24, Jonathan del Strother wrote: > 2010/1/11 Gerriet M. Denkmann : >> When I rotate my iPhone in the Simulator, I get: >> >> ... malloc: *** error for object 0x1091000: pointer being freed was not >> allocated >> *** set a breakpoint in ma

Gray Scope Buttons in UISearchBar

2010-01-12 Thread Gerriet M. Denkmann
I have an iPhone app which has a UISearchBar with Scope Buttons. But when I change the colour of the UISearchBar (e.g. to Black Opaque) the scope buttons still are displayed in the default gray. How can I change the color of the scope buttons to be the same (or similar) as the UISearchBar? A re

copy on iPhone

2010-01-20 Thread Gerriet M. Denkmann
I have put a MyWebView (subclass of UIWebView) into my app. MyWebView.m only has: - (void)copy:(id)sender { NSLog(@"%s %@",__FUNCTION__, sender); [ super copy: sender ]; } The problem: this never gets called. What I am trying to accomplish: When the uses presses a link (which in

executeFetchRequest with BETWEEN

2010-02-13 Thread Gerriet M. Denkmann
I would like to get some entities (in iPhone 3.1.3). So I do: NSNumber *sta = ... NSLog(@" sta %@ %@ %p", sta, [sta class],sta); // sta 6 NSCFNumber 0x3b3a690 NSNumber *las = ... NSArray *limits = [ [ NSArray alloc ] initWithObjects: sta, las, nil ]; predicate = [ NSPredicate predicateWith

Re: executeFetchRequest with BETWEEN

2010-02-14 Thread Gerriet M. Denkmann
> I would like to get some entities (in iPhone 3.1.3). So I do: > > NSNumber *sta = ... > NSLog(@" sta %@ %@ %p", sta, [sta class],sta);// sta 6 > NSCFNumber 0x3b3a690 > NSNumber *las = ... > > NSArray *limits = [ [ NSArray alloc ] initWithObjects: sta, las, nil ]; > predicate = [

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

Annotations in MKMapView

2010-08-02 Thread Gerriet M. Denkmann
I have an MKMapView which has about 700 annotations which represent bus-lines. That implies, they are not images, but are drawn as lines. In iOS 3 this worked fine. When the user changed the zoom level, these lines did no longer match their streets, but in mapView:regionDidChangeAnimated: I sent

iOS 4: CGImageCreateWithImageProvider

2010-08-02 Thread Gerriet M. Denkmann
When I run the Apple Sample Code "CurrentAddress" on my iPhone (4.0.1) I always get: Tue Aug 3 13:50:52 da CurAddress[679] : CGImageCreateWithImageProvider: invalid image size: 0 x 0. What does this mean? What can I do about this? Kind regards, Gerriet. __

MKMapView

2010-08-05 Thread Gerriet M. Denkmann
I have an MKMapView which sometimes does: [ mapView addSubview: selectorView ]; and selectorView contains a UIPickerView. 1. When I interact with the pickerView, sometimes the mapView does seem to get events which are really meant for the pickerView and consequently displays annotation l

Re: MKMapView

2010-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2010, at 00:03, Fritz Anderson wrote: > On 5 Aug 2010, at 2:57 AM, Gerriet M. Denkmann wrote: > >> I have an MKMapView which sometimes does: >> [ mapView addSubview: selectorView ]; >> and selectorView contains a UIPickerView. > > I'm not sur

addOverlays but mapView:viewForOverlay: never called

2010-08-09 Thread Gerriet M. Denkmann
I have an MKMapView which does addOverlays: but it's delegate MKMapViewDelegate method mapView:viewForOverlay: is never called. The overlays receive the message boundingMapRect: - (MKMapRect)boundingMapRect { MKMapPoint lowerLeft = MKMapPointForCoordinate(minC); MKMapPoint upper

Apple Sample Code GLES2Sample problems

2010-09-15 Thread Gerriet M. Denkmann
1. When I build the Apple Sample Code GLES2Sample (for iOS 4.1) in Xcode 3.2.4 for the Device with "Run Static Analyzer" checked the analyser tells me about destroyShaders() in Shaders.m that "the value stored to vertShader is never read". The Apple code is: /* delete shader resources */ void

How to get selected text in a WebView

2010-10-04 Thread Gerriet M. Denkmann
I have a Webview, and I want to do something with the selected text. I tried: DOMRange *dr = [ webView selectedDOMRange ]; NSString *m = [ dr markupString ]; this contains the selected characters, but buried in lots of markup language. But I just want the characters. NSString *s= [ dr stringRep

Re: How to get selected text in a WebView

2010-10-04 Thread Gerriet M. Denkmann
On 5 Oct 2010, at 00:45, Keary Suska wrote: > On Oct 4, 2010, at 1:15 AM, Gerriet M. Denkmann wrote: > >> I have a Webview, and I want to do something with the selected text. >> >> I tried: >> DOMRange *dr = [ webView selectedDOMRange ]; >> NSString *m = [

Re: How to get selected text in a WebView

2010-10-05 Thread Gerriet M. Denkmann
rriet. > > On 10/04/2010 12:15 AM, "Gerriet M. Denkmann" wrote: > >> I have a Webview, and I want to do something with the selected text. >> >> I tried: >> DOMRange *dr = [ webView selectedDOMRange ]; >> NSString *m = [ dr markupString ]; >

Editing a TableView

2010-10-16 Thread Gerriet M. Denkmann
I have got a window with an NSTableView which uses a data source. The table has two colums labeled Key and Value. It shows the keys and values of an NSMutableDictionary. The data source method is: - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn r

Re: Heapshot Analysis to find Memory Accretion (Leaks)

2010-10-18 Thread Gerriet M. Denkmann
On 18 Oct 2010, at 19:56, Bill Bumgarner wrote: > I wrote up an article on how to use the "Mark Heap" / "Heapshot > Analysis" tools in Instruments to detect, analyze, and fix memory leaks, > including those that leaks can't find. > > > http://www.friday.com/bbum/2010/10/17/when-i

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Gerriet M. Denkmann
On 19 Oct 2010, at 00:54, Alex Kac wrote: > NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; > NSString* am = [[[formatter AMSymbol] substringToIndex:1] > lowercaseString]; Please note that substringToIndex does only sometimes return a valid string. I just tried: NSS

Unhidable App

2010-11-01 Thread Gerriet M. Denkmann
I have an App which runs for a long time without problems. But sometimes (after several days, never directly after start) it does no longer hide. Clicking "Hide myApp" just does nothing. One can still open and close windows, and everything works fine. But it stubbornly refuses to hide. Console.

Re: Unhidable App

2010-11-02 Thread Gerriet M. Denkmann
On 2 Nov 2010, at 11:41, Kyle Sluder wrote: > On Nov 1, 2010, at 9:33 PM, "Gerriet M. Denkmann" > wrote: > >> 02/11/2010 09:18:20EnTeP[149]HIToolbox: ignoring exception >> '-[NSConcreteNotification invalidate]: unrecognized selector sent to

sizeof a function

2010-11-09 Thread Gerriet M. Denkmann
These lines: typedef char *(*my_type)(const char *, int); my_type some = index; fprintf(stderr,"sizeof(index): %lu\n", sizeof(index)); fprintf(stderr,"sizeof(some): %lu\n", sizeof(some)); produce: sizeof(index): 1 sizeof(some): 8 This is x86_64 so the pointer-size should be 8 bytes. But why is

Re: label color

2010-12-10 Thread Gerriet M. Denkmann
On 10 Dec 2010, at 21:36, cKyle Sluder wrote: > > > [back on list] > > On Thu, Dec 9, 2010 at 4:22 PM, Ariel Feinerman wrote: >> Don`t worry, I know the C ;-) >> I mean scheme of colors (where 0x000E is green, blue, so on) > > Ohh. Sorry, can't help ya there. :) I'm sure someone's figured i

Memory, Swap used by whom?

2012-03-13 Thread Gerriet M. Denkmann
Is there a Cocoa method which gives me to any (physical) memory address the status - like "used by process a" or: "shared by processes a, b, ..., z" or "free"? And also I would like to know, which processes have things swapped out. If there is no Cocoa way, any C-Api would be welcome as well.

Re: Memory, Swap used by whom?

2012-03-14 Thread Gerriet M. Denkmann
On 14 Mar 2012, at 23:45, Jens Alfke wrote: > > On Mar 13, 2012, at 11:09 PM, Gerriet M. Denkmann wrote: > >> Is there a Cocoa method which gives me to any (physical) memory address the >> status - like "used by process a" or: "shared by processes a, b,

How to become root

2012-03-16 Thread Gerriet M. Denkmann
I have an app which needs to do (among other things) to call task_for_pid() which seems to work only for root. The modern way to do this is have a small companion tool which exchanges info with my app via XPC. Correct? I am also thinking about sandboxing (just as a learning experience). Or is

Re: How to become root

2012-03-16 Thread Gerriet M. Denkmann
On 16 Mar 2012, at 19:17, Jean-Daniel Dupas wrote: > > Le 16 mars 2012 à 12:33, Gerriet M. Denkmann a écrit : > >> I have an app which needs to do (among other things) to call task_for_pid() >> which seems to work only for root. >> >> The modern way to do th

Re: How to become root

2012-03-16 Thread Gerriet M. Denkmann
On 17 Mar 2012, at 05:56, Prime Coderama wrote: > Shouldn't the the SMJobBless example be used? Although I am still struggling > to get this to work - even have an open Apple support issue. > I just build SMJobBless. Didn't work. Then I changed "Joe Developer" with some iPhone Provisioning cer

How to get Mac codesign certificate?

2012-03-17 Thread Gerriet M. Denkmann
I am a registered developer. And I paid 80€ to get the permission to mess around with my iPhone for one year. I am NOT interested in the Mac app Store, and I do NOT want to pay another 80€. But I want to codesign my OS X apps. So how do I get the necessary certificate? Kind regards, Gerriet.

Re: How to get Mac codesign certificate?

2012-03-17 Thread Gerriet M. Denkmann
On 17 Mar 2012, at 22:41, Roland King wrote: > >> One other alternative may be the Developer ID initiative that Apple has >> announced as part of OS X 10.8 Mountain Lion, but I can't figure out if >> that's still under NDA and don't want to incur the wrath of the mods :-) > I assumed thats wh

Re: How to get Mac codesign certificate?

2012-03-17 Thread Gerriet M. Denkmann
> > The SMJobBless example code has a ReadMe.txt file that explains how to make a > self-signed certificate, and how to set up the project to use it. It worked > correctly when I tried it. > > https://developer.apple.com/library/mac/#samplecode/SMJobBless/Listings/ReadMe_txt.html I got it wor

SMJobBless - how to start helper tool?

2012-03-18 Thread Gerriet M. Denkmann
Messing around with the Apple sample project SMJobBless, I got the SMJobBless() function to work. I.e. my helper tool is blessed and gets copied to: /Library/PrivilegedHelperTools/de.mdenkmann.SMJobBlessHelper . But how to start the helper tool? (Nothing shows up in Activity Monitor, nothing is

How to use NSArchiver with ARC?

2012-03-28 Thread Gerriet M. Denkmann
- (void)encodeWithCoder:(NSCoder *)coder { if ( [coder allowsKeyedCoding] ) { [ coder encodeObject: self.name forKey: @"Name" ]; } else { [ coder encodeObject: self.name ]; <--- ARC does complain } } So: what to

Re: How to use NSArchiver with ARC?

2012-03-28 Thread Gerriet M. Denkmann
On 28 Mar 2012, at 21:49, Roland King wrote: > What's the error message? "ARC does complain" doesn't quite say. Uhhh... Sorry. Was a simple Typo which I discovered while trying to recreate the error message. Sorry for the noise. Gerriet. ___ Co

TextView cannot Use Selection for Find

2012-04-07 Thread Gerriet M. Denkmann
I have a window with an NSTextView (inside a ScrollView). Everything works as expected, but when I select some text and do command-e it just beeps. Same for Find Next and Find Previous. (Edit → Find → has these commands grayed out). Using Find Bar or Find Panel makes no difference. Making it edit

Re: TextView cannot Use Selection for Find

2012-04-07 Thread Gerriet M. Denkmann
On 7 Apr 2012, at 17:32, Stephane Sudre wrote: > On Sat, Apr 7, 2012 at 10:23 AM, Gerriet M. Denkmann > wrote: >> I have a window with an NSTextView (inside a ScrollView). >> Everything works as expected, but when I select some text and do command-e >> it just beeps. &

Why get my constraints broken?

2012-04-10 Thread Gerriet M. Denkmann
I have a xib-file with an NSView (content view of a tab of an NSTabView) called TabTextView. Inside this TabTextView I have an NSScrollView (containing an NSTextView) called ScrollText which: - has a top vertical distance to it's superView (TabTextView) of 12 - has a height of 33 or more - has

Cannot autosave a TableView without headers

2012-04-10 Thread Gerriet M. Denkmann
I have an NSTableView which should NOT show headers ( so I deselected in Xcode 4.3.2 the Headers checkbox. But now it no longer autosaves it's data. Checked the Headers checkbox again - now it autosaves as expected. Why? What is the magic connection between showing headers and autosaving? Kin

Re: Webview cache location

2012-04-13 Thread Gerriet M. Denkmann
On 14 Apr 2012, at 02:00, Nick Zitzmann wrote: > The cache database is stored at ~/Library/Caches/[your app bundle identifier > here]/Cache.db assuming it's not sandboxed. I just looked at ~/Library/Caches/[my app bundle identifier here]/ which contains com.apple.opencl/com.apple.ocl.64.data

Re: Webview cache location

2012-04-13 Thread Gerriet M. Denkmann
On 14 Apr 2012, at 08:08, Nick Zitzmann wrote: > On Apr 13, 2012, at 6:01 PM, Gerriet M. Denkmann wrote: > >> I just looked at ~/Library/Caches/[my app bundle identifier here]/ >> >> which contains com.apple.opencl/com.apple.ocl.64.data + >> com.apple.ocl.64.m

How to cancel an NSInvocationOperation

2012-04-16 Thread Gerriet M. Denkmann
I have this code: NSMethodSignature *ms = [ self methodSignatureForSelector: @selector(someMethod:) ]; NSInvocation *inv = [NSInvocation invocationWithMethodSignature: ms ]; [ inv retainArguments ]; [ inv setSelector: @selector(someMethod:) ]; [ inv setTarget: self ]; [ inv setArgument: &a atInd

My app thinks it is a phone. Why?

2012-05-05 Thread Gerriet M. Denkmann
My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a window, just two objects, one of this is an UIApplicationDelegate. This UIApplicationDelegate has: - (void)applicationDidFinishLaunching:(UIApplication *)application { NSLog(@"%s %u",__FUNCTION__,[[UIDevice curren

Re: My app thinks it is a phone. Why?

2012-05-07 Thread Gerriet M. Denkmann
On 8 May 2012, at 01:08, David Duncan wrote: > On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote: > >> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a >> window, just two objects, one of this is an UIApplicationDelegate. >> >>

Pinching an iPad

2012-05-14 Thread Gerriet M. Denkmann
I have an app which can be pinched and zoomed on an iPhone and on the iPhone Simulator. But it can not be zoomed or pinched on iPad or iPad Simulator. Obviously there is some hidden switch somewhere like: AllowPinchingOnIPad = NO. By the way: the view to be zoomed is an MKMapView. iOS 5.1.1 Xc

Re: Pinching an iPad

2012-05-14 Thread Gerriet M. Denkmann
rcles. > > If neither of those things, I have no ideas, it should work. > > On May 15, 2012, at 12:26 PM, Gerriet M. Denkmann wrote: > >> I have an app which can be pinched and zoomed on an iPhone and on the iPhone >> Simulator. >> >> But it can

Re: Pinching an iPad

2012-05-16 Thread Gerriet M. Denkmann
On 15 May 2012, at 23:18, David Rowland wrote: > Have you turned on "Multitasking Gestures" in the iPad General Settings? > Yes, I have. > On May 14, 2012, at 9:26 PM, Gerriet M. Denkmann wrote: > >> I have an app which can be pinched and zoomed on an iPhone and

CurrentAddress on iPad

2012-05-16 Thread Gerriet M. Denkmann
I build the Apple Sample Code CurrentAddress and it works as expected. Then I changed Build Settings → Deployment → Targeted Device Family to: iPhone/iPad. Now I can neither zoom nor pinch not pan the displayed map in the iPad Simulator. (It still works as expected in the iPhone Simulator) Wh

Re: CurrentAddress on iPad

2012-05-16 Thread Gerriet M. Denkmann
ked. (Many thanks to David Duncan for this information). No need to have multiple xibs for iPad and iPhone. (At least not for this project). > > On May 16, 2012, at 5:40 PM, Gerriet M. Denkmann wrote: > >> >> I build the Apple Sample Code CurrentAddress and it works a

Arc and autorelease

2012-05-24 Thread Gerriet M. Denkmann
Without Arc, this: NSString *s = [ [ NSString alloc ] initWithFormat: ...]; [ someCollection addObject: s ]; [ s release ]; is clearly more efficient (because not using autoreleasepools) than: NSString *s = [ NSString stringWithFormat: ...]; [ someCollection addObject: s ]; But what about Arc?

Multiple Inheritance

2012-05-24 Thread Gerriet M. Denkmann
I have an abstract class M with subclasses MAB, MAX, MXB. There are several lengthy methods A which are used in MAB and MAX, and others methods B which are used in MAB and MXB. Methods A use a property NSUInteger index. Class MXB has no such property, is has NSIndexSet *indices instead. Similar

Re: Multiple Inheritance

2012-05-24 Thread Gerriet M. Denkmann
On 24 May 2012, at 17:37, Graham Cox wrote: > Turn it into two separate protocols instead, and adopt whichever protocols > are needed in the concrete implementations. Or if one protocol is a superset > of the other, a protocol can extend another. I thought that a protocol only declares methods

DisplayName not shown

2012-05-25 Thread Gerriet M. Denkmann
I have a Document based app, which successfully uses setDisplayName: . But when the app restarts, it does: - (void)restoreStateWithCoder:(NSCoder *)coder { [ super restoreStateWithCoder: coder ]; NSString *s = [ coder decodeObjectForKey: @"DisplayName" ]; [ self setDispla

Re: DisplayName not shown

2012-05-26 Thread Gerriet M. Denkmann
On 26 May 2012, at 23:03, Quincey Morris wrote: > On May 25, 2012, at 23:26 , Gerriet M. Denkmann wrote: > >> But when the app restarts, it does: >> >> - (void)restoreStateWithCoder:(NSCoder *)coder >> { >> [ super restoreStateWithCoder: co

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Gerriet M. Denkmann
On 1 Aug 2012, at 21:38, Michael Babin wrote: > > On Aug 1, 2012, at 8:00 AM, Erik Stainsby wrote: > >> So I have a dictionary like so: >> >> NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray >> arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United

Rotating a Nib

2012-08-02 Thread Gerriet M. Denkmann
I have an iOS (5.1) program which has a view with some OpenGL animations, called GLView (subclass of UIView). When the user taps the screen, a Nib view is loaded (which contains some sliders and buttons). On the iPhone this nib is always displayed in portrait mode. This is ok. But on the iPad,

rotating UIView without changing size

2012-08-03 Thread Gerriet M. Denkmann
I have a subclass of UIViewController which displays a small view in the center of the display. shouldAutorotateToInterfaceOrientation: returns YES. The problem: when I rotate the device, the centered view rotates as it should. But it also changes its size to full-screen. The (bad) workaround:

Re: rotating UIView without changing size

2012-08-03 Thread Gerriet M. Denkmann
On 3 Aug 2012, at 22:50, David Duncan wrote: > On Aug 3, 2012, at 8:34 AM, Gerriet M. Denkmann wrote: > >> I have a subclass of UIViewController which displays a small view in the >> center of the display. >> shouldAutorotateToInterfaceOrientation: returns YES. >&

loading UIView in correct orientation

2012-08-03 Thread Gerriet M. Denkmann
I have a subclass of UIViewController which displays a small view in the center of the display. shouldAutorotateToInterfaceOrientation: returns YES. This view is only shown on demand. The problem: If the device is in Portrait-Up position when the ViewController is created then everything is fi

Re: rotating UIView without changing size

2012-08-03 Thread Gerriet M. Denkmann
On 3 Aug 2012, at 23:59, David Duncan wrote: > On Aug 3, 2012, at 9:16 AM, Gerriet M. Denkmann wrote: > >> The code in basicView (an UIView) is: >> >> - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event >> { >> if ( self.sl

How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
I use this code (iOS 5.1): CGAffineTransform m = { c, +s, -s, c, 0, 0 }; // rotation, s = sin(angle), c = cos(angle) CALayer *layer = self.view.layer; // view is UIView, self is subclass of UIViewController [ CATransaction begin]; [ CATransaction

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 00:20, Kyle Sluder wrote: > On Aug 5, 2012, at 10:11 AM, "Gerriet M. Denkmann" > wrote: > >> I use this code (iOS 5.1): >> CGAffineTransform m = { c, +s, -s, c, 0, 0 };//rotation, s = >> sin(angle), c = cos(angle)

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 01:01, Kyle Sluder wrote: > On Aug 5, 2012, at 10:34 AM, "Gerriet M. Denkmann" > wrote: > >> I tried instead: >> //opacity is 0.5 >> [ CATransaction begin]; >> [ CATransaction setAnimationDuration: 9 ]; >>

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 01:48, Richard Altenburg (Brainchild) wrote: >[UIView animateWithDuration:durationSeconds > animations:^ > { > [view setTransform:CGAffineTransformRotate([view transform], > angleRadians)]; > } > ]; > Thanks! (or: Dank U we

userSpaceScaleFactor in class NSWindow is deprecated - so what?

2012-08-11 Thread Gerriet M. Denkmann
I have an app which, when I first use File → Open..., writes: "2012-08-11 19:48:16.710 MyApp[5380:303] *** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead." I asked Xcode about "u

Re: userSpaceScaleFactor in class NSWindow is deprecated - so what?

2012-08-11 Thread Gerriet M. Denkmann
On 11 Aug 2012, at 20:20, Mike Abdullah wrote: > > On 11 Aug 2012, at 13:55, "Gerriet M. Denkmann" wrote: > >> I have an app which, when I first use File → Open..., writes: >> "2012-08-11 19:48:16.710 MyApp[5380:303] *** WARNING: Method >>

How to size a TextView to fit a given line?

2012-08-12 Thread Gerriet M. Denkmann
In windowWillUseStandardFrame:defaultFrame: in a subclass of NSDocument (which is also the delegate of it's window) I want to set the window to just contain a certain line. - (NSRect)windowWillUseStandardFrame:(NSWindow *)sender defaultFrame:(NSRect)defaultFrame { // myTextView is

Re: How to size a TextView to fit a given line?

2012-08-15 Thread Gerriet M. Denkmann
On 14 Aug 2012, at 01:30, Ross Carter wrote: > > On Aug 12, 2012, at 5:34 AM, Gerriet M. Denkmann wrote: > >> In windowWillUseStandardFrame:defaultFrame: in a subclass of NSDocument >> (which is also the delegate of it's window) I want to set the window to just

Mountain Lion crashes Simulator

2012-08-15 Thread Gerriet M. Denkmann
I have an app which works fine under Lion, but with 10.8 (Xcode 4.4.1) it crashes the Springboard in the Simulator (both iPhone and iPad). It never gets to: application:didFinishLaunchingWithOptions: Console log has several lines like: 14/08/2012 15:40:52.411 com.apple.launchd.peruser.502[129]:

Re: Mountain Lion crashes Simulator

2012-08-15 Thread Gerriet M. Denkmann
On 16 Aug 2012, at 07:43, Greg Parker wrote: > On Aug 14, 2012, at 3:21 AM, Gerriet M. Denkmann wrote: >> I have an app which works fine under Lion, but with 10.8 (Xcode 4.4.1) it >> crashes the Springboard in the Simulator (both iPhone and iPad). >

Re: Mountain Lion crashes Simulator

2012-08-16 Thread Gerriet M. Denkmann
> http://www.nemesys-soft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > On Aug 15, 2012, at 20:02, Gerriet M. Denkmann wrote: > >> >> On 16 Aug 2012, at 07:43, Greg Parker wrote: >>

Re: How to (slowly) rotate a view

2012-08-20 Thread Gerriet M. Denkmann
On 19 Aug 2012, at 00:18, Matt Neuburg wrote: > On Mon, 06 Aug 2012 00:11:39 +0700, "Gerriet M. Denkmann" > said: >> I use this code (iOS 5.1): >> CGAffineTransform m = { c, +s, -s, c, 0, 0 }; // rotation, s = >> sin(angle), c = cos(angle) >&g

Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
When I set up my server like: NSConnection *theConnection = [[NSConnection alloc] init]; [ theConnection setRootObject: self ]; BOOL ok = [theConnection registerName: @"someName" ]; Then a client is not able to get the rootProxy. When I add this line: [[NSRunLoop curre

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 21:31, Gary L. Wade wrote: > On Aug 27, 2012, at 4:53 AM, "Gerriet M. Denkmann" > wrote: > >> In the main thread of an application based on the Application Kit… > > In other words, do you call NSApplicationMain in your function main on your

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 21:47, Kyle Sluder wrote: > On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: >> The documentation says: >> >> " In the main thread of an application based on the Application Kit, the >> run loop is already running, so there

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:02, Kyle Sluder wrote: > On Mon, Aug 27, 2012, at 04:53 AM, Gerriet M. Denkmann wrote: >> When I set up my server like: >>NSConnection *theConnection = [[NSConnection alloc] init]; > > Also, the designated initialize

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:49, Kyle Sluder wrote: > On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" > wrote: > >> >> "new" is documented as "Allocates a new instance of the receiving class, >> sends it an init message, and returns the i

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:17, Kyle Sluder wrote: > On Aug 27, 2012, at 9:10 AM, "Gerriet M. Denkmann" > wrote: > >> >> On 27 Aug 2012, at 22:49, Kyle Sluder wrote: >> >>> On Aug 27, 2012, at 8:23 AM, "Gerriet M. Denkmann" >>&g

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder wrote: > On Aug 27, 2012, at 9:35 AM, "Gerriet M. Denkmann" > wrote: > >> >> You are right. Now have: >> NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; >> but still the same. >> >&g

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder wrote: > On Aug 27, 2012, at 9:35 AM, "Gerriet M. Denkmann" > wrote: > >> >> You are right. Now have: >> NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; >> but still the same. >> >&g

Network and DarkWake

2012-08-31 Thread Gerriet M. Denkmann
When I close the lid of my PowerBook, my app runs every hour for about a minute. This probably is the DarkWake as mentioned in WWDC 2012 "Power Management". There it was also stated that while in DarkWake the Network is available. But often (not always) my app (while in DarkWake) gets: Error ge

Re: Network and DarkWake

2012-09-01 Thread Gerriet M. Denkmann
On 31 Aug 2012, at 23:57, Marco S Hyman wrote: > On Aug 31, 2012, at 6:04 AM, Gerriet M. Denkmann wrote: > >> But often (not always) my app (while in DarkWake) gets: >> Error getaddrinfo(time.apple.com, ntp) -> nodename nor servname provided, or >> not know

Re: Network and DarkWake

2012-09-01 Thread Gerriet M. Denkmann
On 2 Sep 2012, at 12:34, Matt Patenaude wrote: > You might consider using SCNetworkReachability to monitor when the > availability of time.apple.com changes. > > https://developer.apple.com/library/mac/#documentation/SystemConfiguration/Reference/SCNetworkReachabilityRef/Reference/reference.ht

Re: Network and DarkWake

2012-09-02 Thread Gerriet M. Denkmann
On 2 Sep 2012, at 20:46, Matt Patenaude wrote: > Are you using it in the asynchronous callback style, or the synchronous > GetFlags function? I am using: SCNetworkReachabilitySetCallback() SCNetworkReachabilityScheduleWithRunLoop() Typical case: 2012-09-02 20:59:33.540 +0700 DidWakeNotificati

Local Properties

2012-09-03 Thread Gerriet M. Denkmann
I have a class with a mutable array. But from outside it should be just a read-only non-mutable array. My current solution: MyClass.h file contains: @property (readonly, nonatomic) NSArray *externalArray; and MyClass.m file has: @interface MyClass() @property (strong) NSMutableArray *int

What's up with bug report?

2012-09-19 Thread Gerriet M. Denkmann
Trying to login to http://bugreport.apple.com. But get "an error did occur" persistently. I seem to remember some discussion about this a few days ago. Is anybody able to use the bugreport? Gerriet. Safari 6.0 - 10.8.1 ___ Cocoa-dev mailing list (C

Re: What's up with bug report?

2012-09-20 Thread Gerriet M. Denkmann
On 20 Sep 2012, at 19:56, Roland King wrote: > > > I'd have thought they'd have fixed this by now. > I just upgraded to 10.8.2 and tried bugreport again (Safari 6). Now it seems to be working. Not sure whether the upgrade to 10.8.2 has anything to do with it. Gerriet. ___

Blocks with return type

2012-09-29 Thread Gerriet M. Denkmann
I have a typedef (no complains from Xcode - so I assume it to be correct): typedef unsigned long (^LongBlock_t)(id a); Now I want to set a variable to some block: LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x = 5; return x;}; What should <...some magic here...> lo

ArrayController cannot sort

2012-10-01 Thread Gerriet M. Denkmann
I have a TableView and an ArrayController (no DataSource) and everything works fine. Clicking on a column header sorts my table ascending or descending. But the order of the rows is totally wrong. It seems that the ArrayController uses compare: to sort my strings. The documentation rightly says:

Re: ArrayController cannot sort

2012-10-01 Thread Gerriet M. Denkmann
On 2 Oct 2012, at 11:10, Ken Thomases wrote: > On Oct 1, 2012, at 10:20 PM, Kyle Sluder wrote: > >> On Mon, Oct 1, 2012, at 07:56 PM, Gerriet M. Denkmann wrote: >>> So: how do I instruct my ArrayController to use localizedCompare: ? >> >> -[NSTable

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