Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan.mcgovern@gmail.com>2011-10-20 17:07:00 +0400
committerAlan McGovern <alan.mcgovern@gmail.com>2011-10-20 17:07:00 +0400
commitc0c15f0f6b457a0c8191d52da3a791d60a0386f2 (patch)
tree900a3b5eb8e48afb1fd2500f6e551cec099f6976 /main/src/addins/MonoDevelop.MacDev
parent532677501b29a95cd882bb50e5dcae7bdbfa82c4 (diff)
[MacDev] Implement a workaround 'view' property duplication in bug #1586
When syncing out to xcode, we should no longer sync 'view' properties on subclasses of UIViewController as they'd just conflict with the View property on the base class (which exposes the obj-c 'view' property) and cause crashes as in bug #1586.
Diffstat (limited to 'main/src/addins/MonoDevelop.MacDev')
-rw-r--r--main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
index 220543bf13..f4872c18e6 100644
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
@@ -200,6 +200,14 @@ namespace MonoDevelop.MacDev.ObjCIntegration
name = (string)((System.CodeDom.CodePrimitiveExpression)att.PositionalArguments[0]).Value;
if (string.IsNullOrEmpty (name))
name = prop.Name;
+
+ // HACK: Work around bug #1586 in the least obtrusive way possible. Strip out any outlet
+ // with the name 'view' on subclasses of MonoTouch.UIKit.UIViewController to avoid
+ // conflicts with the view property mapped there
+ if (name == "view")
+ if (dom.GetInheritanceTree (type).Any (p => p.FullName == "MonoTouch.UIKit.UIViewController"))
+ continue;
+
var ol = new IBOutlet (name, prop.Name, null, prop.ReturnType.FullName);
if (MonoDevelop.DesignerSupport.CodeBehind.IsDesignerFile (prop.DeclaringType.CompilationUnit.FileName))
ol.IsDesigner = true;