Tag: cocoa

How to convert a string into a series of keystrokes?

I’m using CGPostKeyboardEvent((CGCharCode)0, (CGKeyCode)55, true); to simulate key presses, but say I had a string that I wanted to convert to key presses. How would I go about dividing an NSString up into single characters, and then converting those into key presses? Thanks! Edit: OK I think I found a solution, but I am unable […]

Using Calendar Store.

Is there a good example app or tutorial on using the Calendar Store, possibly with an NSTableView being used to add Events/Tasks?

Finder Scripting Bridge to Shutdown

I tried to use Application Scripting Bridge to send my Mac to sleep. The code look like the following: #import “Finder.h” FinderApplication *Finder = [SBApplication applicationWithBundleIdentifier:@”com.apple.finder”]; [Finder sleep]; But it doesn’t work. Any ideas why it doesn’t work? No compiling errors or warnings, but it doesn’t work…

Any “fundamentals-oriented” example of NSScroller out there?

I’m looking for some kind of a basic, straightforward example of how to work with a pair of NSScrollers in an NSScrollView with a custom NSView. There are sporadic examples out there, largely consisting of contrived examples using programatically created interfaces, or based on the assumption that the developer is working with a typical ImageView […]

How does waze change objects location with their localization?

The first image is when the language is set to Hebrew, the second is in English. Look at the word ” Thanks: ” in the image. How Waze managed to change the location of the word to a Right To Left language? With regular localization Thanks:x should have been תודות:X That’s just one example. Waze […]

How to capture user input in real time in NSTextField?

I can capture string when user click the button. and I also use the following method – (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor which declared in NSControlTextEditingDelegate Protocol. And when user begin editing, the button will be available. My Question is: How to make the button disable when user delete all text (make the textField empty without […]

Hotkeys? Key events?

I’m trying to make a window open when the user pressed Cmd + L but how can I make my controller object listen to that particular key combination?

Filtering A Tree Controller

I have now nearly figured out how to Filter a NSTreeController, to do this I have sub-classed NSManagedObject and added some code to my App Delegate, I have also bound my NSSearchField to the filterPredicate of my App Delegate but I think I need to connect my NSTreeController and NSSearchField in some way to make […]

Strategies for porting Carbon code to Cocoa

I’m looking for strategies and articles on making Carbon code 64-bit ready. Carbon for 64-bit does not and will not exist. It’s pretty much a dead end. So in order to bring Carbon application and toolkits to 64-bit their GUI part will have to be re-written in Cocoa and Objective-C, right? How can I minimize […]

Simple progress bar is not updating

I am implementing a Cocoa Application which is just a simple progress bar that starts when I press a button. The situation is: I can see Animation is Start and Stop when I press the button, but the progress bar will not update the value. I had also tried the solution mentioned here but it […]