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

Re: text highlighting with CALayer and NSTextVew

2012-08-27 Thread Koen van der Drift
Sorry, I did in fact mean -[NSView convertRectToLayer:] and -convertRectToBacking:. As well as the point-based conversion methods. I am now using a local method in myNSTextView: - (NSRect) convertRectToLayer: (NSRect) { aRect.origin.y = (self.bounds.size.height - aRect.size.height -

Re: Distributed Objects

2012-08-27 Thread Gary L. Wade
On Aug 27, 2012, at 4:53 AM, Gerriet M. Denkmann gerr...@mdenkmann.de 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 server app? If not, then in a simplistic answer, your app is not based on

Re: Distributed Objects

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

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
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 is nothing more to do to vend an object. In a secondary thread or an application that does not

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 21:47, Kyle Sluder k...@ksluder.com 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 is nothing more to do to vend an

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
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 initializer for NSConnection is -initWithReceivePort:sendPort:. I have no idea what behavior -init has. --Kyle Sluder

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:02, Kyle Sluder k...@ksluder.com 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 initializer for NSConnection is

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 8:23 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: new is documented as Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object. Except, you know, the part where -[NSConnection init] is documented to do

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 22:49, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 8:23 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: new is documented as Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object. Except, you

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 9:10 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 27 Aug 2012, at 22:49, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 8:23 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: new is documented as Allocates a new instance of the receiving

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:17, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 9:10 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 27 Aug 2012, at 22:49, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 8:23 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Aug 27, 2012, at 9:35 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: You are right. Now have: NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; but still the same. It seems that everything works as expected on 10.6.8 Hmm. You're not sandboxed, are you? If you are,

Re: Finder Info

2012-08-27 Thread Sean McBride
On Sat, 25 Aug 2012 17:58:39 +0200, Uli Kusterer said: const UInt8 *cpath = (const UInt8 *)[path cStringUsingEncoding:NSUTF8StringEncoding]; -UTF8String is shorter. Both of these are wrong, though. You should *always* use - fileSystemRepresentation when you need a C-string

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 9:35 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: You are right. Now have: NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; but still the same. It seems that everything works as

Re: Distributed Objects

2012-08-27 Thread Gerriet M. Denkmann
On 27 Aug 2012, at 23:40, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2012, at 9:35 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: You are right. Now have: NSMachPort *sendPort = (NSMachPort *)[ NSMachPort port ]; but still the same. It seems that everything works as

Re: Distributed Objects

2012-08-27 Thread Kirk
There isn't a run loop running yet at applicationDidFinishLaunching:. Defer your code with performSelector: afterDelay:0 Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Finder Info

2012-08-27 Thread David Duncan
On Aug 27, 2012, at 9:50 AM, Sean McBride s...@rogue-research.com wrote: On Sat, 25 Aug 2012 17:58:39 +0200, Uli Kusterer said: const UInt8 *cpath = (const UInt8 *)[path cStringUsingEncoding:NSUTF8StringEncoding]; -UTF8String is shorter. Both of these are wrong, though. You should

Re: Finder Info

2012-08-27 Thread Ken Thomases
On Aug 27, 2012, at 12:43 PM, David Duncan wrote: On Aug 27, 2012, at 9:50 AM, Sean McBride s...@rogue-research.com wrote: On Sat, 25 Aug 2012 17:58:39 +0200, Uli Kusterer said: const UInt8 *cpath = (const UInt8 *)[path cStringUsingEncoding:NSUTF8StringEncoding]; -UTF8String is

Re: Distributed Objects

2012-08-27 Thread Kyle Sluder
On Mon, Aug 27, 2012, at 10:40 AM, Kirk wrote: There isn't a run loop running yet at applicationDidFinishLaunching:. Defer your code with performSelector: afterDelay:0 While this is true, the very next thing after -applicationDidFinishLaunching: will be NSApplication calling [[NSRunLoop

Re: Distributed Objects

2012-08-27 Thread Kirk
This may be true now. Historically there have been runloop-dependent functionalities that would not work correctly if started in applicationDidFinishLaunching: . To avoid hair-tearing I just always define an applicationDidBeginRunLoop: method that is invoked by a zero-delay perform launched

ARC Issue in new Sketch Sample Code

2012-08-27 Thread Gordon Apple
- (void)setGraphicProperties:(SKTMapTableOwner *)propertiesPerGraphic { NSMapEnumerator propertiesPerGraphicEnumerator = NSEnumerateMapTable([propertiesPerGraphic mapTable]); Shape *graphic; NSDictionary *graphicProperties; while

On slow PNG image display in MapKit with iOS 5.1.x

2012-08-27 Thread Alex Zavatone
I thought someone else might benefit from this little discovery, so here you go. I've been a big fan of ImageOptim to mess with the internals of PNG files and make them nice and small, even with the new warning about use with Xcode and until recently, I've had no problems with PNG files being