osx-snow-leopard

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

孤人 提交于 2021-02-10 12:39:57
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

风流意气都作罢 提交于 2021-02-10 12:31:55
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

How to write an OS X application that can effect changes (custom cursor, draw an image) even when it is not active?

99封情书 提交于 2021-02-10 12:31:47
问题 I previously asked a question about changing the cursor system-wide on OSX. I used NSCursor to change the cursor, but the effects are only as long as the application is active. When another application becomes active, the custom cursor is lost. Here is a related, more general question. How can you write an application to have system-wife effects? For example drawing an image on-screen even when your application is not active, and something else is? I understand I probably need to go at a

Handling “Open Document” (odoc) events in Snow Leopard

China☆狼群 提交于 2021-02-08 07:58:53
问题 I have code in my application that response to "Open Document" (odoc) events. In Mac OS X Tiger and Leopard, this code works fine: - (void) handleOpenDocumentEvent: (NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent { NSAppleEventDescriptor const *const dirObj = [event descriptorForKeyword:keyDirectObject]; DescType const dirObjType = [dirObj descriptorType]; if ( dirObjType == 'alis' ) { // // Open a single file. // NSData const *const data = [dirObj data];

How do you wait for an application to close in OS X?

丶灬走出姿态 提交于 2021-01-28 02:02:07
问题 I am using the code below to check if an application is running and close it. Can someone provide an example of how to request an application calose and wait for it to close before proceeding? + (BOOL)isApplicationRunningWithName:(NSString *)applicationName { BOOL isAppActive = NO; NSDictionary *aDictionary; NSArray *selectedApps = [[NSWorkspace sharedWorkspace] runningApplications]; for (aDictionary in selectedApps) { if ([[aDictionary valueForKey:@"NSApplicationName"] isEqualToString:

How to create a NSMatrix of NSImageCell in Interface Builder in 10.6

て烟熏妆下的殇ゞ 提交于 2020-01-21 08:24:06
问题 How can I create a matrix (NSMatrix object) of NSImageCell cells (usually located in an NSImageView) in Interface Builder 3.2.1 (i.e. the one made for Snow Leopard?) In the "old days", you would drag an NSImageView, and then option-drag the corner of the control. It seemed to have stopped working in 3.2.1... Is there another way? Am I doing something wrong? 回答1: Just drag an instance of NSImageView into your view in IB. Select it and then choose Layout > Embed Objects In > Matrix from IB's

How to create a NSMatrix of NSImageCell in Interface Builder in 10.6

こ雲淡風輕ζ 提交于 2020-01-21 08:23:43
问题 How can I create a matrix (NSMatrix object) of NSImageCell cells (usually located in an NSImageView) in Interface Builder 3.2.1 (i.e. the one made for Snow Leopard?) In the "old days", you would drag an NSImageView, and then option-drag the corner of the control. It seemed to have stopped working in 3.2.1... Is there another way? Am I doing something wrong? 回答1: Just drag an instance of NSImageView into your view in IB. Select it and then choose Layout > Embed Objects In > Matrix from IB's

How to create a NSMatrix of NSImageCell in Interface Builder in 10.6

这一生的挚爱 提交于 2020-01-21 08:23:27
问题 How can I create a matrix (NSMatrix object) of NSImageCell cells (usually located in an NSImageView) in Interface Builder 3.2.1 (i.e. the one made for Snow Leopard?) In the "old days", you would drag an NSImageView, and then option-drag the corner of the control. It seemed to have stopped working in 3.2.1... Is there another way? Am I doing something wrong? 回答1: Just drag an instance of NSImageView into your view in IB. Select it and then choose Layout > Embed Objects In > Matrix from IB's

App Sandbox/iCloud and Snow Leopard backwards compatibility

对着背影说爱祢 提交于 2020-01-21 08:13:49
问题 By now all Mac App Store developers know that all apps must have the new OSX Lion Sandboxing enabled going forward. For existing apps, we must enable it in XCode 4.2 and set in place the data migration plist. So my existing Mac App Store app has a build target of OSX 10.6.8 Snow Leopard. Not only that, but it does access the webcam and also synchronizes stuff to iCal via CalendarStore API and AppleScript. I'm expecting most of my app to break when I enable the Sandbox, but when I get that

App Sandbox/iCloud and Snow Leopard backwards compatibility

青春壹個敷衍的年華 提交于 2020-01-21 08:13:46
问题 By now all Mac App Store developers know that all apps must have the new OSX Lion Sandboxing enabled going forward. For existing apps, we must enable it in XCode 4.2 and set in place the data migration plist. So my existing Mac App Store app has a build target of OSX 10.6.8 Snow Leopard. Not only that, but it does access the webcam and also synchronizes stuff to iCal via CalendarStore API and AppleScript. I'm expecting most of my app to break when I enable the Sandbox, but when I get that