Author: mhutch
Date: 2007-02-24 10:01:38 -0500 (Sat, 24 Feb 2007)
New Revision: 73390
Modified:
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
trunk/monodevelop/Extras/AspNetEdit/ChangeLog
trunk/monodevelop/Extras/AspNetEdit/Makefile.am
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
Log:
2007-02-24 Michael Hutchinson <[EMAIL PROTECTED]>
* Makefile.am: Eliminate unnecessary copy during build.
* chrome/content/aspdesigner/xpcom.js,
* chrome/content/aspdesigner/editor.js: Fixed some JS warnings.
Fixed aspdesigner initialisation bug with Mozilla/Gecko >= 1.8, such
as Firefox >= 1.5.
* AspNetEdit.Editor.ComponentModel/NameCreationService.cs: Use
Int.TryParse now instead of catching exceptions.
Modified:
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
===================================================================
---
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
2007-02-24 10:02:33 UTC (rev 73389)
+++
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.ComponentModel/NameCreationService.cs
2007-02-24 15:01:38 UTC (rev 73390)
@@ -49,15 +49,11 @@
// and make suffixNumber bigger than the greatest of
them
foreach (IComponent comp in container.Components) {
if (comp.Site.Name.StartsWith (dataType.Name)) {
- string str = comp.Site.Name.Remove (0,
dataType.Name.Length);
- //TODO: Use int.TryParse in .NET 2.0
- try {
- int val = int.Parse (str);
- if (val >= suffixNumber)
- suffixNumber = val + 1;
- }
- catch (Exception ex) {}
- }
+ string str = comp.Site.Name.Remove (0,
dataType.Name.Length);
+ int val;
+ if (int.TryParse(str, out val) && val
>= suffixNumber)
+ suffixNumber = val + 1;
+ }
}
return dataType.Name + suffixNumber.ToString ();
Modified: trunk/monodevelop/Extras/AspNetEdit/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/ChangeLog 2007-02-24 10:02:33 UTC
(rev 73389)
+++ trunk/monodevelop/Extras/AspNetEdit/ChangeLog 2007-02-24 15:01:38 UTC
(rev 73390)
@@ -1,3 +1,15 @@
+2007-02-24 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * Makefile.am: Eliminate unnecessary copy during build.
+
+ * chrome/content/aspdesigner/xpcom.js,
+ * chrome/content/aspdesigner/editor.js: Fixed some JS warnings.
+ Fixed aspdesigner initialisation bug with Mozilla/Gecko >= 1.8, such
+ as Firefox >= 1.5.
+
+ * AspNetEdit.Editor.ComponentModel/NameCreationService.cs: Use
+ Int.TryParse now instead of catching exceptions.
+
2007-02-16 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* AspNetEdit.addin.xml: Change add-in versions to 0.13.
Modified: trunk/monodevelop/Extras/AspNetEdit/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/Makefile.am 2007-02-24 10:02:33 UTC
(rev 73389)
+++ trunk/monodevelop/Extras/AspNetEdit/Makefile.am 2007-02-24 15:01:38 UTC
(rev 73390)
@@ -70,7 +70,7 @@
DATA_FILES = \
data/WebControlsToolbox.xml
-DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD), $(DATA_FILES))
+DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD)/, $(notdir $(DATA_FILES)))
ADDIN = AspNetEdit.addin.xml
Modified:
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
2007-02-24 10:02:33 UTC (rev 73389)
+++ trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
2007-02-24 15:01:38 UTC (rev 73390)
@@ -30,7 +30,8 @@
var editor = null;
var host = null;
-var gDirectivePlaceholder = '';
+var gDirectivePlaceholder = '';
+var clip = null;
@@ -164,7 +165,7 @@
throwException: function (location, msg)
{
JSCallPlaceClrCall ('ThrowException', '', new Array(location,
msg));
- },
+ }
}
@@ -305,7 +306,11 @@
// The editor class and initialization
//_____________________________________________________________________________
function aspNetEditor_initialize()
-{
+{
+ //host XUL doc's onload event fires twice for some reason
+ if (editor != null)
+ return;
+
dump ("Initialising...");
editor = new aspNetEditor ();
dump ("\tCreated editor, initialising...");
@@ -410,7 +415,9 @@
editor instanceof
Components.interfaces.nsIPlaintextEditor;
editor instanceof Components.interfaces.nsIHTMLEditor;
- } catch (e) {}
+ } catch (e) {
+ dump("Could not obtain nsIHTMLEditor: " + e);
+ }
return editor;
},
@@ -1073,7 +1080,7 @@
while((table = aTables.nextNode ()) != null) {
table.setAttribute ('cancelUI', 'true');
}
- },
+ }
};
//* ___________________________________________________________________________
@@ -1345,4 +1352,4 @@
if(DEBUG) {
JSCallPlaceClrCall ('DebugStatement', '', new
Array(aTxtAppend));
}
-}
\ No newline at end of file
+}
Modified:
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
2007-02-24 10:02:33 UTC (rev 73389)
+++ trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/xpcom.js
2007-02-24 15:01:38 UTC (rev 73390)
@@ -63,7 +63,7 @@
// Make sure we can't focus a control
//TODO: make it account for md-can-drop="true" controls, which
// should be able to recieve focus
- if(sel.isCollapsed) {
+ if(sel.isCollapsed && editor && editor.base) {
var focusNode = sel.focusNode;
var parentControl =
editor.base.getElementOrParentByTagName
(CONTROL_TAG_NAME,
@@ -312,7 +312,7 @@
WillSplitNode: function(existingRightNode, offset)
{
//alert ('Will split node');
- },
+ }
}
// nsIHTMLObjectResizeListener implementation
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches