Editable CATextLayer? - cocoa

I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas?
I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-(
I target Mac OS X 10.5 with Objective-C 2.0 and Garbage Collection.
Any help or pointers would be greatly appreciated. Thanks in advance!!

I think your approach using an editable NSTextFieldCell is the right way to go. It's not a trivial task, but you can do it.

Related

wxpython -- a frame or panel similar to labelframe in ttk?

I used ttk's labelframes for many different things and have recently switched over to wxpython. I can't, for the life of me, find a similar panel or frame in wxpython. Does anyone know of any? I'd prefer it be native but if it isn't there, it isn't there. Thanks.
You mean something like that? wxPython StaticBox? Will act together with STaticBoxSizer as container for other controls.

NSPopover - hiding standard window possible?

In my Mac app, I want to use a NSPopover, activated by a NSStatusItem. Activating works like a charm, but I would like to get rid of the standard window (white or HUD), that is provided by the NSPopover, and use my own view instead. Does anyone know if that is possible?
Thanks
no, it is not possible -- we tried hard and ended up reverting to the 10.7 way of using a custom class.. check MAAttachedWindow
well with enough swizzling and posing it'd be possible of course... but that is very evil and at least as much work as your own class!

How to make an NSPanel immovable

Hey all, quick question that has been bugging me about NSPanel. I like the look of The NSPanel HUD but for the project I am doing I need the Panel to not be moved. Does anyone know of any possible solutions to make it were my NSPanel cannot be moved at all but maintain its buttons interactivity? I've been searching for any questions similar to this for awhile now. Any insight on the issue would be helpful! Thanks.
Don't forget to look in superclasses. A panel is a kind of window, and since Mac OS X 10.6, it's possible to set a window's movable property to NO.
I'm with Dave DeLong, though: I hope you have a good reason to break this functionality. Users expect to be able to move windows, especially those with title bars and HUD windows by their backgrounds, out of their way. And remember, you're not the only application on the system; the user may have something important to get to in a window in another application.

Globally hide mouse cursor in Cocoa/Carbon?

Is there a way to globally hide the mouse cursor for all apps in Cocoa (or Carbon)? Or at least replace it with something else?
EDIT: Thanks for the input guys, but turns out Daniel Jalkut found the solution a while ago :) http://lists.apple.com/archives/carbon-dev/2006/Jan/msg00555.html
You are looking for CGDisplayHideCursor, which is part of the Quartz Display Services API.
Check out: http://developer.apple.com/legacy/mac/library/samplecode/CarbonCocoa_PictureCursor/listing2.html
It's an old sample, but probably still works.
I expect that you're going to be limited to your application window, however. If you want to hide it for everyone you will probably have to make your window cover the screen.
Fun fact: The old toolbox function was simply "HideCursor()".
just add this to your code:
CGDisplayHideCursor (kCGNullDirectDisplay);
No, I don't believe there's a way of doing what you want, short of showing a full screen window and then obscuring absolutely everything on the desktop. That would also prevent e.g. keystrokes being sent to the right application and the like.

Gray NSTableView à la iTunes

How can I achieve the dark gray NSTableView look (used in iTunes, Delicious Library, etc.) in my own application?
I always thought this was an option in NSTableView (or NSTableHeaderView) but I never tried actually doing it.
After hours of searching, I'm pretty convinced that no such option exists, and that I need to do my own drawing.
Before going any further, I just want to make sure there isn't an (undocumented) API for this, and that I'm not missing something.
A good friend of mine created a whole control kit called BGHUDAppKit. It's for the new HUD stuff that Apple introduced a while ago. I believe his controls are themable, and they come with source. I personally haven't done anything with Cocoa, but he has and I know he could answer some questions. Unfortunately, he doesn't lurk here, so you'll have to contact him. I'll see if I can get him to come here. :)
Look at this page under iTableColumnHeader. Also there are many custom UI elements similar to Apple's

Resources