Re: UIView final frame after device rotation
On 4/3/13 12:47 AM, Quincey Morris wrote: On Apr 2, 2013, at 14:21 , Markus Spoettl ms_li...@shiftoption.com mailto:ms_li...@shiftoption.com wrote: Not sure if I understand what you're saying, but if that was the case, the view's frame I'm attaching the overlay to would turn out wrong if the device is rotated. No, once the rotation is complete (at least), there'd be no transform any more, and so the frame would then be valid. Ah, OK you're right. The only time I get a bogus view frame is when the rotation notification is delivered. It would be easy to try examining the bounds and center properties at the time of the notification, and see whether *they* are bogus. If not, you should be able to orient your child view using those two properties, instead of using frame. bounds and center are correct at all times. However, I need the view's frame in screen coordinates because I'm positioning an independent overlay window, not a subview. Since the transformation messes with -convertRect:from/toView: in my view hierarchy, I have no idea how to get to the frame I'm interested in. Any ideas? Regards Markus -- __ Markus Spoettl ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Providing a Service without activating an app
On Apr 2, 2013, at 4:43 PM, Kevin Callahan kc...@mac.com wrote: So, basically, my solution was to minimize my app, do the service work, then activate Xcode, then insert results. Maybe there's a better way? Thanks, Kevin! I think you may have mentioned dealing with this a while back. One reason I suspect there's no way to avoid (briefly) activating the app is precisely because of what Accessorizer does. I have the luxury of being able to (and wanting to) go in the opposite direction, from .app to .service instead of vice versa. I found one person's sample code, from which I figured out how to find plenty of examples in GitHub: simply search for NSRegisterServicesProvider. I now have converted my project to a .service, which fortunately is pretty simple. It wasn't hard to modify my Application project, but I'm surprised there's no Xcode template for a Service project. I haven't found any help from Apple except this one line: To build a standalone service, use the extension .service and store it in Library/Services. How did everybody else learn how to write a .service? --Andy ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Providing a Service without activating an app
On Apr 3, 2013, at 3:27 AM, Andy Lee ag...@mac.com wrote: How did everybody else learn how to write a .service? To answer my own question, I see now chapters on the subject in a couple of the older books on my shelves. --Andy ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UIView final frame after device rotation
On Apr 3, 2013, at 00:16 , Markus Spoettl ms_li...@shiftoption.com wrote: bounds and center are correct at all times. However, I need the view's frame in screen coordinates because I'm positioning an independent overlay window, not a subview. Since the transformation messes with -convertRect:from/toView: in my view hierarchy, I have no idea how to get to the frame I'm interested in. Any ideas? It might be easier just not to work with the frame at all. I suspect you can use 'convertPoint:…' on the center to get to the coordinate system you need for the attached view, then use that and the bounds to compute the attached view's center and bounds. ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UIView final frame after device rotation
On 4/3/13 6:42 PM, Quincey Morris wrote: bounds and center are correct at all times. However, I need the view's frame in screen coordinates because I'm positioning an independent overlay window, not a subview. Since the transformation messes with -convertRect:from/toView: in my view hierarchy, I have no idea how to get to the frame I'm interested in. Any ideas? It might be easier just not to work with the frame at all. I suspect you can use 'convertPoint:…' on the center to get to the coordinate system you need for the attached view, then use that and the bounds to compute the attached view's center and bounds. I'll try that, thanks for the suggestion! Regards Markus -- __ Markus Spoettl ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSOpenPanel not showing iCloud
Dear all We are trying to make our application iCloud savvy. We have sandboxed it, and we have enabled iCloud in the Xcode target settings. The application uses NSDocument-derived documents. We are using the latest public release of Mac OS 10.8 The save dialog boxes show iCloud as expected, and they allow us to save or documents on iCloud. However, the open dialog boxes don't. We basically invoke the open dialog boxes as follows: panel = [NSOpenPanel openPanel]; result = [panel runModal]; The dialog box created in this way is an old-style open dialog box that does not provide any access to iCloud. We are a bit at the loss and any advice is appreciated. Best regards and thanks in advance Kurt smime.p7s Description: S/MIME cryptographic signature ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSOpenPanel not showing iCloud
At the moment, the only open panel that gets the iCloud treatment is the one created by -[NSDocumentController openDocument:] or -[NSDocumentController beginOpenPanelWithCompletionHandler:]. -KP On Apr 3, 2013, at 8:29 PM, Kurt Sutter k...@quansoft.com wrote: Dear all We are trying to make our application iCloud savvy. We have sandboxed it, and we have enabled iCloud in the Xcode target settings. The application uses NSDocument-derived documents. We are using the latest public release of Mac OS 10.8 The save dialog boxes show iCloud as expected, and they allow us to save or documents on iCloud. However, the open dialog boxes don't. We basically invoke the open dialog boxes as follows: panel = [NSOpenPanel openPanel]; result = [panel runModal]; The dialog box created in this way is an old-style open dialog box that does not provide any access to iCloud. We are a bit at the loss and any advice is appreciated. Best regards and thanks in advance Kurt ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/kperry%40apple.com This email sent to kpe...@apple.com ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Defaults not stored
My screensaver follows examples I've seen as far as creating its defaults in its initWithFrame method: ScreenSaverDefaults*defaults = [ScreenSaverDefaults defaultsForModuleWithName:MyModuleName]; // Register our default values: fileMan = [[NSFileManager alloc] init]; NSURL* defaultURL = [NSURL URLWithString:@/Applications]; NSArray*pictFolders = [fileMan URLsForDirectory:NSPicturesDirectory inDomains:NSUserDomainMask]; if(pictFolders != nil [pictFolders count] 0) defaultURL = [[pictFolders objectAtIndex:0] filePathURL]; [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: defaultURL, kImageFolderPathPrefKey, [NSNumber numberWithInteger:NSOnState], kUsePolaroidBorderPrefKey, nil]]; Then later in my startAnimation method I grab that value, but it's nil: ScreenSaverDefaults*defaults = [ScreenSaverDefaults defaultsForModuleWithName:MyModuleName]; NSURL* url = [defaults URLForKey:kImageFolderPathPrefKey]; I tried calling [defaults synchronize] after registerDefaults, but that didn't help. I also tried creating a mutable dictionary and adding the url and integer via setObject:forKey:. No matter which method I use to create the defaults, I can definitely *see* the url in the defaults object, but it comes out nil when I ask for URLForKey. If I actually go through the System Preferences window and set my screen saver's prefs from there, then the url comes out as a valid value. What am I doing wrong? -- Steve Mills Drummer, Mac geek ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Drawing an overbar on text?
Is there anyway to draw an overbar or vinculum over text in an NSString or NSAttributedString? How about with Core Text? I suppose I could use the combining Unicode character. An overbar is a solid single line over a range of glyphs: http://en.wikipedia.org/wiki/Overline Thanks, -- Rick ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Drawing an overbar on text?
On Apr 3, 2013, at 10:00 PM, Rick Mann rm...@latencyzero.com wrote: I suppose I could use the combining Unicode character. This is probably your best bet. --Kyle Sluder ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Drawing an overbar on text?
On Apr 3, 2013, at 22:12 , Kyle Sluder k...@ksluder.com wrote: This is probably your best bet. Alas, I tried it, and I get a broken bar of varying height (depends on each glyph). -- Rick ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com