Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);

2009-06-14 Thread Frederick C. Lee
Is there a Cocoa/iPhone equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect)? I want to be able to display an off-view portion; or pan over a large PNG image within the available UIView. Ric. ___ Cocoa-dev mailing list

Re: searching a string in big file

2009-06-14 Thread Arie Pieter Cammeraat
you can use some methods of NSString, but I doubt wether NSString performs well with really big string. I once tried to work with the Unix tool 'grep' for searching something in the iTunes Library xml file. That was amazingly fast! You can use it in cocoa with NSPipe etc. Op 13-jun-2009,

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-14 Thread Florian Witteler
Hi Kyril, Nick, Brian and Erik! I'd really like to thank you all for your comments. You gave me a good starting point to move on! I'll work through these ressources and get back, if I have further questions. Have a nice weekend. - Florian P.S.: I'm not familiar with mailing-lists. Do I

NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Tejas Vora
Hello All, I am getting the following error message when I try to migrate my Java application on OS-X from java 5 to java 6. I have a 64 bit MAC which is a requirement. I am copy pasting the console over here : NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error.

really odd sluggish calls to nextEventMatchingMask:untilDate:inMode:dequeue:

2009-06-14 Thread Andrew Wulf
In the cross platform game I support the mac code on, since a few months ago people are reporting odd stutters while using the mouse. I investigated and found that calling for(;;) { UnsignedWide time; Microseconds(time); NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask

Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);

2009-06-14 Thread Kyle Sluder
Are you looking for Cocoa solutions as well, or only Cocoa Touch? The typical way to do this on desktop (Cocoa) is to use an NSScrollView (with NSClipView). On Cocoa Touch, I hear people often use a CATiledLayer, but as I'm not an iPhone dev there might be better solutions available for your

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-14 Thread Benjamin Dobson
On 13 Jun 2009, at 11:20:36, Florian Witteler wrote: Hi Kyril, Nick, Brian and Erik! I'd really like to thank you all for your comments. You gave me a good starting point to move on! I'll work through these ressources and get back, if I have further questions. Have a nice weekend. -

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Kyle Sluder
On Sat, Jun 13, 2009 at 12:40 PM, Tejas Voratejasvora.ap...@gmail.com wrote: I am getting the following error message when I try to migrate my Java application on OS-X from java 5 to java 6. The Cocoa-Java bridge has been deprecated since 10.4. --Kyle Sluder

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed

2009-06-14 Thread Kyle Sluder
On Sat, Jun 13, 2009 at 3:20 AM, Florian Wittelerflorian_witte...@gmx.de wrote: Hi Kyril, Nick, Brian and Erik! s/Kyril/Kyle/ plz :) Although I'd prefer my name to be Kyril. Too much paperwork though. :P P.S.: I'm not familiar with mailing-lists. Do I simply hit 'reply to all' when I want

Safari-4-like Pulldown List

2009-06-14 Thread Dong Feng
I want to implement a pulldown list like what FireFox does with its address bar (or its Google search bar). I think it involves to open a borderless window and draw items through Cocoa drawing APIs. But when I saw Safari 4, its pulldown list's appearance just like a context-menu, I began thinking

Re: Coming up with ideas

2009-06-14 Thread WT
Hi Graham, care to share some of them? I'm sure lots of people like the OP and myself, who are not as prolific in coming up with ideas as you are, would be happy to take a shot at some of your ideas. Wagner Well, most of them reflect two things: a) my interests and b) the lack of

advice on background process

2009-06-14 Thread Rick C.
hello, my project is fairly small and it monitors via notification certain directories for changes. ideally the app would always run so that it would always monitor. but i would like to make it so the icon could be hidden and my understanding is that LSUIElement always hides the menubar as

NSTask root privileges?

2009-06-14 Thread KK
Hello, I'm writing a Foundation tool that is only run by root (by launchd).. This tool is using NSTask to call another program, but it seems like the program that i'm calling within the NSTask is not given root privileges... I'm not sure what I'm missing, do I have to use the Security framework?

Re: Blur NSImage

2009-06-14 Thread Pierce Freeman
Kyle: Thanks for your suggestion. I ended up doing it in Interface Builder, and it works great! Thanks! On 6/13/09 8:37 PM, Kyle Sluder kyle.slu...@gmail.com wrote: Look into Core Image filters. You can apply them to any layer-backed view. You can even do it from within Interface

Re: How can I keep an NSPopUpButton open after the user selects a menu item?

2009-06-14 Thread Michael Ash
On Sat, Jun 13, 2009 at 2:20 PM, Dennis Hartigan-O'Connordenn...@umich.edu wrote: I have an NSPopUpButton providing the NSMenu for a status item with a custom view. The popup button displays a list of links. When the user selects a link from the list, the link is displayed in the user's browser

Re: advice on background process

2009-06-14 Thread Michael Ash
On Sun, Jun 14, 2009 at 7:19 AM, Rick C.jo_p...@yahoo.com wrote: hello, my project is fairly small and it monitors via notification certain directories for changes.  ideally the app would always run so that it would always monitor.  but i would like to make it so the icon could be hidden

Re: NSTask root privileges?

2009-06-14 Thread Greg Guerin
KK wrote: I'm writing a Foundation tool that is only run by root (by launchd).. Exactly how is your tool being run by launchd? Where are you putting the agent/daemon plist? Post the contents of that plist. Does your tool ever call setuid() or seteuid() or any similar function (there are

Re: Correct MVC code placement

2009-06-14 Thread Kyle Sluder
NSDocument is what's known as a model-controller object. Your actual model is the pipe-separated values; NSDocument allows you to perform operations on that model. As such, I'd probably expose an NSArray property for my list of things, and only do the pipe-separation when reading from or writing

Re: Correct MVC code placement

2009-06-14 Thread Chris Tracewell
Thanks Kyle, I should've noted this is a non-document based app. That said, I think your suggestion would imply to let the controller to expose its own array property of the model's pipe-separated property? Chris On Jun 14, 2009, at 11:27 AM, Kyle Sluder wrote: NSDocument is what's known

Re: Coming up with ideas

2009-06-14 Thread Uli Kusterer
Am 12.06.2009 um 19:30 schrieb Development: Hey, how do you guys come up with ideas for new programs? I'm going nuts trying to figure out what type of application I should make. I'm in a similar boat as Graham, in that I'm so busy working on existing apps that I actually blogged a few ideas

Archiving undos? NSUndoManager

2009-06-14 Thread Scott Squires
I have an app currently with my own simple undo of a single instance. When the app quits I'm able to save and later restore the undo info. I've now switched to using the NSUndoManager and multiple levels of complex undos. On a desktop system the user quits and normally you just dispose of

Re: Positioning of autocomplete popups

2009-06-14 Thread Ross Carter
On Jun 11, 2009, at 11:35 PM, Dave Robertson wrote: Is there a recommended way to display a menu while still keeping key events flowing to the search field? Not that I know of. In my case, I filter the list to remove things like apostrophe-s and display the list only if it contains less

Re: Positioning of autocomplete popups

2009-06-14 Thread Uli Kusterer
Am 11.06.2009 um 23:35 schrieb Dave Robertson: Is there a recommended way to display a menu while still keeping key events flowing to the search field? Do you need a menu? Have you tried just creating your own cool- looking borderless window and stuffing an NSTableView with the

Re: Coming up with ideas

2009-06-14 Thread Jeffrey Oleander
On Sat, 2009/06/13, Grant Erickson erick...@umn.edu wrote: From: Grant Erickson erick...@umn.edu Subject: Re: Coming up with ideas To: Graham Cox graham@bigpond.com Cc: cocoa-dev@lists.apple.com Date: Saturday, 2009 June 13, 11:13 On 2009/06/12 23:34, Graham Cox wrote: On 2009/06/13,

Re: Correct MVC code placement

2009-06-14 Thread Ken Thomases
On Jun 14, 2009, at 2:34 PM, Chris Tracewell wrote: On Jun 14, 2009, at 11:27 AM, Kyle Sluder wrote: NSDocument is what's known as a model-controller object. Your actual model is the pipe-separated values; NSDocument allows you to perform operations on that model. As such, I'd probably

Re: Correct MVC code placement

2009-06-14 Thread Chris Tracewell
Ken, Okay, that makes perfect sense. You are right, I was storing the pipe- separated string of values to avoid needing another DB table for single values that would not surpass more than 2 or 3 per record. However, your and Kyle's response now make it obvious that the pipe- string is not

Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);

2009-06-14 Thread Rob Keniger
On 13/06/2009, at 4:53 AM, Frederick C. Lee wrote: Is there a Cocoa/iPhone equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect)? I want to be able to display an off-view portion; or pan over a large PNG image within the available UIView. Check out Bill Dudney's

Re: How can I keep an NSPopUpButton open after the user selects a menu item?

2009-06-14 Thread Graham Cox
On 14/06/2009, at 4:20 AM, Dennis Hartigan-O'Connor wrote: I have an NSPopUpButton providing the NSMenu for a status item with a custom view. The popup button displays a list of links. When the user selects a link from the list, the link is displayed in the user's browser (in the

Re: advice on background process

2009-06-14 Thread Jerry Krinock
On 2009 Jun 14, at 09:48, Michael Ash wrote: On Sun, Jun 14, 2009 at 7:19 AM, Rick C.jo_p...@yahoo.com wrote: my project is fairly small and it monitors via notification certain directories for changes. The most obvious way to do this would be to just have two applications. One is an

Re: Questions on using using modal sheets with Core Data

2009-06-14 Thread Kevin Ross
I'm able to get the dependent values to update correctly if I access the deepest path of the relationship before I set the value that will cause them to update. It seems like kind of a kludge, but it might be the best I can do right now until I can ferret out a possible missed dependency

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Tejas Vora
Thanks a lot for the responses. Just require some clarifiaction. So you think the problem is due the 64 bit mac ??I am not clear about your observation on the exception. Thanks Tejas On Sun, Jun 14, 2009 at 4:13 AM, Nick Zitzmann n...@chronosnet.com wrote: On Jun 13, 2009, at 1:40 PM, Tejas

Re: NSView directly drawn on screen?

2009-06-14 Thread Peter N Lewis
On 13/06/2009, at 16:51 , Michael Ash wrote: You can't. If you want to receive keyboard events then you must have focus. If you don't want to have focus, then you can't receive keyboard events. Pick one or the other, because you can't have both. Well, technically you could use an event tap or

Re: is setFrame as optimal as setNeedsDisplayInRect?

2009-06-14 Thread David Duncan
The Core Animation instrument (and a few others) require you to target the device rather than the simulator. On Jun 13, 2009, at 2:46 PM, Chunk 1978 wrote: how can i add core animation to the performance tools list? it, and several others, are deactivated. -- David Duncan Apple DTS

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Kyle Sluder
On Sun, Jun 14, 2009 at 7:17 PM, Tejas Voratejasvora.ap...@gmail.com wrote: So you think the problem is due the 64 bit mac ??I am not clear about your observation on the exception. Yes. There is no 64-bit version of the Cocoa-Java bridge. And there's no guarantee that the 32-bit version will

Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);

2009-06-14 Thread David Duncan
On Jun 12, 2009, at 11:53 AM, Frederick C. Lee wrote: Is there a Cocoa/iPhone equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect)? The equivalent is... CGImageCreateWithImageInRect :). Keep in mind that 9 times out of 10 what people want to use it for is not what that

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Greg Guerin
Tejas Vora wrote: So you think the problem is due the 64 bit mac ??I am not clear about your observation on the exception. Yes, the problem is due to the 64-bit mac. More specifically, it is due to Java 6 on Leopard only running under the 64-bit x86_64 architecture. Java 6 simply

Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error

2009-06-14 Thread Thomas G. Schaffernoth (Tom)
SOunds good. Look forward to getting time together when you get here in August. Although, we might be on vacation for some of that time. How you handling the challenges? -- Thanks. Thomas G. Schaffernoth (Tom) Quoting Tejas Vora tejasvora.ap...@gmail.com: Thanks a lot for the

Re: Detecting text under mouse

2009-06-14 Thread Mr. George Warner
On Sun, 14 Jun 2009 14:57:21 +1000, Jacob Rhoden li...@jacobrhoden.com wrote: That is exactly what I am looking for, a Dictionary application is essentially assisting you with being able to read information on the screen. Unfortunately I cannot find any documentation at all on how to

Re: UTI not identified correctly for some users.

2009-06-14 Thread Mitchell Livingston
Hey Sean, Thanks for that. I am dealing with .torrent extensions. I have the UTI defined as org.bittorrent.torrent. Both apps are using the same file format, so there shouldn't be a problem with a single UTI. It would be great if Apple included this in the OS, although is there a chance

Get Key Commands in Fullscreen

2009-06-14 Thread Pierce Freeman
Hi Everyone: I am following the steps described here: http://www.cocoadevcentral.com/articles/28.php to make a fullscreen application but am running into a problem when I want to get key input. For some reason, it seems that when you convert the Panel to take up the screen, you also loose

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual

2009-06-14 Thread Mr. George Warner
On Sat, 13 Jun 2009 12:20:36 +0200, Florian Witteler florian_witte...@gmx.de wrote: I'd really like to thank you all for your comments. You gave me a good starting point to move on! I'll work through these ressources and get back, if I have further questions. I missed their replies but

Adding actions to undo manager

2009-06-14 Thread Ryan Joseph
Simple question, how is it possible to have changes made programatically to NSTextStorage be added to the undo manager? I tried enclosing the changes in begin/endEditing calls but this did not work. Thanks in advance. Regards, Josef ___