CGContextSetFillColorWithColor: invalid context 0x0
I have two texitfields on login form. When I rotate the device, I got a lot of error message in a debugger console: : CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. After some googling I have implemented drawLayer:inContext: my UITextField subclass: - (void) drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { UIGraphicsPushContext(ctx); [super drawLayer:layer inContext:ctx]; UIGraphicsPopContext(); } but this didin't help at all. Thank you for help in advance, Vyacheslav. ___ 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: CGContextSetFillColorWithColor: invalid context 0x0
OS bug, been reported quite a lot of times. On 30 Oct, 2013, at 6:07 pm, Viacheslav Karamov wrote: > I have two texitfields on login form. When I rotate the device, I got a lot > of error message in a debugger console: > > : CGContextSetFillColorWithColor: invalid context 0x0. This is a > serious error. This application, or a library it uses, is using an invalid > context and is thereby contributing to an overall degradation of system > stability and reliability. This notice is a courtesy: please fix this > problem. It will become a fatal error in an upcoming update. > > : CGContextSaveGState: invalid context 0x0. This is a serious error. > This application, or a library it uses, is using an invalid context and is > thereby contributing to an overall degradation of system stability and > reliability. This notice is a courtesy: please fix this problem. It will > become a fatal error in an upcoming update. > > > After some googling I have implemented drawLayer:inContext: my UITextField > subclass: > > - (void) drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx > { >UIGraphicsPushContext(ctx); >[super drawLayer:layer inContext:ctx]; >UIGraphicsPopContext(); > } > > but this didin't help at all. > > Thank you for help in advance, > Vyacheslav. > ___ > > 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/rols%40rols.org > > This email sent to r...@rols.org ___ 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: CGContextSetFillColorWithColor: invalid context 0x0
But do you have any workaround for it? 30.10.13, 12:26, Roland King пишет: OS bug, been reported quite a lot of times. On 30 Oct, 2013, at 6:07 pm, Viacheslav Karamov wrote: I have two texitfields on login form. When I rotate the device, I got a lot of error message in a debugger console: : CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. : CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update. After some googling I have implemented drawLayer:inContext: my UITextField subclass: - (void) drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { UIGraphicsPushContext(ctx); [super drawLayer:layer inContext:ctx]; UIGraphicsPopContext(); } but this didin't help at all. Thank you for help in advance, Vyacheslav. ___ 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/rols%40rols.org This email sent to r...@rols.org ___ 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: CGContextSetFillColorWithColor: invalid context 0x0
No. I get it a lot when I am using a non-english keyboard, chinese particularly. Since it's an OS internal bug and not one of mine, I'm assuming someone is going to eventually fix it. On 30 Oct, 2013, at 7:05 pm, Viacheslav Karamov wrote: > But do you have any workaround for it? > > > 30.10.13, 12:26, Roland King пишет: >> OS bug, been reported quite a lot of times. >> >> On 30 Oct, 2013, at 6:07 pm, Viacheslav Karamov wrote: >> >>> I have two texitfields on login form. When I rotate the device, I got a >>> lot of error message in a debugger console: >>> >>> : CGContextSetFillColorWithColor: invalid context 0x0. This is a >>> serious error. This application, or a library it uses, is using an invalid >>> context and is thereby contributing to an overall degradation of system >>> stability and reliability. This notice is a courtesy: please fix this >>> problem. It will become a fatal error in an upcoming update. >>> >>> : CGContextSaveGState: invalid context 0x0. This is a serious error. >>> This application, or a library it uses, is using an invalid context and is >>> thereby contributing to an overall degradation of system stability and >>> reliability. This notice is a courtesy: please fix this problem. It will >>> become a fatal error in an upcoming update. >>> >>> >>> After some googling I have implemented drawLayer:inContext: my UITextField >>> subclass: >>> >>> - (void) drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx >>> { >>>UIGraphicsPushContext(ctx); >>>[super drawLayer:layer inContext:ctx]; >>>UIGraphicsPopContext(); >>> } >>> >>> but this didin't help at all. >>> >>> Thank you for help in advance, >>> Vyacheslav. >>> ___ >>> >>> 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/rols%40rols.org >>> >>> This email sent to r...@rols.org > ___ 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
Disabling NSOutlineView animations not respected in Mavericks
We've noticed that disabling expand/collapse animations isn't respected under Mavericks (still works fine in Lion/ML) - is there a specific way to avoid it in Mavericks? Tthe trick we use (as per Apple): - (void)expandItem:(id)item expandChildren:(BOOL)expandChildren { [NSAnimationContextbeginGrouping]; [[NSAnimationContextcurrentContext] setDuration:0]; [super expandItem:item expandChildren:expandChildren]; [NSAnimationContextendGrouping]; } ___ 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: Disabling NSOutlineView animations not respected in Mavericks
On Wed, Oct 30, 2013, at 10:16 AM, Sebastien Boisvert wrote: > We've noticed that disabling expand/collapse animations isn't respected > under Mavericks (still works fine in Lion/ML) - is there a specific way > to avoid it in Mavericks? > > Tthe trick we use (as per Apple): > > - (void)expandItem:(id)item expandChildren:(BOOL)expandChildren > { > [NSAnimationContextbeginGrouping]; > [[NSAnimationContextcurrentContext] setDuration:0]; NSAnimationContext now has an `allowsImplicitAnimation` property, which is analogous to +[UIView setAnimationsEnabled:] on iOS. Have you tried setting that to NO? --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: Disabling NSOutlineView animations not respected in Mavericks
I’ve tried setting that to NO (right after the +beginGrouping call) and it doesn’t make any difference. I’ve also tried to making +isCompatibleWithResponsiveScrolling return NO where appropriate - same result. On Oct 30, 2013, at 1:58 PM, Kyle Sluder wrote: > On Wed, Oct 30, 2013, at 10:16 AM, Sebastien Boisvert wrote: >> We've noticed that disabling expand/collapse animations isn't respected >> under Mavericks (still works fine in Lion/ML) - is there a specific way >> to avoid it in Mavericks? >> >> Tthe trick we use (as per Apple): >> >> - (void)expandItem:(id)item expandChildren:(BOOL)expandChildren >> { >> [NSAnimationContextbeginGrouping]; >> [[NSAnimationContextcurrentContext] setDuration:0]; > > NSAnimationContext now has an `allowsImplicitAnimation` property, which > is analogous to +[UIView setAnimationsEnabled:] on iOS. Have you tried > setting that to NO? > > --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
10.9: Some Async Saving is ON even if you say NO?
In the giant stack that implements document saving in Cocoa, -[NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:] invokes -[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:] Preliminary tests indicate that, in 10.9, the first method there is returning before the second one is invoked, and I think this was not the case in 10.8. I am surprised because this is actually a Core Data NSPersistentDocument, and following Apple recommendations I have implemented -[MyDocument canAsynchronouslyWriteToURL:ofType:forSaveOperation:] to return NO. I don’t remember any mention of this change in any of the 2013 WWDC Videos, and there is no mention of it in the 10.9 AppKit release notes. Is there somewhere else I could read about this, and Apple’s recommendations before I do something the hard/stupid way? Unfortunately, that will need to be soon because it seems this change has caused a bug in my transient Helper tool which modifies documents: The tool exits before the changes are saved to the disk :( Thanks, Jerry Krinock ___ 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
Superimposing NSViews over an SKView
In Apple's Sprite Kit documentation, it claims: "Because Sprite Kit content is rendered by a view object, you can combine this view with other views in the view hierarchy. For example, you can use standard button controls and place them above your Sprite Kit view. Or, you can add interactivity to sprites to implement your own buttons; the choice is up to you." https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/GettingStarted/GettingStarted.html However, I have so far had no success getting NSButtons and other NSView-based views to appear on top of an SKView. I've tried making the view a subview of the SKView, making it an overlapping sibling view, building it programmatically, putting it in the XIB — in all cases, the NSView-based object is not drawn. Am I missing something here? Is there some flag somewhere that I need to set for this to work? Or is the documentation here incorrect? Thanks, Charles ___ 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: 10.9: Some Async Saving is ON even if you say NO?
On 2013 Oct 30, at 16:00, Jerry Krinock wrote: > Preliminary tests indicate that, in 10.9, the first method there is returning > before the second one is invoked, and I think this was not the case in 10.8. It turns out that 10.8 does this too, but apparently 10.9 is slower, or possibly other operations are relatively faster, which exposed the bug in my tool. I was going by the “Saving a Document” diagram [1] in the Document-Based Programming Guide for Mac, which implies that the document-saving methods are “stacked” and return synchronously in the the conventional way. This has been false since NSDocument got all of its perform-synchronous-activity magic that came with 10.7 Lion. Jerry [1] I have previously reported this incorrect documentation, Bug 10256432, but the response was that I should use Document Feedback for specific mistakes. So I did that today, mentioning the incorrectness of the call “stack” in the “Saving a Document” diagram, the deprecated methods mentioned in the text, and the need for a new diagram explaining how Auto Save works. https://developer.apple.com/library/mac/documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/AdvancedTopics/AdvancedTopics.html#//apple_ref/doc/uid/TP40011179-CH7-SW21 ___ 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