Re: Embedded web server

2010-02-16 Thread jonat...@mugginsoft.com
On 16 Feb 2010, at 02:23, Jens Alfke wrote: I haven't used Twisted, but it's pretty powerful. On the downside, I believe that means it's big. It might be a lot of code to ship with your app (unless it's already in the OS?) and it might use more memory than you'd like. Of course you

ImageIO on iPhone

2010-02-16 Thread sebi
Hello, I want to use ImageIO on the iPhone. However, the ApplicationServices framework does not show up in the list, when i do the Add - Existing Framework command. When i just add the line #import ApplicationServices/ApplicationServices.h I get some errors like 'CFXMLTreeRef' has not been

NSData category

2010-02-16 Thread Torsten Curdt
I am really really irritated. Got an iPhone project. Got quite some categories with additions to the standard APIs. All good. Just the darn NSData refuses to accept the category ... and I have no clue why. It's as simple as @interface NSData (NSDataAdditions) + (id)

Re: NSData category

2010-02-16 Thread Paul Sanders
Why NSConcreteData? Does it create a different object under the hood Yes, NSData is a class cluster (see Google). NSString, NSArray and NSDictionary are too, and no doubt others. But I don't see why you shouldn't put a category on NSConcreteData, other than the fact that the sand might

Re: NSData category

2010-02-16 Thread jonat...@mugginsoft.com
I am really really irritated. Got an iPhone project. Got quite some categories with additions to the standard APIs. All good. Just the darn NSData refuses to accept the category ... and I have no clue why. It's as simple as @interface NSData (NSDataAdditions) + (id)

Re: NSData category

2010-02-16 Thread Torsten Curdt
Bah ... one really just has to write the email to the list to find the fix himself. So here is what happened: I had added a new file to the Xcode project and renamed it. When checking with nm I found that the symbol for the category was actually missing ...and fair enough - it was just missing

Using a Private Framework in Mac application

2010-02-16 Thread Josh Tucker
Hey guys, I'm creating an application that I'd like to interface with the iPhone using the MobileDevice.framework. Would someone please point me in the right direction to be able to use the MobileDevice.framework in my application. Thanks, Joshua Lee Tucker

Peer-Peer iPhone, desktop app?

2010-02-16 Thread Eric E. Dolecki
I have found this URL: http://developer.apple.com/iphone/library/technotes/tn2009/tn2152.html#SECPEERTOPEER I have an app running on a Touch using the wifi router attached to my Mac (Mac is supplying connectivity from it's ethernet connection). I would like an OS X desktop app to be able to talk

Re: ImageIO on iPhone

2010-02-16 Thread glenn andreas
On Feb 16, 2010, at 6:55 AM, sebi wrote: Hello, I want to use ImageIO on the iPhone. However, the ApplicationServices framework does not show up in the list, when i do the Add - Existing Framework command. That's because ImageIO doesn't exist on the iPhone. When i just add the line

Re: Using a Private Framework in Mac application

2010-02-16 Thread Fritz Anderson
On 16 Feb 2010, at 7:49 AM, Josh Tucker wrote: Would someone please point me in the right direction to be able to use the MobileDevice.framework in my application. === ramtops:~ fritza$ locate MobileDevice.framework | grep -v sdk /System/Library/PrivateFrameworks/MobileDevice.framework

Re: Peer-Peer iPhone, desktop app?

2010-02-16 Thread Jens Alfke
On Feb 16, 2010, at 5:55 AM, Eric E. Dolecki wrote: I have an app running on a Touch using the wifi router attached to my Mac (Mac is supplying connectivity from it's ethernet connection). I would like an OS X desktop app to be able to talk back and forth with the Touch application. Is this

Re: Using a Private Framework in Mac application

2010-02-16 Thread Jens Alfke
On Feb 16, 2010, at 5:49 AM, Josh Tucker wrote: Would someone please point me in the right direction to be able to use the MobileDevice.framework in my application. Just locate the framework in the Finder and drag its icon into your project. You may need to edit the target build settings to

Re: Peer-Peer iPhone, desktop app?

2010-02-16 Thread Eric E. Dolecki
Thank you - I will check into this. Much appreciated! On Tue, Feb 16, 2010 at 11:25 AM, Jens Alfke j...@mooseyard.com wrote: On Feb 16, 2010, at 5:55 AM, Eric E. Dolecki wrote: I have an app running on a Touch using the wifi router attached to my Mac (Mac is supplying connectivity from

NSPredicate Binding Problem

2010-02-16 Thread Chris Tracewell
In a window displaying a widget object I am using an outlineview bound to an NSTreeController as master view. When I notice the OV selection change via outlineViewSelectionDidChange I filter a tableview bound to an NSArrayController in one of two ways like so... Method 1 :: use

Re: Question about zipping files

2010-02-16 Thread Sean McBride
On 2/15/10 4:50 PM, Gideon King said: Thanks for the suggestion. Have not encountered Scripting Bridge before and have very little experience or understanding of AppleScript and no knowledge of Apple Events or what they do. I had a vague notion that Apple Events were pretty much old technology

Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Jerry Krinock
At times, I attach an attached window to a document window. I would like this window to go away whenever the user clicks anything in the window, kind of like a tooltip. So I subclassed the window, overrode -sendEvent:, invoke super and post a notification for which my window controller

Re: Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Paul Sanders
-[NSWindow mouseDown:]? (inherited from NSResponder). Paul Sanders. - Original Message - From: Jerry Krinock je...@ieee.org To: Cocoa Developers cocoa-dev@lists.apple.com Sent: Tuesday, February 16, 2010 5:48 PM Subject: Perform additional action when window receives any mouse- or

Appropriate -setWantsLayer: timing

2010-02-16 Thread Keith Duncan
I'm wondering when writing a layer hosting view, when the most appropriate time is to set the layer and call -setWantsLayer:YES? Calling it in -initWithFrame: is too early and the view fails to 'draw'. Keith ___ Cocoa-dev mailing list

Preventing system sleep

2010-02-16 Thread Laurent Daudelin
I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the NSWorkspace extendPowerOffBy: but then the doc says Currently unimplemented. So, if my app get

Re: Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Jerry Krinock
On 2010 Feb 16, at 10:58, Paul Sanders wrote: -[NSWindow mouseDown:]? (inherited from NSResponder). Thanks, Paul. I hadn't realized that inheritance. Also, I'd need -rightMouseDown:, -keyDown:, -otherMouseDown:, ??? At least, no notification needed.

Re: Preventing system sleep

2010-02-16 Thread Neil Allain
On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the NSWorkspace extendPowerOffBy: but

Re: Preventing system sleep

2010-02-16 Thread Sean McBride
On 2/16/10 12:57 PM, Laurent Daudelin said: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. You can temporarily disable sleep using IOPMAssertionCreateWithName() on 10.6 or

Re: Preventing system sleep

2010-02-16 Thread Joe Ranieri
On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
Thanks, Joe, I'll have a look! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store:

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:13, Joe Ranieri wrote: On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the

Re: Preventing system sleep

2010-02-16 Thread Joe Ranieri
On 2/16/10 4:18 PM, Laurent Daudelin wrote: On Feb 16, 2010, at 13:13, Joe Ranieri wrote: On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device.

Re: Perform additional action when window receives any mouse- orkeyDown

2010-02-16 Thread Paul Sanders
I guess so, yes. Paul Sanders. - Original Message - From: Jerry Krinock je...@ieee.org To: Cocoa Developers cocoa-dev@lists.apple.com Sent: Tuesday, February 16, 2010 9:05 PM Subject: Re: Perform additional action when window receives any mouse- orkeyDown On 2010 Feb 16, at 10:58,

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:19, Joe Ranieri wrote: On 2/16/10 4:18 PM, Laurent Daudelin wrote: On Feb 16, 2010, at 13:13, Joe Ranieri wrote: On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start

Re: Preventing system sleep

2010-02-16 Thread Sean McBride
On 2/16/10 4:19 PM, Joe Ranieri said: Curious. The header file says: IOReturn IOPMAssertionCreateWithName( CFStringRef AssertionType, IOPMAssertionLevel AssertionLevel, CFStringRef AssertionName,

Re: Preventing system sleep

2010-02-16 Thread Jens Alfke
On Feb 16, 2010, at 13:19, Joe Ranieri wrote: Oops! The doc says it was introduced in 10.6 and I need to support 10.5. I guess I'll have to check IOPMAssertionCreate... Curious. The header file says: IOReturn IOPMAssertionCreateWithName( CFStringRef

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:27, Sean McBride wrote: On 2/16/10 4:19 PM, Joe Ranieri said: Curious. The header file says: IOReturn IOPMAssertionCreateWithName( CFStringRef AssertionType, IOPMAssertionLevel AssertionLevel,

Re: Appropriate -setWantsLayer: timing

2010-02-16 Thread David Duncan
On Feb 16, 2010, at 12:52 PM, Keith Duncan wrote: I'm wondering when writing a layer hosting view, when the most appropriate time is to set the layer and call -setWantsLayer:YES? Calling it in -initWithFrame: is too early and the view fails to 'draw'. If you are creating the view

Re: Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Kyle Sluder
On Tue, Feb 16, 2010 at 9:48 AM, Jerry Krinock je...@ieee.org wrote: So I subclassed the window, overrode -sendEvent:, invoke super and post a notification for which my window controller registers, and in the notification handler I examine the event type.  It works, but this seems quite

Re: Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Paul Sanders
Yes, I think I go along with that. It lets you handle all the events you choose to handle in one place. Paul Sanders. - Original Message - From: Kyle Sluder kyle.slu...@gmail.com To: Jerry Krinock je...@ieee.org Cc: Cocoa Developers cocoa-dev@lists.apple.com Sent: Tuesday, February

Validation error after setting the value of a boolean attribute

2010-02-16 Thread Lynn Barton
Why does my Core Data app give me a validation error message, when quitting the app, if the following code is used? I am importing some legacy data to set 5 string attributes of an object, but using this code to set the one BOOL attribute. In my model, myBooleanAttribute has a default value of

Re: Validation error after setting the value of a boolean attribute

2010-02-16 Thread Steven Degutis
Boolean attributes in Core Data are not actually of type BOOL but rather NSNumber. Thus, your NO value is interpreted as nil (since nil == 0 == NO) and you're setting your attribute to nil. If the attribute is required, then nil is not a valid value, and you will get a validation error. Next time,

Re: Perform additional action when window receives any mouse- or keyDown

2010-02-16 Thread Murat Konar
Uh, if I understand what the op wants to do correctly, overriding - [NSWindow mouseDown:] isn't going to do it. If the user clicks inside a view that overrides -mouseDown: (and friends -rightMouseDown: and -otherMouseDown:), there's no guarantee that your window's override will get called.

Re: Validation error after setting the value of a boolean attribute

2010-02-16 Thread Lynn Barton
On Feb 16, 2010, at 2:38 PM, Steven Degutis wrote: Boolean attributes in Core Data are not actually of type BOOL but rather NSNumber. Thus, your NO value is interpreted as nil (since nil == 0 == NO) and you're setting your attribute to nil. If the attribute is required, then nil is not a

Re: Refresh com.apple.symbolichotkeys.plist

2010-02-16 Thread DeNigris Sean
Is there any way to cause the system to re-read com.apple.symbolichotkeys.plist.plist in Cocoa (or anywhere else)? I want to programmatically change a shortcut (which is no problem), but I want it to take effect immediately. System Preferences obviously signals the system to do this -

Re: NSDrawNinePartImage not working ?

2010-02-16 Thread PCWiz
You shouldn't be doing any drawing in awakeFromNib. See this example code: http://developer.apple.com/mac/library/samplecode/RoundTransparentWindow/index.html It demonstrates how to create and display a custom window using an NSWindow subclass. On 2010-02-14, at 10:36 PM, Sandro Noël wrote:

Puppeting/Automating one application from another?

2010-02-16 Thread James Trankelson
Hi, I'm trying to figure out the general feasibility of the following task. Imagine I have two separate applications, running side by side. Is it possible to take all of the mouse/keyboard inputs that are going into one of these applications, and send them to the other in a way that would allow

Re: Puppeting/Automating one application from another?

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 18:31, James Trankelson wrote: Hi, I'm trying to figure out the general feasibility of the following task. Imagine I have two separate applications, running side by side. Is it possible to take all of the mouse/keyboard inputs that are going into one of these

Re: Puppeting/Automating one application from another?

2010-02-16 Thread James Trankelson
I don't feel like that's the same thing. In the case of Remote Desktop and VNC, the mouse and keyboard events are certainly being redirected to another desktop, but only one application has the focus. On Tue, Feb 16, 2010 at 8:15 PM, Laurent Daudelin laurent.daude...@gmail.com wrote: On Feb 16,

Bindings: NSArrayController gets a new but equal array, pushes back to model

2010-02-16 Thread Jerry Krinock
This is a resolution of my message posted 2010 Jan 02, subject: Bindings/Core Data: Undesired Discovery of a Mythical Deep Observer I'm posting this because, after rewriting the whole thing and giving it some more thought, I believe I have an explanation, which archive-searchers might find

Re: Puppeting/Automating one application from another?

2010-02-16 Thread Henry McGilton (Boulevardier)
On Feb 16, 2010, at 6:31 PM, James Trankelson wrote: Hi, I'm trying to figure out the general feasibility of the following task. Imagine I have two separate applications, running side by side. Is it possible to take all of the mouse/keyboard inputs that are going into one of these

Dynamically populate a popup menu

2010-02-16 Thread Peter N Lewis
Is there any way to dynamically populate a popup menu on the fly (as it is exposed)? For example, a popup menu that displayed the harddisk hierarchy would need this sort of thing - you wouldn't want the entire thing populated as soon as you click the popup menu, it would take forever and the

Re: Dynamically populate a popup menu

2010-02-16 Thread Graham Cox
On 17/02/2010, at 6:49 PM, Peter N Lewis wrote: Is there any way to dynamically populate a popup menu on the fly (as it is exposed)? Look into the NSMenuDelegate protocol. It has methods to do what you want. --Graham___ Cocoa-dev mailing list