Bug 2310 - resetting the Mask of a CALayer
Summary: resetting the Mask of a CALayer
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-12-02 08:35 UTC by Philippe Monteil
Modified: 2011-12-03 03:38 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Philippe Monteil 2011-12-02 08:35:57 UTC
given the implementation of the CALayer. set Mask property:
    
public virtual CALayer Mask
{
 [Export ("setMask:", ArgumentSemantic.Retain)]
 set
 {
     if (value == null)
     {
         throw new ArgumentNullException ("value");
     }
     if (this.IsDirectBinding)
     {
         Messaging.void_objc_msgSend_IntPtr (base.Handle, CALayer.selSetMask, value.Handle);
     }
     else
     {
         Messaging.void_objc_msgSendSuper_IntPtr (base.SuperHandle, CALayer.selSetMask, value.Handle);
     }
     this.__mt_Mask_var = value;
 }
}

it seems impossible to reset the .Mask of a CALayer since trying to assign it a null value will cause an exception.
Comment 1 Sebastien Pouliot 2011-12-02 17:09:59 UTC
good catch
Comment 2 Sebastien Pouliot 2011-12-02 17:23:39 UTC
Fixed in maccore/master ae8db486911615f3d4b47af22d6aa72d57ac12df
It will be in future releases of 5.x and 5.0.x (but not the ones already branched and in progress)
Thanks!
Comment 3 Philippe Monteil 2011-12-03 03:38:00 UTC
Thanks for your quick answer: reporting bugs to Xamarin is a pleasure :-)