Re: Rotate NSImage to get a new NSImage, without drawing

2009-02-28 Thread Jerry Krinock
On 2009 Feb 28, at 20:10, Graham Cox wrote: Create the new image, swapping width and height, lock focus onto it, apply a transform that rotates 90 degrees, and draw the first into the second. You can't do it without drawing, but the drawing doesn't need to be onscreen. Thanks, Graham.

Re: Rotate NSImage to get a new NSImage, without drawing

2009-02-28 Thread Graham Cox
On 01/03/2009, at 2:31 PM, Jerry Krinock wrote: I understand that NSAffineTransform can rotate an image while you're drawing it. But is there any way to rotate an image and get a new image? Something like: NSImage* imageUp = [NSImage imageNamed:@"BaseImage"] ; NSImage* imageLeft = [image

Rotate NSImage to get a new NSImage, without drawing

2009-02-28 Thread Jerry Krinock
I understand that NSAffineTransform can rotate an image while you're drawing it. But is there any way to rotate an image and get a new image? Something like: NSImage* imageUp = [NSImage imageNamed:@"BaseImage"] ; NSImage* imageLeft = [imageUp myRotateByDegrees:90] ; ... How could I imple

Re: Core Data: Delete stops at first object in Cascade

2009-02-28 Thread Jerry Krinock
I found the reason why my Cascade Delete was not cascading past the first object... Cascade---> Cascade-->> Nullify---> -->> X B T J <<-- <<--Nullify <---Nullify <<--Cascade From logging the NSManagedObjectContextObjectsDidChangeNotif

Re: enabling Edit menu items in a modal window?

2009-02-28 Thread Steve Christensen
On Feb 27, 2009, at 3:44 PM, Graham Cox wrote: On 28/02/2009, at 4:26 AM, Steve Christensen wrote: I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there some way

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
First off I would just like to thank everyone that helped me through this issue. I really wouldn't have been able to figure it out without all of you. In the end, using Apple Events with Apple Script seems to work very well... And it is very easy to manage. Thanks again! _

Re: How to make a message disappeared at certain amount of timepassed

2009-02-28 Thread Paul Sanders
> Well it made *me* laugh :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-ad

Re: "Pausing" other programs

2009-02-28 Thread Mike Abdullah
This is a standard Unix process feature and nothing to do with Cocoa; probably best asked elsewhere. Mike. On 28 Feb 2009, at 18:32, David Hatch wrote: Hi, I have a nice app called Blitz (blitzapp.com) which has the ability to focus on a single application, pausing the rest. Does anybody

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
I thought that based on the info, you couldn't do it using Apple Events... Apparently I misinterpreted. I'll try this in a little bit and I'll post back my results. On 2/28/09 1:22 PM, "Scott Ribe" wrote: >> Then would there be some way to either "trick" the system into quitting it >> in Cocoa

Re: Name to PSN

2009-02-28 Thread Scott Ribe
> Then would there be some way to either "trick" the system into quitting it > in Cocoa, or simply using another way other then Apple Events? What's wrong with Apple Events? NSDictionary *err = nil; NSAppleEventDescriptor *desc = NSAppleScript alloc] initWithSource: @"tell application \"S

Re: Name to PSN

2009-02-28 Thread Nick Zitzmann
On Feb 28, 2009, at 2:10 PM, Pierce Freeman wrote: Then I'm guessing that NSWorkspace wouldn't be the right item for this task. What substitute that shows LSUIIElements would you recommend? The sysctl() family of functions will allow you to get a full list of processes on the system, inc

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
Then I'm guessing that NSWorkspace wouldn't be the right item for this task. What substitute that shows LSUIIElements would you recommend? On 2/28/09 1:07 PM, "Nick Zitzmann" wrote: > > On Feb 28, 2009, at 1:25 PM, Pierce Freeman wrote: > >> Since the dock is an application (at least based on

Re: How to make a message disappeared at certain amount of time passed

2009-02-28 Thread Nick Zitzmann
On Feb 28, 2009, at 1:59 PM, Jushin wrote: I have to display a message (using NSLabel) to a user, but want to make it disappeared after certain amount of time (e.g. 5 seconds or so). How should I do this? Nick Zitzmann

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
That makes sense... So we have found out that the dock is definitely an app. After my reinstall of Xcode finishes, I'll see if I can quit it. If I can't, I'll let you all know. On 2/28/09 12:59 PM, "Paul Sanders" wrote: >> Then would there be some way to either "trick" the system into quitting

Re: How to make a message disappeared at certain amount of time passed

2009-02-28 Thread Luke the Hiesterman
If you have a method that will dismiss the message, you can call that method with performSelector: withObject: afterDelay: Luke On Feb 28, 2009, at 12:59 PM, Jushin wrote: I have to display a message (using NSLabel) to a user, but want to make it disappeared after certain amount of time (e.g

Re: Name to PSN

2009-02-28 Thread Nick Zitzmann
On Feb 28, 2009, at 1:25 PM, Pierce Freeman wrote: Since the dock is an application (at least based on what you/I am saying) why wouldn't it show up in NSWorkspace? NSWorkspace ignores LSUIElement applications, as well as other background-only apps that connect to the window server. The

Re: Name to PSN

2009-02-28 Thread Paul Sanders
> Then would there be some way to either "trick" the system into quitting it > in Cocoa, or simply using another way other then Apple Events? ps -A | grep Dock finds it, at least, so it's definitely an app. And kill -9 would undoubtedly get rid of it, although maybe that's a bit brutal. I didn

How to make a message disappeared at certain amount of time passed

2009-02-28 Thread Jushin
I have to display a message (using NSLabel) to a user, but want to make it disappeared after certain amount of time (e.g. 5 seconds or so). How should I do this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
Then would there be some way to either "trick" the system into quitting it in Cocoa, or simply using another way other then Apple Events? On 2/28/09 12:42 PM, "Scott Ribe" wrote: >> Since the dock is an application (at least based on what you/I am saying) >> why wouldn't it show up in NSWorkspa

Re: Name to PSN

2009-02-28 Thread Scott Ribe
> Since the dock is an application (at least based on what you/I am saying) > why wouldn't it show up in NSWorkspace? It's a special application which the system knows about and treats specially in various ways. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567

Re: Name to PSN

2009-02-28 Thread Pierce Freeman
Since the dock is an application (at least based on what you/I am saying) why wouldn't it show up in NSWorkspace? On 2/27/09 10:53 PM, "Andrew Farmer" wrote: > On 27 Feb 09, at 22:49, Kyle Sluder wrote: >> On Sat, Feb 28, 2009 at 1:41 AM, Pierce Freeman >> wrote: >>> Does anyone have any ideas

Using new Cookies

2009-02-28 Thread John Joyce
If using a WebView, and loading a URL from a web site, what is the recommended way to prevent using the user's cookies set for Safari? Basically, I'd like to get cookies specifically for the user for this app and keep them distinct from Safari. Is there a particular approach that is best pract

Re: MacOS X 10.4 and 10.5

2009-02-28 Thread xEsk PiV
@ Paul Sanders Thanks. @ Shawn Erickson > (small nit on terminology... you don't run under an SDK) > > Yes* but only if you specify the (min) target OS as 10.4 and SDK as 10.5. > > Review... >

Re: MacOS X 10.4 and 10.5

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 10:30 AM, Shawn Erickson wrote: > On Sat, Feb 28, 2009 at 10:15 AM, xEsk PiV wrote: >> Hello, >> >> I have some doubts with MacOS X 10.5 and 10.4: >> >> 1) If I compile my application with MacOS X SDK 10.5 and I run it >> under MacOS X SDK 10.4 (and I don't use any explici

"Pausing" other programs

2009-02-28 Thread David Hatch
Hi, I have a nice app called Blitz (blitzapp.com) which has the ability to focus on a single application, pausing the rest. Does anybody know how this could be done? I'd like to write myself a modification that lets me choose the apps I pause instead of the app that is "focused" (not pau

Re: MacOS X 10.4 and 10.5

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 10:15 AM, xEsk PiV wrote: > Hello, > > I have some doubts with MacOS X 10.5 and 10.4: > > 1) If I compile my application with MacOS X SDK 10.5 and I run it > under MacOS X SDK 10.4 (and I don't use any explicit 10.5 class) it > will run without problems? (small nit on term

Re: MacOS X 10.4 and 10.5

2009-02-28 Thread Paul Sanders
> I have some doubts with MacOS X 10.5 and 10.4: > > 1) If I compile my application with MacOS X SDK 10.5 and I run it > under MacOS X SDK 10.4 (and I don't use any explicit 10.5 class) it > will run without problems? > 2) If I use a specific 10.5 class (i.e: NSDockTile) is obvious it > won't run u

Re: NSAttributedDictionary crash

2009-02-28 Thread Michael Vannorsdel
Bingo, exactly what I was doing. Thanks a lot. On Feb 28, 2009, at 11:05 AM, Shawn Erickson wrote: I suggest you correct your (very likely is yours) over release issue. :) With that said I know of at least one quirk when working with attributed strings that can cause you something like wh

MacOS X 10.4 and 10.5

2009-02-28 Thread xEsk PiV
Hello, I have some doubts with MacOS X 10.5 and 10.4: 1) If I compile my application with MacOS X SDK 10.5 and I run it under MacOS X SDK 10.4 (and I don't use any explicit 10.5 class) it will run without problems? 2) If I use a specific 10.5 class (i.e: NSDockTile) is obvious it won't run under

Re: NSAttributedDictionary crash

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 9:40 AM, Michael Vannorsdel wrote: > I'm having a problem I'm not sure how to solve.  I have a custom view which > uses an NSAttributedString to draw text which works fine except when it > draws to a printer context.  The NSAttributedDictionary created inside the > NSAttrib

Re: NSAttributedDictionary crash

2009-02-28 Thread I. Savant
On Feb 28, 2009, at 12:40 PM, Michael Vannorsdel wrote: Looking for suggestions on how to work around this. Step 1: Post your code. How else are we to have any idea what's going on? -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:58 AM, Shawn Erickson wrote: > On Sat, Feb 28, 2009 at 8:45 AM, Clark Cox wrote: > >>>... not sure what Michael is >>> talking about. >> >> On Leopard, invalid bytes will indeed be escaped: > > Ah going back over the email chain I now get the context of the > conversatio

NSAttributedDictionary crash

2009-02-28 Thread Michael Vannorsdel
I'm having a problem I'm not sure how to solve. I have a custom view which uses an NSAttributedString to draw text which works fine except when it draws to a printer context. The NSAttributedDictionary created inside the NSAttributedString's initWithString:attributes: gets over released a

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:45 AM, Clark Cox wrote: >>... not sure what Michael is >> talking about. > > On Leopard, invalid bytes will indeed be escaped: Ah going back over the email chain I now get the context of the conversation when Michael made his comment about escaping. Anyway I was mostly

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Michael Ash
On Sat, Feb 28, 2009 at 11:49 AM, Shawn Erickson wrote: > On Sat, Feb 28, 2009 at 8:07 AM, Michael Ash wrote: > >> $ python -c 'open("hello\xaa\xbb\xccworld", "w")';ls >> hello%AA%BB%CCworld > > The POSIX APIs on Mac OS X expect UTF-8 paths. The above isn't UTF-8. Well yes, that's the whole poin

NSTableView and CA backed views

2009-02-28 Thread Erwan Ripoll
Hello all, I'm rather stuck because of what seems to be a drawing bug of NSTableView that I am trying to work around. It seems that any NSTableView in a NSVIew that has setWantsLayer:YES will flicker whenever the parent view is resized. In order to work around that bug, I have my window c

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Shawn Erickson
On Sat, Feb 28, 2009 at 8:07 AM, Michael Ash wrote: > $ python -c 'open("hello\xaa\xbb\xccworld", "w")';ls > hello%AA%BB%CCworld The POSIX APIs on Mac OS X expect UTF-8 paths. The above isn't UTF-8. Try the following which is the same in UTF-8... MacPro:~ shawnce$ python -c 'open("working_hell

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Clark Cox
On Fri, Feb 27, 2009 at 2:35 PM, Shawn Erickson wrote: > On Fri, Feb 27, 2009 at 2:15 PM, Martin Wierschin wrote: > >> On 2009.02.27, at 5:58 AM, Michael Ash wrote: >> >>> HFS+ only accepts non-UTF-8 by URL-encoding (!) the non-UTF-8 bytes >> >> Wow, that's pretty horrific. > > It also isn't real

Optimizing, uiview caching, and clearing that cached view.

2009-02-28 Thread James Cicenia
Hello - I just noticed that my app's view controller is not clearing out the view and so if i make a selection somewhere else, the new data is being populated over the old data and showing up in the view. This could actually be good because it could increase the performance of my app...

Re: renaming a file with special/reserved characters in name

2009-02-28 Thread Michael Ash
On Fri, Feb 27, 2009 at 5:35 PM, Shawn Erickson wrote: > On Fri, Feb 27, 2009 at 2:15 PM, Martin Wierschin wrote: > >> On 2009.02.27, at 5:58 AM, Michael Ash wrote: >> >>> HFS+ only accepts non-UTF-8 by URL-encoding (!) the non-UTF-8 bytes >> >> Wow, that's pretty horrific. > > It also isn't real

Re: 'Prepare Content' not working for Object Controllers ?

2009-02-28 Thread Guillaume Laurent
On Feb 26, 2009, at 21:36 , Guillaume Laurent wrote: I seem to be having a problem getting the 'Prepares Content' flag to work in the case of an NSObjectController. Following up on this, I was pointed to the fact that :prepareContent does not actually create content, as I was expecting it

Re: Implementing 4 different view modes of finder

2009-02-28 Thread I. Savant
On Feb 28, 2009, at 4:09 AM, Ankur Singhal wrote: I am trying to prepare a finder like application in which I have a left part as an NSOutlineView and on the right I have to show different view modes of Finder. Is there any API for showing the 4 different views of finder in my Application

Re: Patched OpenSSL

2009-02-28 Thread I. Savant
On Feb 28, 2009, at 2:46 AM, Ron Elliott wrote: A little background: I'm working with an AES GCM patched version of OpenSSL 0.9.8j. The patch compiles fine and produces the libcrypto.a and libssl.a. I use "gcc -dynamiclib -o libcrypto.dylib libcrypto.a" to get my dynamic library and it prod

KeychainCore: Crashes related to SSL?

2009-02-28 Thread Νικόλας Τουμπέλης
Hello, I'm writing a Mac application that connects to a server over https. I get random crashes that appear to be linked to how the KeychainCore handles SSL. This is the offending thread: Thread 2 Crashed: 0 libstdc++.6.dylib 0x9128fa03 __dynamic_cast + 15 1 com.apple.security

Re: Simple text encryption

2009-02-28 Thread Peter N Lewis
At 15:03 -0800 25/2/09, Erg Consultant wrote: Are there any classes in Cocoa for simple text file or plist file encryption? I just need something I can point at a file on disk and do simple encryption without a password or key and then decode it later. Doesn't have to be fancy or even all that

Implementing 4 different view modes of finder

2009-02-28 Thread Ankur Singhal
Hi All, I am trying to prepare a finder like application in which I have a left part as an NSOutlineView and on the right I have to show different view modes of Finder. Is there any API for showing the 4 different views of finder in my Application? Or I just have to right independent code for e

Re: Debugging the dreaded "CoreData could not fulfill a fault...."

2009-02-28 Thread Ben Trumbull
>cat ~/.gdbinit future-break objc_exception_throw future-break +[NSError errorWithDomain:code:userInfo:] future-break handleFailureInMethod:object:file:lineNumber:description: future-break handleFailureInFunction:file:lineNumber:description: future-break malloc_printf - Ben

Patched OpenSSL

2009-02-28 Thread Ron Elliott
A little background: I'm working with an AES GCM patched version of OpenSSL 0.9.8j. The patch compiles fine and produces the libcrypto.a and libssl.a. I use "gcc -dynamiclib -o libcrypto.dylib libcrypto.a" to get my dynamic library and it produces no errors. However when I load the library

Re: Finding the path of selected item in NSOutlineView

2009-02-28 Thread Andrew Yeaton
This might help you: http://www.wilshipley.com/blog/2006/04/pimp-my-code-part-10-whining-about.html On Feb 27, 2009, at 11:24 PM, Ankur Singhal wrote: Hi All, I am facing a problem in finding the path of the selected item from NSOutlineView. Can any one help me out in solving this problem

Re: NSSplitView splitViewDidResizeSubviews

2009-02-28 Thread Andrew Yeaton
This is normal behaviour. Generally you want to handle "live resizing", and these notifications allow for that. "splitViewWillResizeSubviews" happens before the actual resize happens and "splitViewDidResizeSubviews" happens after. I'll defer to someone else to answer your other question. O

Live resizing NSTableView causes ghosting/nastiness in custom drawn NSTextFieldCell

2009-02-28 Thread Andrew Yeaton
I have a custom subclass of an NSTextFieldCell that draws a right- aligned "badge" (like Mail.app's unread count). The column that uses the custom cell autoresizes with the width of the NSTableView (which resizes with the window). The problem: When the width of the column expands quickly, t