Making a NSPopUpButton display all my iCal Calendars.
I have a NSPopUpButton and I want the Menu Items in it to display the users iCal calenders. From there I want it depending on which is selected to change this code. CalCalendar *calendar = [[store calendars] objectAtIndex:0]; The code defines which iCal calender to sync to, at the moment it’s the default calender, however […]
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 […]
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 […]
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 […]