Quartz Display Services Retina Display Modes
Hey All, AFAIK there is no way to find retina display modes with Quartz Display Services right now. Why is that? Is there any workaround or different API? Right now, if I change the Display Mode of my retina display programmatically, I have to cache the original retina display mode in order to return to it, as CGDisplayCopyAllDisplayModes won’t expose them to me. Are we still waiting for a proper public API to handle these things or am I fundamentally misunderstanding something here? Thanks, Matthias ___ 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: Quartz Display Services Retina Display Modes
I just realized that the cocoa list might not be the best place to ask this question, as it somewhat includes all available osx APIs. I’d be glad about any hints, though. Thanks. Am 19.05.2014 um 23:59 schrieb Matthias Dörfelt li...@mokafolio.de: Hey All, AFAIK there is no way to find retina display modes with Quartz Display Services right now. Why is that? Is there any workaround or different API? Right now, if I change the Display Mode of my retina display programmatically, I have to cache the original retina display mode in order to return to it, as CGDisplayCopyAllDisplayModes won’t expose them to me. Are we still waiting for a proper public API to handle these things or am I fundamentally misunderstanding something here? Thanks, Matthias ___ 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: Quartz Display Services Retina Display Modes
On May 20, 2014, at 1:59 AM, Matthias Dörfelt wrote: AFAIK there is no way to find retina display modes with Quartz Display Services right now. Why is that? Is there any workaround or different API? Right now, if I change the Display Mode of my retina display programmatically, I have to cache the original retina display mode in order to return to it, as CGDisplayCopyAllDisplayModes won’t expose them to me. Are we still waiting for a proper public API to handle these things or am I fundamentally misunderstanding something here? It's not that you're misunderstanding, it's that the new capability has not been documented well. It's only listed in the headers. In /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDirectDisplay.h you'll find the declaration of kCGDisplayShowDuplicateLowResolutionModes. That's a key that can be used in the options dictionary parameter of CGDisplayCopyAllDisplayModes(). Use the value kCFBooleanTrue. There are also new functions to get the dimensions of a display mode in pixels rather than points: CGDisplayModeGetPixelWidth() and CGDisplayModeGetPixelHeight(). Without these, you may mistake a HiDPI display mode as a normal one, since its dimensions will be reported in points. For what it's worth, I found that the old, deprecated display mode APIs (e.g. CGDisplayAvailableModes()) list all of the display modes with no special flags or options. Regards, Ken ___ 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: NSDatePicker : Displaying and binding to nil.
I haven’t looked at your code, but why not use a nil placeholder value when binding? Pass an options dictionary with a key / value pair of NSNullPlaceholderBindingOption / the value you want to use when nil to the -bind:… method, or specify the value for the nil placeholder in the nib. Something like: [datePicker bind: NSValueBinding toObject: self withKeyPath: @“myDate options: @{ NSNullPlaceholderBindingOption, [NSDate futureDate] }]; Hope that helps... —Rob On May 15, 2014, at 2:47 PM, Jonathan Mitchell jonat...@mugginsoft.com wrote: NSDatePicker cannot display or bind to a nil dateValue so I have put together something that might be of use when binding to NSDate instances that might be nil. https://github.com/ThesaurusSoftware/TFDatePicker Subclassing NSDatePickerCell is made difficult because NSDatePickerCell does not call - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView to draw its interior. I therefore obscure the controls persistent dateValue by setting the fore and background colours equal. If anyone can think of a better approach I would be glad to hear it. Jonathan ___ 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/petrock%40mac.com This email sent to petr...@mac.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
Re: NSDatePicker : Displaying and binding to nil.
On 20 May 2014, at 11:35, Rob Petrovec petr...@mac.com wrote: I haven’t looked at your code, but why not use a nil placeholder value when binding? Pass an options dictionary with a key / value pair of NSNullPlaceholderBindingOption / the value you want to use when nil to the -bind:… method, or specify the value for the nil placeholder in the nib. Something like: [datePicker bind: NSValueBinding toObject: self withKeyPath: @“myDate options: @{ NSNullPlaceholderBindingOption, [NSDate futureDate] }]; Hope that helps... —Rob I think the fundamental issue is that NSDatePicker always displays a date regardless of -dateValue or the bound value. Using a [NSDate distantFuture] placeholder results in the NSDatePicker displaying 01/01/4001. In my app some dates are optional/initially empty and hence bound to nil. I need the date picker to reflect this. The TFDatePicker subclass observes a nil -dateValue or bound value and manages the draw state to represent this. The subclass also provides a popover that enables the user to reset the date picker to nil if required. Jonathan ___ 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: get set firewall status
It's still present on Mavericks, but the man page for ipfw reads: This utility is DEPRECATED. Please use pfctl(8) instead. Also, aside from the traditional port-based firewall, the firewall you enable/disable in the security pref pane is an application-level firewall, separate from ipfw or pf. Apple provides a command-line utility--afctl--to control that. This is the firewall represented in system_profiler output, so, check out the man page for (or use otool on) afctl. On Mon, May 19, 2014 at 5:05 PM, Marco S Hyman m...@snafu.org wrote: On May 19, 2014, at 1:03 PM, Alex Zavatone z...@mac.com wrote: Out of curiosity, in which version of the OS is pf taking over for ipfw? The switch started in Lion. I don't know if ipfw has been completely replaced. I seem to remember that some things were still being done in ipfw. Or maybe I'm thinking of the Application Layer Firewall. Marc ___ 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/marczak%40gmail.com This email sent to marc...@gmail.com -- Ed Marczak e: marc...@radiotope.com w: http://www.radiotope.com/writing MacTech Conference: http://www.mactech.com/conference ___ 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: get set firewall status
On 20 May 2014, at 19:48, Edward Marczak marc...@gmail.com wrote: This is the firewall represented in system_profiler output, so, check out the man page for (or use otool on) afctl. Thanks for the feedback everyone. I've done an exhaustive search, but there's nothing called 'afctl' on my system (latest public release of 10.9.3). If there's no Cocoa methods for interacting with the OS X firewall, then I'll throw this over at the list suggesed by Jens, and I supose further replies should probably be to me off-list to reduce noise. If I figure out the answer to this and others want to know what it is, email me and I'll cc you in any follow ups. Best Phil signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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
kCGStatusWindowLevel
does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? thanks in advance, edward taffel ___ 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
Core Data migration and non-optional transient relationships
Hi all, Doing a Core Data migration (not the lightweight kind) I hit an error at the end: foo is a required value. the 'foo' relationship it complains about is transient and so not present in the store. Normally, I recreate the relationship in awakeFromFetch, but it doesn't seem to call that during migration. As a test I made the relationship optional, then it no longer complains. This seems to mean that transient relationships must always be optional?! At least if you ever want to migrate. That seems odd. Am I missing something here? Thanks, -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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: kCGStatusWindowLevel
On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? I would code against it, as it can easily change at any time without notice. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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: NSAlert - Default Cancel also respond to Escape?
On May 19, 2014, at 4:30 PM, Seth Willits sli...@araelium.com wrote: Any ideas on how to get a Cancel button which is both the default button and responds to escape? Both require setting the button's key equivalent and there can only be one. This seems to work: NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:@Message text]; [alert setInformativeText:@Informative text.]; NSButton *okButton = [alert addButtonWithTitle:@OK]; NSButton *cancelButton = [alert addButtonWithTitle:@Cancel]; [cancelButton setFrame:NSMakeRect(1, 1, 0, 0)]; [cancelButton setTarget:okButton]; [cancelButton setAction:@selector(performClick:)]; [alert runModal]; It uses the fact that any button with a title of “Cancel” has a key equivalent of Escape You don't need to set the target and action, but they complete the illusion of Esc being a key equivalent for the OK button. --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: kCGStatusWindowLevel
On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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: kCGStatusWindowLevel
apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. thanks for your response! edward On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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/etaffel%40me.com This email sent to etaf...@me.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
Re: Core Data migration and non-optional transient relationships
On 20 May 2014, at 15:21, Sean McBride s...@rogue-research.com wrote: Hi all, Doing a Core Data migration (not the lightweight kind) I hit an error at the end: foo is a required value. the 'foo' relationship it complains about is transient and so not present in the store. Normally, I recreate the relationship in awakeFromFetch, but it doesn't seem to call that during migration. As a test I made the relationship optional, then it no longer complains. This seems to mean that transient relationships must always be optional?! At least if you ever want to migrate. That seems odd. Am I missing something here? How about -awakeFromInsert? During a migration, new objects are being created, based on the existing ones. Thus -awakeFromInsert gets called on them rather than -awakeFromFetch. ___ 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: Quartz Display Services Retina Display Modes
Thanks, that does exactly what I want. The naming of kCGDisplayShowDuplicateLowResolutionModes seems is very confusing and ambiguous to me, though. Thanks for the help! Matthias Am 20.05.2014 um 00:32 schrieb Ken Thomases k...@codeweavers.com: On May 20, 2014, at 1:59 AM, Matthias Dörfelt wrote: AFAIK there is no way to find retina display modes with Quartz Display Services right now. Why is that? Is there any workaround or different API? Right now, if I change the Display Mode of my retina display programmatically, I have to cache the original retina display mode in order to return to it, as CGDisplayCopyAllDisplayModes won’t expose them to me. Are we still waiting for a proper public API to handle these things or am I fundamentally misunderstanding something here? It's not that you're misunderstanding, it's that the new capability has not been documented well. It's only listed in the headers. In /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGDirectDisplay.h you'll find the declaration of kCGDisplayShowDuplicateLowResolutionModes. That's a key that can be used in the options dictionary parameter of CGDisplayCopyAllDisplayModes(). Use the value kCFBooleanTrue. There are also new functions to get the dimensions of a display mode in pixels rather than points: CGDisplayModeGetPixelWidth() and CGDisplayModeGetPixelHeight(). Without these, you may mistake a HiDPI display mode as a normal one, since its dimensions will be reported in points. For what it's worth, I found that the old, deprecated display mode APIs (e.g. CGDisplayAvailableModes()) list all of the display modes with no special flags or options. Regards, Ken ___ 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: Core Data migration and non-optional transient relationships
On 2014 May 20, at 07:21, Sean McBride s...@rogue-research.com wrote: As a test I made the relationship optional, then it no longer complains. Consider leaving it that way, Sean. The only effect I’ve ever had from setting Core Data properties to be non-optional is the creation of mysterious errors and exceptions like this during build-ups and tear-downs. If you need stuff validated in your data model, write your own code to do it, in places where you can make an appropriate recovery. ___ 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: Core Data migration and non-optional transient relationships
During migration you have a bare NSManagedObject and not your custom subclass. So any custom code has to be in a migration policy. Sent from my iPhone On May 20, 2014, at 12:07 PM, Mike Abdullah mabdul...@karelia.com wrote: On 20 May 2014, at 15:21, Sean McBride s...@rogue-research.com wrote: Hi all, Doing a Core Data migration (not the lightweight kind) I hit an error at the end: foo is a required value. the 'foo' relationship it complains about is transient and so not present in the store. Normally, I recreate the relationship in awakeFromFetch, but it doesn't seem to call that during migration. As a test I made the relationship optional, then it no longer complains. This seems to mean that transient relationships must always be optional?! At least if you ever want to migrate. That seems odd. Am I missing something here? How about -awakeFromInsert? During a migration, new objects are being created, based on the existing ones. Thus -awakeFromInsert gets called on them rather than -awakeFromFetch. ___ 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/dave.fernandes%40utoronto.ca This email sent to dave.fernan...@utoronto.ca ___ 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: Question on NSTableViewDataSource Protocol
On 2014 May 18, at 14:38, Varun Chandramohan varun.chandramo...@wontok.com wrote: so lets say I avoid [_tableContents removeAllObjects] Indeed. I think that the vote in this thread is now about 6 to 0 *against* using -removeAllObjects :) Could I do something like this before removing the objects? [ltableView removeRowsAtIndexes:indexes withAnimation:NSTableViewAnimationSlideDown]; You don’t need to worry about table rows, Varun. Remove the row from the data model / data source, then invoke -[NSTableView reloadData] which will propagate the change into the table. Table view data sources are wonderful. ___ 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: kCGStatusWindowLevel
This sounds like something we hit in 10.9 fullscreen on secondary monitors; we had to do this to get it to setFrame where we told it: in NSWindow subclass: - (NSRect)constrainFrameRect: (NSRect)frameRect toScreen: (NSScreen *)screen { return frameRect; } On May 20, 2014, at 8:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. thanks for your response! edward On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/etaffel%2540me.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=je0KOJZ%2Fj20mhCH6IUPQQZ2qpdy5WQsB5aRrMY%2B%2FOds%3D%0As=2e5431b409261465536538ab41718f4d7484d30e8d9327ff32882508d4f859db This email sent to etaf...@me.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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=je0KOJZ%2Fj20mhCH6IUPQQZ2qpdy5WQsB5aRrMY%2B%2FOds%3D%0As=2054091c15d0fdfde844adb333fc97924eb82028d0016ad7553c129f33c87501 This email sent to lruc...@vmware.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
Re: kCGStatusWindowLevel
On May 20, 2014, at 9:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. AFAIK, status window level is for windows belonging to NSStatusItems. I am not completely educated on full screen issues, but I imagine since changing the window layer changes its behavior, the full screen semantics are using the window layer as a hint to handle resizing. Just for grins, what happens when you send -toggleFullScreen: to your overlay? On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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: get set firewall status
D'oh...brain slip: /usr/libexec/ApplicationFirewall/socketfilterfw is what you want. No man page, but there's a --help flag. On Tue, May 20, 2014 at 10:05 AM, 2551 2551p...@gmail.com wrote: On 20 May 2014, at 19:48, Edward Marczak marc...@gmail.com wrote: This is the firewall represented in system_profiler output, so, check out the man page for (or use otool on) afctl. Thanks for the feedback everyone. I've done an exhaustive search, but there's nothing called 'afctl' on my system (latest public release of 10.9.3). If there's no Cocoa methods for interacting with the OS X firewall, then I'll throw this over at the list suggesed by Jens, and I supose further replies should probably be to me off-list to reduce noise. If I figure out the answer to this and others want to know what it is, email me and I'll cc you in any follow ups. Best Phil ___ 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/marczak%40gmail.com This email sent to marc...@gmail.com -- Ed Marczak e: marc...@radiotope.com w: http://www.radiotope.com/writing MacTech Conference: http://www.mactech.com/conference ___ 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: kCGStatusWindowLevel
On May 20, 2014, at 2:51 PM, Lee Ann Rucker lruc...@vmware.com wrote: This sounds like something we hit in 10.9 fullscreen on secondary monitors; we had to do this to get it to setFrame where we told it: in NSWindow subclass: - (NSRect)constrainFrameRect: (NSRect)frameRect toScreen: (NSScreen *)screen { return frameRect; } thank you for this. i suppose it’s six-of-one as to which technique is simpler—i’ll look into it. On May 20, 2014, at 8:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. thanks for your response! edward On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/etaffel%2540me.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=je0KOJZ%2Fj20mhCH6IUPQQZ2qpdy5WQsB5aRrMY%2B%2FOds%3D%0As=2e5431b409261465536538ab41718f4d7484d30e8d9327ff32882508d4f859db This email sent to etaf...@me.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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=je0KOJZ%2Fj20mhCH6IUPQQZ2qpdy5WQsB5aRrMY%2B%2FOds%3D%0As=2054091c15d0fdfde844adb333fc97924eb82028d0016ad7553c129f33c87501 This email sent to lruc...@vmware.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
Re: kCGStatusWindowLevel
On May 20, 2014, at 5:18 PM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 9:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. AFAIK, status window level is for windows belonging to NSStatusItems. go figure—i’ve never fiddled with status bar items: i thought something completely different. i wish they would note this in the header. I am not completely educated on full screen issues, but I imagine since changing the window layer changes its behavior, the full screen semantics are using the window layer as a hint to handle resizing. Just for grins, what happens when you send -toggleFullScreen: to your overlay? the overlay has no life of its own; it’s managed by the window it’s attached to—toggleFullScreen is out of its context. , i’ve just looked up toggleFullScreen (again): i’ve never seen a method description more in need of editing. thanks for your comments keary! On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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: kCGStatusWindowLevel
On May 20, 2014, at 4:45 PM, edward taffel wrote: On May 20, 2014, at 5:18 PM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 9:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. AFAIK, status window level is for windows belonging to NSStatusItems. go figure—i’ve never fiddled with status bar items: i thought something completely different. i wish they would note this in the header. I am not completely educated on full screen issues, but I imagine since changing the window layer changes its behavior, the full screen semantics are using the window layer as a hint to handle resizing. Just for grins, what happens when you send -toggleFullScreen: to your overlay? the overlay has no life of its own; it’s managed by the window it’s attached to—toggleFullScreen is out of its context. , i’ve just looked up toggleFullScreen (again): i’ve never seen a method description more in need of editing. thanks for your comments keary! No, you wouldn't want to toggleFullScreen on it - it would go off into its own space! We tweaked window levels for what seemed like good reasons in 10.7 fullscreen, and then those tweaks didn't work so well with 10.9 because Apple was using different levels for some UI parts than it had before. At WWDC, Apple advised against it. The setFrame issue might be an Apple bug which we reported but I don't have the rdar handy - it's applying the constraints as if there was a menu there, and there *is*, but it slides down as needed and should not prevent windows going into that area. On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=uzaDYeANc2BRg2D0CSTBWJLLfFrsEcqavI6QpMfTAws%3D%0As=beabc2cdba95b599795fcc2ba8cdffa736d817b915d8eb60b0c96bd0b90df3de This email sent to lruc...@vmware.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
Re: kCGStatusWindowLevel
On May 20, 2014, at 8:06 PM, Lee Ann Rucker lruc...@vmware.com wrote: On May 20, 2014, at 4:45 PM, edward taffel wrote: On May 20, 2014, at 5:18 PM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 9:55 AM, edward taffel wrote: apologies keary, on reread, my question is badly cast: i should have read it the same as you. the issue is: i have an overlay (created programmatically w/ NSBorderlessWindowMask) at the top of my document view; after switching to full screen setFrame disregards my requested rect (without log emission) adjusts to a max below the menu drop-down area. best coding practice suggests (to me) an arithmetical level adjustment like document-window-level plus one, but this does not attain. kCGOverlayWindowLevel does the trick, but kCGStatusWindowLevel is lower on the list i wondered what class of window is intended at this level. AFAIK, status window level is for windows belonging to NSStatusItems. go figure—i’ve never fiddled with status bar items: i thought something completely different. i wish they would note this in the header. I am not completely educated on full screen issues, but I imagine since changing the window layer changes its behavior, the full screen semantics are using the window layer as a hint to handle resizing. Just for grins, what happens when you send -toggleFullScreen: to your overlay? the overlay has no life of its own; it’s managed by the window it’s attached to—toggleFullScreen is out of its context. , i’ve just looked up toggleFullScreen (again): i’ve never seen a method description more in need of editing. thanks for your comments keary! No, you wouldn't want to toggleFullScreen on it - it would go off into its own space! We tweaked window levels for what seemed like good reasons in 10.7 fullscreen, and then those tweaks didn't work so well with 10.9 because Apple was using different levels for some UI parts than it had before. At WWDC, Apple advised against it. The setFrame issue might be an Apple bug which we reported but I don't have the rdar handy - it's applying the constraints as if there was a menu there, and there *is*, but it slides down as needed and should not prevent windows going into that area. i’m glad someone else thinks it’s a bug. i’ve had similar level issues w/ overlays in viewing mode (i.e. time machine), which i might broach in a new thread. thanks lee ann! On May 20, 2014, at 10:59 AM, edward taffel etaf...@me.com wrote: On May 20, 2014, at 10:41 AM, Keary Suska cocoa-...@esoteritech.com wrote: On May 20, 2014, at 8:17 AM, edward taffel wrote: does anyone know where to find the definition of kCGStatusWindowLevel (NSStatusWindowLevel)? or alternatively, can anyone define it? NSStatusWindowLevel is declared in NSWindow.h, kCGStatusWindowLevel is declared in CGWindowLevel.h. Is it the actual numeric value of the constant that you want? no, the definition of a status window; i.e. what is it used for? I would code against it, as it can easily change at any time without notice. Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.comk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=uzaDYeANc2BRg2D0CSTBWJLLfFrsEcqavI6QpMfTAws%3D%0As=beabc2cdba95b599795fcc2ba8cdffa736d817b915d8eb60b0c96bd0b90df3de This email sent to lruc...@vmware.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
how to mumap memory from CoreGraphics?
I have an app that used a lot CoreGraphics and by using UIGraphicsGetCurrentContext() and CGContextDrawImage and etc CoreGraphics founctions, these functions call mmap() and these use a lot virtual memory. The problem is when I receive low memory warning, the memory used by mmap() in virtual memory will not release automaticly, and I don't have a way to manually release them. The app crash due to the virtual memory pressure, my real RAM usage is very low. How can I manually release the mmap() memory created by CoreGraphics? Thx ___ 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: how to mumap memory from CoreGraphics?
On May 20, 2014, at 5:53 PM, vipgs99 vipg...@gmail.com wrote: I have an app that used a lot CoreGraphics and by using UIGraphicsGetCurrentContext() and CGContextDrawImage and etc CoreGraphics founctions, these functions call mmap() and these use a lot virtual memory. The problem is when I receive low memory warning, the memory used by mmap() in virtual memory will not release automaticly, and I don't have a way to manually release them. The app crash due to the virtual memory pressure, my real RAM usage is very low. How can I manually release the mmap() memory created by CoreGraphics? Thx Virtual memory will not crash you unless you reach the VM limit of 2GB. If you’ve reached that with only virtual memory then you crash due to something else trying to allocate memory and not being able to. Typically if you are drawing content however, you won’t be limited by the VM limit, but by available memory. The way to resolve that is to release the objects (images, context, etc) that you are holding on to. If you are calling UIGraphicsGetImageFromCurrentContext(), then you need to release those images (and ensure that any image views displaying them have their image set to nil). If this is the result of view drawing (via -drawRect: typically) then you need to release the views themselves. However it is atypical to have views consume that much memory, unless your views implementing -drawRect: are especially large, or especially numerous. -- David Duncan ___ 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: kCGStatusWindowLevel
On May 20, 2014, at 5:06 PM, Lee Ann Rucker lruc...@vmware.com wrote: The setFrame issue might be an Apple bug which we reported but I don't have the rdar handy - it's applying the constraints as if there was a menu there, and there *is*, but it slides down as needed and should not prevent windows going into that area. We fixed that one for the next major OS X release (and it only applies to apps that are linked against the 10.8 SDK or earlier; if you link against the 10.9 SDK, you won’t see it). -eric ___ 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