2005-09-14 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Wed, 14 Sep 2005 21:00:09 +0000 (21:00 -0000)
committerChris Toshok <toshok@novell.com>
Wed, 14 Sep 2005 21:00:09 +0000 (21:00 -0000)
* Microsoft.Web.Atlas.dll.sources: add DraggableListItem.cs

* Microsoft.Web.UI/HoverBehavior.cs (AddAttributesToElement): add
comment about how MS NRE's here in our tests.
(InitializeTypeDescriptor): fix the ServerPropertyName for
"hoverElement".

* Microsoft.Web.UI/DraggableListItem.cs (AddAttributesToElement):
add comment about how MS NRE's here in our tests.

* Microsoft.Web.UI/DataSourceDropTarget.cs
(AddAttributesToElement): add comment about how MS NRE's here in
our tests.

* Microsoft.Web.UI/FloatingBehavior.cs (AddAttributesToElement):
add comment about how MS NRE's here in our tests.

* Microsoft.Web/Binding.cs: new implementation.

* Microsoft.Web/BindingDirection.cs: fix ordering on enum.

svn path=/trunk/mcs/; revision=50062

mcs/class/Microsoft.Web.Atlas/ChangeLog
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.Atlas.dll.sources
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/DataSourceDropTarget.cs
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/DragDropList.cs
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/DraggableListItem.cs [new file with mode: 0644]
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/FloatingBehavior.cs
mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/HoverBehavior.cs
mcs/class/Microsoft.Web.Atlas/Microsoft.Web/Binding.cs
mcs/class/Microsoft.Web.Atlas/Microsoft.Web/BindingDirection.cs

index 290275d79e9079cbb21d6a81e8fb52216a3b42c2..b0eea5fbcff1aa7ac07d4ef91d448de0488ba03e 100644 (file)
@@ -1,3 +1,26 @@
+2005-09-14  Chris Toshok  <toshok@ximian.com>
+
+       * Microsoft.Web.Atlas.dll.sources: add DraggableListItem.cs
+
+       * Microsoft.Web.UI/HoverBehavior.cs (AddAttributesToElement): add
+       comment about how MS NRE's here in our tests.
+       (InitializeTypeDescriptor): fix the ServerPropertyName for
+       "hoverElement".
+
+       * Microsoft.Web.UI/DraggableListItem.cs (AddAttributesToElement):
+       add comment about how MS NRE's here in our tests.
+
+       * Microsoft.Web.UI/DataSourceDropTarget.cs
+       (AddAttributesToElement): add comment about how MS NRE's here in
+       our tests.
+
+       * Microsoft.Web.UI/FloatingBehavior.cs (AddAttributesToElement):
+       add comment about how MS NRE's here in our tests.
+       
+       * Microsoft.Web/Binding.cs: new implementation.
+
+       * Microsoft.Web/BindingDirection.cs: fix ordering on enum.
+
 2005-09-14  Chris Toshok  <toshok@ximian.com>
 
        * Microsoft.Web.Atlas_test.dll.sources: add BindingTest and
index f2a63b6c77fcd28034d837e28193ba052f4f8ec3..ef17d3ee76693c0a8e4379bd74bae8a424232515 100644 (file)
@@ -32,6 +32,7 @@ Microsoft.Web.UI/Button.cs
 Microsoft.Web.UI/ClickBehavior.cs
 Microsoft.Web.UI/DataSourceDropTarget.cs
 Microsoft.Web.UI/DragDropList.cs
+Microsoft.Web.UI/DraggableListItem.cs
 Microsoft.Web.UI/DragMode.cs
 Microsoft.Web.UI/FloatingBehavior.cs
 Microsoft.Web.UI/HoverBehavior.cs
index 8771e652b65624b46740dddf614c8305b308ef4a..fcf25719f17f842ceb27facff63a9b3e4e0a5c17 100644 (file)
@@ -42,6 +42,11 @@ namespace Microsoft.Web.UI
                protected override void AddAttributesToElement (ScriptTextWriter writer)
                {
                        base.AddAttributesToElement (writer);
+
+                       // MS raises a NRE when this is called from
+                       // our tests.  speculation: they're accessing
+                       // Browser or Page to figure out if they
+                       // should be rendering attributes.
                }
 
                protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
index dc274d96b97e0c52d6c8251daffed5185f952cd9..b42f9684fcc9d882945b19640de5177c179c58b2 100644 (file)
@@ -44,6 +44,11 @@ namespace Microsoft.Web.UI
                protected override void AddAttributesToElement (ScriptTextWriter writer)
                {
                        base.AddAttributesToElement (writer);
+
+                       // MS raises a NRE when this is called from
+                       // our tests.  speculation: they're accessing
+                       // Browser or Page to figure out if they
+                       // should be rendering attributes.
                }
 
                protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
diff --git a/mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/DraggableListItem.cs b/mcs/class/Microsoft.Web.Atlas/Microsoft.Web.UI/DraggableListItem.cs
new file mode 100644 (file)
index 0000000..7156f7e
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// Microsoft.Web.UI.DraggableListItem
+//
+// Author:
+//   Chris Toshok (toshok@ximian.com)
+//
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Microsoft.Web.UI
+{
+       public class DraggableListItem : Behavior
+       {
+               public DraggableListItem ()
+               {
+               }
+
+               protected override void AddAttributesToElement (ScriptTextWriter writer)
+               {
+                       base.AddAttributesToElement (writer);
+
+                       // MS raises a NRE when this is called from
+                       // our tests.  speculation: they're accessing
+                       // Browser or Page to figure out if they
+                       // should be rendering attributes.
+               }
+
+               protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
+               {
+                       base.InitializeTypeDescriptor (typeDescriptor);
+
+                       typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("data", ScriptType.Object, false, ""));
+                       typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("handle", ScriptType.Object, false, "Handle"));
+                       typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("dragVisualTemplate", ScriptType.Object, false, ""));
+               }
+
+               string handle = null;
+               public string Handle {
+                       get {
+                               return handle;
+                       }
+                       set {
+                               handle = value;
+                       }
+               }
+
+               public override string TagName {
+                       get {
+                               return "draggableListItem";
+                       }
+               }
+       }
+}
+
+#endif
index 5e7932491299cf05f8ec8fa82bc0d588b9d2b9f5..b2991614f8ab840c6085c0fe2b39ffbf21fc1df6 100644 (file)
@@ -42,6 +42,11 @@ namespace Microsoft.Web.UI
                protected override void AddAttributesToElement (ScriptTextWriter writer)
                {
                        base.AddAttributesToElement (writer);
+
+                       // MS raises a NRE when this is called from
+                       // our tests.  speculation: they're accessing
+                       // Browser or Page to figure out if they
+                       // should be rendering attributes.
                }
 
                protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
index f8a41df7adeb2bd416f0faef7ad2c669f0b15270..73844f0c9e725ea2d5cd31de7a16c3ce0fa90ab1 100644 (file)
@@ -42,6 +42,11 @@ namespace Microsoft.Web.UI
                protected override void AddAttributesToElement (ScriptTextWriter writer)
                {
                        base.AddAttributesToElement (writer);
+
+                       // MS raises a NRE when this is called from
+                       // our tests.  speculation: they're accessing
+                       // Browser or Page to figure out if they
+                       // should be rendering attributes.
                }
 
                protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
@@ -52,7 +57,7 @@ namespace Microsoft.Web.UI
                        typeDescriptor.AddEvent (new ScriptEventDescriptor ("hover", true));
                        typeDescriptor.AddEvent (new ScriptEventDescriptor ("unhover", true));
 
-                       typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("hoverElement", ScriptType.Object, false, "HoverElementID"));
+                       typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("hoverElement", ScriptType.Object, false, ""));
                        typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("unhoverDelay", ScriptType.Number, false, "UnhoverDelay"));
                }
 
index 5cb28af4eb8ce8362778fc0d826f42a0a7b4ca4b..7e0b21cdca2a5b34e05fd359027adfbc880fbe37 100644 (file)
@@ -37,101 +37,156 @@ namespace Microsoft.Web
        {
                public Binding ()
                {
-                       throw new NotImplementedException ();
                }
 
+               bool automatic = true;
                public bool Automatic {
                        get {
-                               throw new NotImplementedException ();
+                               return automatic;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               automatic = value;
                        }
                }
 
+               string dataContext = "";
                public string DataContext {
                        get {
-                               throw new NotImplementedException ();
+                               return dataContext;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               dataContext = (value == null ? "" : value);
                        }
                }
 
+               string dataPath = "";
                public string DataPath {
                        get {
-                               throw new NotImplementedException ();
+                               return dataPath;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               dataPath = (value == null ? "" : value);
                        }
                }
 
+               BindingDirection direction = BindingDirection.In;
                public BindingDirection Direction {
                        get {
-                               throw new NotImplementedException ();
+                               return direction;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               direction = value;
                        }
                }
 
+               string id = "";
                public string ID {
                        get {
-                               throw new NotImplementedException ();
+                               return id;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               id = (value == null ? "" : value);
                        }
                }
 
+               string property = "";
                public string Property {
                        get {
-                               throw new NotImplementedException ();
+                               return property;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               property = (value == null ? "" : value);
                        }
                }
 
+               string propertyKey = "";
                public string PropertyKey {
                        get {
-                               throw new NotImplementedException ();
+                               return propertyKey;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               propertyKey = (value == null ? "" : value);
                        }
                }
 
+               TransformScriptEvent transform;
                public TransformScriptEvent Transform {
                        get {
-                               throw new NotImplementedException ();
+                               if (transform == null)
+                                       transform = new TransformScriptEvent (this);
+
+                               return transform;
                        }
                }
 
+               string transformerArgument = "";
                public string TransformerArgument {
                        get {
-                               throw new NotImplementedException ();
+                               return transformerArgument;
                        }
                        set {
-                               throw new NotImplementedException ();
+                               transformerArgument = (value == null ? "" : value);
                        }
                }
 
                public void RenderScript (ScriptTextWriter writer)
                {
-                       throw new NotImplementedException ();
+                       writer.WriteStartElement ("binding");
+
+                       if (Automatic == false)
+                               writer.WriteAttributeString ("automatic", Automatic.ToString());
+
+                       if (DataContext != "")
+                               writer.WriteAttributeString ("dataContext", DataContext);
+
+                       if (DataPath != "")
+                               writer.WriteAttributeString ("dataPath", DataPath);
+
+                       if (Direction != BindingDirection.In)
+                               writer.WriteAttributeString ("direction", Direction.ToString());
+
+                       if (ID != "")
+                               writer.WriteAttributeString ("id", ID);
+
+                       if (Property != "")
+                               writer.WriteAttributeString ("property", Property);
+
+                       if (PropertyKey != "")
+                               writer.WriteAttributeString ("propertyKey", PropertyKey);
+
+                       if (TransformerArgument != "")
+                               writer.WriteAttributeString ("transformerArgument", TransformerArgument);
+
+                       writer.WriteEndElement ();
                }
 
                public IScriptObject Owner {
                        get {
-                               throw new NotImplementedException ();
+                               return null;
                        }
                }
 
                ScriptTypeDescriptor IScriptObject.GetTypeDescriptor ()
                {
-                       throw new NotImplementedException ();
+                       ScriptTypeDescriptor d = new ScriptTypeDescriptor (this);
+
+                       d.AddEvent (new ScriptEventDescriptor ("transform", false));
+
+                       d.AddMethod (new ScriptMethodDescriptor ("evaluateIn", new string[0]));
+                       d.AddMethod (new ScriptMethodDescriptor ("evaluateOut", new string[0]));
+
+                       d.AddProperty (new ScriptPropertyDescriptor ("automatic", ScriptType.Boolean, false, "Automatic"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("dataContext", ScriptType.Object, false, "DataContext"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("dataPath", ScriptType.String, false, "DataPath"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("direction", ScriptType.Enum, false, "Direction"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("id", ScriptType.String, false, "ID"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("property", ScriptType.String, false, "Property"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("propertyKey", ScriptType.String, false, "PropertyKey"));
+                       d.AddProperty (new ScriptPropertyDescriptor ("transformerArgument", ScriptType.String, false, "TransformerArgument"));
+
+                       d.Close ();
+
+                       return d;
                }
        }
 }
index e02ac0cf3ba4dc768186175dc4f7f246ac6ad104..55057417b080d6540ee4c7c35a13fae531ff71e8 100644 (file)
@@ -34,8 +34,8 @@ namespace Microsoft.Web
        public enum BindingDirection
        {
                In,
-               InOut,
-               Out
+               Out,
+               InOut
        }
 }