Changeset 224
- Timestamp:
- 03/09/10 17:37:10 (14 years ago)
- Location:
- ComponentRegistry/trunk/ComponentBrowserGui
- Files:
-
- 8 added
- 20 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/pom.xml
r206 r224 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">3 4 <modelVersion>4.0.0</modelVersion>2 <project xmlns="http://maven.apache.org/POM/4.0.0" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 5 5 6 <groupId>clarin.cmdi</groupId> 7 <artifactId>ComponentBrowserGui</artifactId> 8 <version>1.1-SNAPSHOT</version> 9 <packaging>swf</packaging> 10 <name>ComponentBrowserGui</name> 6 <modelVersion>4.0.0</modelVersion> 7 8 <groupId>clarin.cmdi</groupId> 9 <artifactId>ComponentBrowserGui</artifactId> 10 <version>1.1-SNAPSHOT</version> 11 <packaging>swf</packaging> 12 <name>ComponentBrowserGui</name> 11 13 <properties> 12 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 13 <targetPlayer>10.0.0</targetPlayer> 14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 14 15 </properties> 15 16 16 17 <dependencies> 17 <dependency> 18 <groupId>com.adobe.flex.framework</groupId> 19 <artifactId>flex-framework</artifactId> 20 <version>3.5.0.12683</version> 21 <type>pom</type> 22 <exclusions> 23 <exclusion> 24 <groupId>com.adobe.flex.framework</groupId> 25 <artifactId>playerglobal</artifactId> 26 </exclusion> 27 </exclusions> 28 </dependency> 29 <dependency> 30 <groupId>com.adobe.flex.framework</groupId> 31 <artifactId>playerglobal</artifactId> 32 <version>3.5.0.12683</version> 33 <classifier>10</classifier> 34 <type>swc</type> 35 </dependency> 36 <dependency> 37 <groupId>org.httpclient</groupId> 38 <artifactId>as3httpclientlib</artifactId> 39 <version>1.0.6</version> 40 <type>swc</type> 41 </dependency> 42 <dependency> 43 <groupId>com.adobe</groupId> 44 <artifactId>as3corelib</artifactId> 45 <version>0.92.1</version> 46 <type>swc</type> 47 </dependency> 48 <dependency> 49 <groupId>com.hurlant</groupId> 50 <artifactId>as3crypto</artifactId> 51 <version>1.3</version> 52 <type>swc</type> 53 </dependency> 18 <dependency> 19 <groupId>com.adobe.flex.framework</groupId> 20 <artifactId>flex-framework</artifactId> 21 <version>3.5.0.12683</version> 22 <type>pom</type> 23 <exclusions> 24 <exclusion> 25 <groupId>com.adobe.flex.framework</groupId> 26 <artifactId>playerglobal</artifactId> 27 </exclusion> 28 </exclusions> 29 </dependency> 30 <dependency> 31 <groupId>com.adobe.flex.framework</groupId> 32 <artifactId>playerglobal</artifactId> 33 <version>3.5.0.12683</version> 34 <classifier>10</classifier> 35 <type>swc</type> 36 </dependency> 37 <dependency> 38 <groupId>org.httpclient</groupId> 39 <artifactId>as3httpclientlib</artifactId> 40 <version>1.0.6</version> 41 <type>swc</type> 42 </dependency> 43 <dependency> 44 <groupId>com.adobe</groupId> 45 <artifactId>as3corelib</artifactId> 46 <version>0.92.1</version> 47 <type>swc</type> 48 </dependency> 49 <dependency> 50 <groupId>com.hurlant</groupId> 51 <artifactId>as3crypto</artifactId> 52 <version>1.3</version> 53 <type>swc</type> 54 </dependency> 55 <dependency> 56 <groupId>com.adobe.flexunit</groupId> 57 <artifactId>flexunit</artifactId> 58 <version>0.90</version> 59 <type>swc</type> 60 <scope>test</scope> 61 </dependency> 54 62 </dependencies> 55 63 56 <build> 57 <sourceDirectory>src/main/flex</sourceDirectory> 58 <plugins> 59 <plugin> 60 <groupId>org.sonatype.flexmojos</groupId> 61 <artifactId>flexmojos-maven-plugin</artifactId> 62 <version>3.5.0</version> 63 <extensions>true</extensions> 64 <configuration> 65 <debug>true</debug> 66 </configuration> 67 <dependencies> 68 <dependency> 69 <groupId>com.adobe.flex</groupId> 70 <artifactId>compiler</artifactId> 71 <version>3.5.0.12683</version> 72 <type>pom</type> 73 </dependency> 74 </dependencies> 75 </plugin> 76 </plugins> 77 </build> 64 <build> 65 <sourceDirectory>src/main/flex</sourceDirectory> 66 <plugins> 67 <plugin> 68 <groupId>org.sonatype.flexmojos</groupId> 69 <artifactId>flexmojos-maven-plugin</artifactId> 70 <version>3.5.0</version> 71 <extensions>true</extensions> 72 <configuration> 73 <debug>true</debug> 74 <generateHtmlWrapper>true</generateHtmlWrapper> 75 <targetPlayer>10.0.0</targetPlayer> 76 </configuration> 77 <dependencies> 78 <dependency> 79 <groupId>com.adobe.flex</groupId> 80 <artifactId>compiler</artifactId> 81 <version>3.5.0.12683</version> 82 <type>pom</type> 83 </dependency> 84 </dependencies> 85 </plugin> 86 </plugins> 87 </build> 78 88 79 89 80 <repositories> 81 <repository> 82 <id>forge</id> 83 <url>http://repository.sonatype.org/content/groups/flexgroup</url> 84 <snapshots> <enabled>true</enabled> </snapshots> 85 <releases> <enabled>true</enabled> </releases> 86 </repository> 87 </repositories> 88 89 <pluginRepositories> 90 <pluginRepository> 91 <id>forge</id> 92 <url>http://repository.sonatype.org/content/groups/flexgroup</url> 93 <snapshots> <enabled>true</enabled> </snapshots> 94 <releases> <enabled>true</enabled> </releases> 95 </pluginRepository> 96 </pluginRepositories> 90 <repositories> 91 <repository> 92 <id>forge</id> 93 <url>http://repository.sonatype.org/content/groups/flexgroup</url> 94 <snapshots> 95 <enabled>true</enabled> 96 </snapshots> 97 <releases> 98 <enabled>true</enabled> 99 </releases> 100 </repository> 101 </repositories> 102 103 <pluginRepositories> 104 <pluginRepository> 105 <id>forge</id> 106 <url>http://repository.sonatype.org/content/groups/flexgroup</url> 107 <snapshots> 108 <enabled>true</enabled> 109 </snapshots> 110 <releases> 111 <enabled>true</enabled> 112 </releases> 113 </pluginRepository> 114 </pluginRepositories> 97 115 98 116 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/CMDComponentXMLEditor.as
r209 r224 1 1 package clarin.cmdi.componentregistry.common.components { 2 import clarin.cmdi.componentregistry.editor.CMDSpecRenderer;3 2 import clarin.cmdi.componentregistry.common.ItemDescription; 4 3 import clarin.cmdi.componentregistry.common.StyleConstants; 4 import clarin.cmdi.componentregistry.editor.CMDSpecRenderer; 5 5 import clarin.cmdi.componentregistry.editor.ComponentEdit; 6 6 import clarin.cmdi.componentregistry.editor.FormItemInputLine; … … 11 11 import flash.display.DisplayObject; 12 12 import flash.events.Event; 13 import flash.events.MouseEvent;14 13 import flash.utils.getTimer; 15 14 … … 17 16 import mx.containers.Form; 18 17 import mx.containers.FormItem; 19 import mx.controls.Button;20 18 import mx.core.Container; 21 19 import mx.core.UIComponent; … … 25 23 import mx.managers.IFocusManagerComponent; 26 24 27 25 [Event(name="editorChange", type="flash.events.Event")] 28 26 public class CMDComponentXMLEditor extends Form implements IFocusManagerComponent, CMDSpecRenderer { 29 27 30 public static const EDITOR_CHANGE_EVENT:String = "editorChange"; 28 public static const DRAG_NEW_COMPONENT:String = "newComponent"; 29 public static const DRAG_NEW_ELEMENT:String = "newElement"; 30 public static const DRAG_NEW_ATTRIBUTE:String = "newAttribute"; 31 32 public static const EDITOR_CHANGE_EVENT:String = "editorChange"; 31 33 private var _spec:CMDSpec; 32 34 … … 51 53 if (event.dragSource.hasFormat("items")) { 52 54 DragManager.showFeedback(DragManager.COPY); 55 } else if (event.dragSource.hasFormat(DRAG_NEW_COMPONENT)) { 56 DragManager.showFeedback(DragManager.COPY); 57 } else { 58 DragManager.showFeedback(DragManager.NONE); 53 59 } 54 60 } 55 61 56 62 private function dragDropHandler(event:DragEvent):void { 57 var items:Array = event.dragSource.dataForFormat("items") as Array; 58 for each (var item:ItemDescription in items) { 59 var comp:CMDComponent = new CMDComponent(); 60 comp.componentId = item.id; 61 _spec.cmdComponents.addItem(comp); 62 addComponent(comp); 63 if (event.dragSource.hasFormat("items")) { 64 var items:Array = event.dragSource.dataForFormat("items") as Array; 65 for each (var item:ItemDescription in items) { 66 var comp:CMDComponent = new CMDComponent(); 67 comp.componentId = item.id; 68 _spec.cmdComponents.addItem(comp); 69 addComponent(comp); 70 } 71 } else if (event.dragSource.hasFormat(DRAG_NEW_COMPONENT)) { 72 var emptyComp:CMDComponent = event.dragSource.dataForFormat(DRAG_NEW_COMPONENT) as CMDComponent; 73 _spec.cmdComponents.addItem(emptyComp); 74 addComponent(emptyComp); 63 75 } 76 64 77 } 65 78 … … 69 82 dispatchEditorChangeEvent(); 70 83 } 71 72 private function dispatchEditorChangeEvent(event:Event =null):void {73 84 85 private function dispatchEditorChangeEvent(event:Event = null):void { 86 dispatchEvent(new Event(EDITOR_CHANGE_EVENT)); 74 87 } 75 88 … … 84 97 handleHeader(_spec); 85 98 handleComponents(_spec.cmdComponents); 86 trace("Created browser2view in " + (getTimer() - start) + " ms.");99 trace("Created editor view in " + (getTimer() - start) + " ms."); 87 100 } 88 101 … … 111 124 addComponent(component); 112 125 } 113 var btn:Button = new Button();114 btn.label = "add Component";115 btn.addEventListener(MouseEvent.CLICK, handleAddComponentClick);116 btn.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void {drawFocus(true);});117 btn.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void {drawFocus(false);});118 addChild(btn);119 126 } 120 121 private function handleAddComponentClick(event:MouseEvent):void {122 var comp:CMDComponent = new CMDComponent();123 _spec.cmdComponents.addItem(comp);124 var index:int = getChildIndex(event.currentTarget as DisplayObject);125 addComponent(comp, index);126 }127 128 127 129 130 public function addComponent(component:CMDComponent, index:int=-1):void { 128 public function addComponent(component:CMDComponent, index:int = -1):void { 131 129 var comp:Container = new ComponentEdit(component, this); 132 130 comp.addEventListener(ComponentEdit.REMOVE_COMPONENT_EVENT, removeComponent); 133 131 if (index == -1) { 134 132 addChild(comp); 135 133 } else { 136 134 addChildAt(comp, index); 137 135 } 138 136 } 139 137 140 141 142 143 144 145 138 private function removeComponent(event:Event):void { 139 var comp:CMDComponent = ComponentEdit(event.currentTarget).component; 140 _spec.removeComponent(comp); 141 removeChild(event.currentTarget as DisplayObject); 142 } 143 146 144 } 147 145 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/XMLBrowser.as
r206 r224 113 113 createAndAddFormChild("Cardinality", element.cardinalityMin + " - " + element.cardinalityMax); 114 114 handleCMDAttributeList(element.attributeList); 115 createAndAddValueScheme(element.valueSchemeSimple, element.valueScheme Complex);115 createAndAddValueScheme(element.valueSchemeSimple, element.valueSchemePattern, element.valueSchemeEnumeration); 116 116 indent = false; 117 117 } … … 126 126 createAndAddFormChild("Type", attribute.type); 127 127 } else { 128 createAndAddValueScheme( attribute.valueSchemeSimple, attribute.valueSchemeComplex);128 createAndAddValueScheme(null, attribute.valueSchemePattern, attribute.valueSchemeEnumeration); 129 129 } 130 130 } … … 132 132 } 133 133 134 protected function createAndAddValueScheme(value:String = null, value List:XMLListCollection = null):void {134 protected function createAndAddValueScheme(value:String = null, valuePattern:String = null, valueList:XMLListCollection = null):void { 135 135 var formItem:FormItem; 136 if (value List == null) {136 if (value != null && value != "") { 137 137 formItem = createFormItem("ValueScheme", value); 138 } else if (valuePattern != null && valuePattern != "") { 139 formItem = createFormItem("ValueScheme", valuePattern); 138 140 } else { 139 141 formItem = createFormItem("ValueScheme", null); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/AttributeListEdit.as
r206 r224 1 1 package clarin.cmdi.componentregistry.editor { 2 2 import clarin.cmdi.componentregistry.common.StyleConstants; 3 import clarin.cmdi.componentregistry.common.components.CMDComponentXMLEditor; 3 4 import clarin.cmdi.componentregistry.editor.model.CMDAttribute; 4 5 5 6 import flash.display.DisplayObject; 6 7 import flash.events.Event; 7 import flash.events.IEventDispatcher;8 8 import flash.events.MouseEvent; 9 9 … … 14 14 import mx.controls.Button; 15 15 import mx.core.UIComponent; 16 import mx.events.DragEvent; 17 import mx.managers.DragManager; 16 18 17 19 [Event(name="removeAttribute", type="flash.events.Event")] … … 27 29 _parent = parent; 28 30 styleName = StyleConstants.XMLBROWSER; 31 addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler); 32 addEventListener(DragEvent.DRAG_OVER, dragOverHandler); 33 addEventListener(DragEvent.DRAG_DROP, dragDropHandler); 34 29 35 } 30 36 … … 36 42 addChild(createAttributeBox(attribute)); 37 43 } 38 }39 var btn:Button = new Button();40 btn.label = "add Attribute";41 btn.addEventListener(MouseEvent.CLICK, handleAddAttributeClick);42 btn.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void {43 drawFocus(true);44 });45 btn.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void {46 drawFocus(false);47 });48 addChild(btn);49 }50 51 private function handleAddAttributeClick(event:MouseEvent):void {52 var attr:CMDAttribute = new CMDAttribute();53 _attributes.addItem(attr);54 var index:int = getChildIndex(event.currentTarget as DisplayObject);55 if (index == -1) {56 addChild(createAttributeBox(attr));57 } else {58 addChildAt(createAttributeBox(attr), index);59 44 } 60 45 } … … 75 60 76 61 private function createAndAddValueScheme(attribute:CMDAttribute):UIComponent { 77 if (attribute.valueScheme Complex== null) {78 return new FormItemInputLine("ValueScheme", attribute.valueScheme Simple, function(val:String):void {79 attribute.valueScheme Simple= val;62 if (attribute.valueSchemeEnumeration == null) { 63 return new FormItemInputLine("ValueScheme", attribute.valueSchemePattern, function(val:String):void { 64 attribute.valueSchemePattern = val; 80 65 }); 81 66 } else { 82 return new EnumerationEdit(attribute.valueScheme Complex, this);67 return new EnumerationEdit(attribute.valueSchemeEnumeration, this); 83 68 } 84 69 } … … 121 106 } 122 107 108 private function dragEnterHandler(event:DragEvent):void { 109 DragManager.acceptDragDrop(event.currentTarget as UIComponent); 110 UIComponent(event.currentTarget).drawFocus(true); 111 } 112 113 private function dragOverHandler(event:DragEvent):void { 114 if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_ATTRIBUTE)) { 115 DragManager.showFeedback(DragManager.COPY); 116 } else { 117 DragManager.showFeedback(DragManager.NONE); 118 } 119 } 120 121 private function dragDropHandler(event:DragEvent):void { 122 if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_ATTRIBUTE)) { 123 var attr:CMDAttribute = event.dragSource.dataForFormat(CMDComponentXMLEditor.DRAG_NEW_ATTRIBUTE) as CMDAttribute; 124 _attributes.addItem(attr); 125 addChild(createAttributeBox(attr)); 126 } 127 } 128 123 129 } 124 130 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
r206 r224 2 2 import clarin.cmdi.componentregistry.common.ItemDescription; 3 3 import clarin.cmdi.componentregistry.common.StyleConstants; 4 import clarin.cmdi.componentregistry.common.components.CMDComponentXMLEditor; 4 5 import clarin.cmdi.componentregistry.common.components.ExpandingComponentLabel; 5 6 import clarin.cmdi.componentregistry.common.components.XMLBrowser; 6 7 import clarin.cmdi.componentregistry.editor.model.CMDComponent; 7 8 import clarin.cmdi.componentregistry.editor.model.CMDComponentElement; 8 9 9 10 import flash.display.DisplayObject; 10 11 import flash.events.Event; 11 12 import flash.events.MouseEvent; 12 13 13 14 import mx.collections.ArrayCollection; 14 15 import mx.containers.Form; … … 17 18 import mx.controls.Button; 18 19 import mx.controls.HRule; 19 import mx.controls.Spacer;20 20 import mx.core.Container; 21 21 import mx.core.UIComponent; … … 29 29 private var _parent:UIComponent; 30 30 private var _component:CMDComponent; 31 private var currentElementIndex:int = -1; 31 32 32 33 public function ComponentEdit(component:CMDComponent, parent:UIComponent) { … … 35 36 _parent = parent; 36 37 styleName = StyleConstants.XMLBROWSER; 37 addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler); 38 addEventListener(DragEvent.DRAG_OVER, dragOverHandler); 39 addEventListener(DragEvent.DRAG_DROP, dragDropHandler); 38 if (component.componentId == null) { // new empty component, otherwise it would be an already existed component which cannot be edited. 39 addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler); 40 addEventListener(DragEvent.DRAG_OVER, dragOverHandler); 41 addEventListener(DragEvent.DRAG_DROP, dragDropHandler); 42 } 40 43 } 41 44 … … 53 56 if (event.dragSource.hasFormat("items")) { 54 57 DragManager.showFeedback(DragManager.COPY); 58 } else if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_COMPONENT)) { 59 DragManager.showFeedback(DragManager.COPY); 60 } else if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_ELEMENT)) { 61 DragManager.showFeedback(DragManager.COPY); 62 } else { 63 DragManager.showFeedback(DragManager.NONE); 55 64 } 56 65 } 57 66 58 67 private function dragDropHandler(event:DragEvent):void { 59 var items:Array = event.dragSource.dataForFormat("items") as Array; 60 for each (var item:ItemDescription in items) { 61 var comp:CMDComponent = new CMDComponent(); 62 comp.componentId = item.id; 63 _component.cmdComponents.addItem(comp); 64 addComponent(comp); 68 if (event.dragSource.hasFormat("items")) { 69 var items:Array = event.dragSource.dataForFormat("items") as Array; 70 for each (var item:ItemDescription in items) { 71 var comp:CMDComponent = new CMDComponent(); 72 comp.componentId = item.id; 73 _component.cmdComponents.addItem(comp); 74 addComponent(comp); 75 } 76 } else if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_COMPONENT)) { 77 var emptyComp:CMDComponent = event.dragSource.dataForFormat(CMDComponentXMLEditor.DRAG_NEW_COMPONENT) as CMDComponent; 78 _component.cmdComponents.addItem(emptyComp); 79 addComponent(emptyComp); 80 } else if (event.dragSource.hasFormat(CMDComponentXMLEditor.DRAG_NEW_ELEMENT)) { 81 var element:CMDComponentElement = event.dragSource.dataForFormat(CMDComponentXMLEditor.DRAG_NEW_ELEMENT) as CMDComponentElement; 82 _component.cmdElements.addItem(element); 83 addElement(element, currentElementIndex); 65 84 } 66 85 } … … 86 105 _component.name = val; 87 106 })); 88 addChild(new FormItemInputLine(XMLBrowser.CONCEPTLINK, _component.conceptLink, function(val:String):void {107 addChild(new ConceptLinkInput(XMLBrowser.CONCEPTLINK, _component.conceptLink, function(val:String):void { 89 108 _component.conceptLink = val; 90 109 })); … … 131 150 132 151 private function handleCMDAttributeList():void { 133 134 152 if (_component.attributeList.length > 0) 153 addChild(new AttributeListEdit(_component.attributeList, this)); 135 154 } 136 155 … … 139 158 addComponent(component); 140 159 } 141 var btn:Button = new Button();142 btn.label = "add Component";143 btn.addEventListener(MouseEvent.CLICK, handleAddComponentClick);144 btn.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void {145 drawFocus(true);146 });147 btn.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void {148 drawFocus(false);149 });150 addChild(btn);151 }152 153 private function handleAddComponentClick(event:MouseEvent):void {154 var comp:CMDComponent = new CMDComponent();155 _component.cmdComponents.addItem(comp);156 var index:int = getChildIndex(event.currentTarget as DisplayObject);157 addComponent(comp, index);158 160 } 159 161 … … 179 181 addElement(element); 180 182 } 181 var btn:Button = new Button();182 btn.label = "add Element";183 btn.addEventListener(MouseEvent.CLICK, handleAddElementClick);184 btn.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void {185 drawFocus(true);186 });187 btn.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void {188 drawFocus(false);189 });190 addChild(btn);191 }192 193 private function handleAddElementClick(event:MouseEvent):void {194 var element:CMDComponentElement = new CMDComponentElement();195 _component.cmdElements.addItem(element);196 var index:int = getChildIndex(event.currentTarget as DisplayObject);197 addElement(element, index);198 183 } 199 184 … … 207 192 addChildAt(elem, index); 208 193 } 194 currentElementIndex = getChildIndex(elem) + 1; 209 195 } 210 196 … … 213 199 _component.removeElement(elem); 214 200 removeChild(event.currentTarget as DisplayObject); 201 currentElementIndex--; 215 202 } 216 203 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/Editor.mxml
r206 r224 23 23 click="saveProfile()"/> 24 24 </mx:HBox> 25 <mx:Text id="errorMessageField" 26 text="{uploadService.message}" visible='{uploadService.message != ""}' includeInLayout='{uploadService.message != ""}' /> 25 <mx:Text id="errorMessageField" 26 text="{uploadService.message}" 27 visible='{uploadService.message != ""}' 28 includeInLayout='{uploadService.message != ""}'/> 27 29 <mx:ProgressBar id="uploadProgress" 28 29 30 31 30 label="" 31 mode="manual" 32 visible="false" 33 includeInLayout="false"/> 32 34 33 35 <mx:VBox width="100%" … … 35 37 <comp:CMDComponentXMLEditor id="xmlEditor" 36 38 cmdSpec="{cmdSpec}" 37 width="50%" 38 toolTip="drag components from list to add..." editorChange="handleEditorChange(event)" /> 39 <mx:DataGrid id="dataGrid" 40 width="50%" 41 dragEnabled="true" 42 dataProvider="{componentsSrv.itemDescriptions}" 43 columns="{browserColumns.getComponentColumns()}" 44 allowMultipleSelection="true"/> 45 39 editorChange="handleEditorChange(event)"/> 40 <mx:VBox styleName="borderStyles"> 41 <mx:Label text="Drag items onto edit canvas"/> 42 <mx:HBox id="palette"> 43 <mx:Canvas width="60" 44 height="60" 45 backgroundColor="blue" 46 borderStyle="solid" 47 id="ComponentDrag" 48 mouseMove="enableComponentDrag(event);" 49 > 50 </mx:Canvas> 51 <mx:Canvas width="45" 52 height="45" 53 backgroundColor="green" 54 borderStyle="solid" 55 id="ElementDrag" 56 mouseMove="enableElementDrag(event);"> 57 </mx:Canvas> 58 <mx:Canvas width="30" 59 height="30" 60 backgroundColor="red" 61 borderStyle="solid" 62 id="AttributeDrag" 63 mouseMove="enableAttributeDrag(event);"> 64 </mx:Canvas> 65 </mx:HBox> 66 <browser:BrowserOverviewList id="componentsPaletteOverview" 67 browserDataProvider="{componentsSrv.itemDescriptions}" 68 browserColumns="{browserColumns.getComponentColumns()}" 69 creationComplete="initPaletteOverview();"/> 70 </mx:VBox> 46 71 </mx:VBox> 47 <mx:HBox width="100%"48 height="300">49 <comp:ScrollableTextArea id="infoTextArea"50 styleName="xmlTextArea"51 editable="false"52 text="{cmdSpec.toXml()}"53 width="50%"54 height="300"/>55 </mx:HBox>56 72 </mx:VBox> 57 73 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
r206 r224 2 2 import clarin.cmdi.componentregistry.browser.BrowserColumns; 3 3 import clarin.cmdi.componentregistry.common.ItemDescription; 4 import clarin.cmdi.componentregistry.editor.model.CMDAttribute; 5 import clarin.cmdi.componentregistry.editor.model.CMDComponent; 6 import clarin.cmdi.componentregistry.editor.model.CMDComponentElement; 4 7 import clarin.cmdi.componentregistry.editor.model.CMDModelFactory; 5 8 import clarin.cmdi.componentregistry.editor.model.CMDSpec; … … 13 16 import flash.net.FileReference; 14 17 18 import mx.controls.Alert; 19 import mx.core.DragSource; 20 import mx.core.UIComponent; 21 import mx.managers.DragManager; 22 15 23 16 24 private var currentDescription:ItemDescription; … … 19 27 20 28 [Bindable] 21 private var componentsSrv:ComponentListService = ComponentListService.instance;29 private var componentsSrv:ComponentListService = new ComponentListService(); //Don't create an instance we need a new one 22 30 23 31 [Bindable] … … 59 67 60 68 private function saveProfile():void { 61 //Alert.show(xmlEditor.cmdSpec.toXml());69 Alert.show(xmlEditor.cmdSpec.toXml()); 62 70 var item:ItemDescription = new ItemDescription(); 63 71 item.description = xmlEditor.cmdSpec.headerDescription; … … 79 87 80 88 89 private function enableComponentDrag(event:MouseEvent):void { 90 var ds:DragSource = new DragSource(); 91 ds.addHandler(function():CMDComponent { 92 return new CMDComponent(); 93 }, CMDComponentXMLEditor.DRAG_NEW_COMPONENT); 94 DragManager.doDrag(UIComponent(event.currentTarget), ds, event); 95 } 81 96 97 private function enableElementDrag(event:MouseEvent):void { 98 var ds:DragSource = new DragSource(); 99 ds.addHandler(function():CMDComponentElement { 100 return new CMDComponentElement(); 101 }, CMDComponentXMLEditor.DRAG_NEW_ELEMENT); 102 DragManager.doDrag(UIComponent(event.currentTarget), ds, event); 103 } 104 105 private function enableAttributeDrag(event:MouseEvent):void { 106 var ds:DragSource = new DragSource(); 107 ds.addHandler(function():CMDAttribute { 108 return new CMDAttribute(); 109 }, CMDComponentXMLEditor.DRAG_NEW_ATTRIBUTE); 110 DragManager.doDrag(UIComponent(event.currentTarget), ds, event); 111 } 112 113 private function initPaletteOverview():void { 114 componentsPaletteOverview.dataGrid.dragEnabled = true; 115 componentsPaletteOverview.dataGrid.allowMultipleSelection = true; 116 componentsPaletteOverview.dataGrid.horizontalScrollPolicy = "auto"; 117 componentsPaletteOverview.dataGrid.resizableColumns = true; 118 } 119 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ElementEdit.as
r206 r224 3 3 import clarin.cmdi.componentregistry.common.components.XMLBrowser; 4 4 import clarin.cmdi.componentregistry.editor.model.CMDComponentElement; 5 5 6 6 import flash.events.Event; 7 7 import flash.events.MouseEvent; 8 8 9 9 import mx.containers.Form; 10 10 import mx.containers.FormItem; … … 27 27 } 28 28 29 30 31 29 public function get element():CMDComponentElement { 30 return _element; 31 } 32 32 33 33 protected override function createChildren():void { 34 34 super.createChildren(); 35 35 36 36 addChild(createEditBar()); 37 37 addChild(new FormItemInputLine("Name", _element.name, function(val:String):void { 38 38 _element.name = val; 39 39 })); 40 addChild(new FormItemInputLine(XMLBrowser.CONCEPTLINK, _element.conceptLink, function(val:String):void {40 addChild(new ConceptLinkInput(XMLBrowser.CONCEPTLINK, _element.conceptLink, function(val:String):void { 41 41 _element.conceptLink = val; 42 42 })); 43 43 44 addChild(new FormItemInputLine("CardinalityMin", _element.cardinalityMin, function(val:String):void { 44 45 _element.cardinalityMin = val; … … 52 53 53 54 private function createEditBar():HBox { 54 55 var editBar:HBox = new HBox(); 55 56 editBar.addChild(createHeading()); 56 57 var removeButton:Button = new Button(); … … 58 59 removeButton.label = "X"; 59 60 removeButton.addEventListener(MouseEvent.CLICK, fireRemoveComponent); 60 removeButton.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void {drawFocus(true);}); 61 removeButton.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void {drawFocus(false);}); 61 removeButton.addEventListener(MouseEvent.MOUSE_OVER, function(event:MouseEvent):void { 62 drawFocus(true); 63 }); 64 removeButton.addEventListener(MouseEvent.MOUSE_OUT, function(event:MouseEvent):void { 65 drawFocus(false); 66 }); 62 67 63 68 editBar.addChild(removeButton); … … 77 82 78 83 private function createAndAddValueScheme():void { 79 if (_element.valueSchemeComplex == null) { 80 addChild(new FormItemInputLine("ValueScheme", _element.valueSchemeSimple, function(val:String):void { 81 _element.valueSchemeSimple = val; 82 })); 84 if (_element.valueSchemeEnumeration == null) { 85 if (_element.valueSchemePattern != null) { 86 addChild(new FormItemInputLine("ValueScheme", _element.valueSchemePattern, function(val:String):void { 87 _element.valueSchemeSimple = val; 88 })); 89 } else { 90 addChild(new FormItemInputLine("ValueScheme", _element.valueSchemeSimple, function(val:String):void { 91 _element.valueSchemeSimple = val; 92 })); 93 } 83 94 } else { 84 addChild(new EnumerationEdit(_element.valueScheme Complex, this));95 addChild(new EnumerationEdit(_element.valueSchemeEnumeration, this)); 85 96 } 86 97 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/FormItemInputLine.as
r206 r224 14 14 styleName = StyleConstants.XMLBROWSER_FIELD; 15 15 editField.styleName = StyleConstants.XMLEDITOR_EDIT_FIELD; 16 editField.width = 400;16 editField.width = 300; 17 17 editField.text = value; 18 18 BindingUtils.bindSetter(bindingFunction, editField, "text"); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/FormItemInputText.as
r206 r224 15 15 styleName = StyleConstants.XMLBROWSER_FIELD; 16 16 editArea.styleName = StyleConstants.XMLEDITOR_EDIT_FIELD; 17 editArea.width = 400;17 editArea.width = 300; 18 18 editArea.text = value; 19 19 BindingUtils.bindSetter(bindingFunction, editArea, "text"); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDAttribute.as
r206 r224 1 1 package clarin.cmdi.componentregistry.editor.model { 2 2 import clarin.cmdi.componentregistry.common.XmlAble; 3 3 4 4 import mx.collections.XMLListCollection; 5 5 6 6 public class CMDAttribute implements XmlAble { 7 //No Attributes 8 9 //Elements 10 public var name:String; 11 public var type:String; 12 public var valueSchemeSimple:String; 13 public var valueSchemeComplex:XMLListCollection; 14 15 7 //No Attributes 8 9 //Elements 10 public var name:String; 11 public var type:String; 12 public var valueSchemePattern:String; //pattern 13 public var valueSchemeEnumeration:XMLListCollection; // enumeration 14 15 //TODO Patrick see element?? check usage in xmlBrowser 16 17 16 18 public function CMDAttribute() { 17 19 } 18 20 19 21 public function toXml():XML { 20 return <Attribute></Attribute>; //TODO PD implement 22 var result:XML = <Attribute></Attribute>; 23 result.appendChild(<Name>{name}</Name>); 24 if (valueSchemePattern) { 25 result.appendChild(<pattern>{valueSchemePattern}</pattern>); 26 } else if (valueSchemeEnumeration) { 27 result.appendChild(<enumeration>{valueSchemeEnumeration}</enumeration>); 28 } else { 29 result.appendChild(<Type>{type}</Type>); 30 } 31 32 return result 21 33 } 22 34 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponent.as
r206 r224 40 40 public function toXml():XML { 41 41 var result:XML = <CMD_Component></CMD_Component>; 42 if ( isNotEmpty(name))42 if (name) 43 43 result.@name = name; 44 if ( isNotEmpty(componentId))44 if (componentId) 45 45 result.@ComponentId = componentId; 46 if ( isNotEmpty(conceptLink))46 if (conceptLink) 47 47 result.@ConceptLink = conceptLink; 48 if ( isNotEmpty(filename))48 if (filename) 49 49 result.@filename = filename; 50 if ( isNotEmpty(cardinalityMin))50 if (cardinalityMin) 51 51 result.@CardinalityMin = cardinalityMin; 52 if ( isNotEmpty(cardinalityMax))52 if (cardinalityMax) 53 53 result.@CardinalityMax = cardinalityMax; 54 54 if (attributeList.length > 0) { … … 68 68 } 69 69 70 private function isNotEmpty(value:String):Boolean {71 return value != null && value != "";72 }73 74 70 } 75 71 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponentElement.as
r206 r224 17 17 //elements 18 18 public var attributeList:ArrayCollection = new ArrayCollection(); 19 public var valueSchemeComplex:XMLListCollection; 19 public var valueSchemeEnumeration:XMLListCollection; 20 public var valueSchemePattern:String; 20 21 21 22 public function CMDComponentElement() { … … 25 26 26 27 public function toXml():XML { 27 return <CMD_Element></CMD_Element>;//TODO PD implement 28 var result:XML = <CMD_Element></CMD_Element>; //TODO PD implement 29 if (name) 30 result.@name = name; 31 if (conceptLink) 32 result.@ConceptLink = conceptLink; 33 if (valueSchemeSimple) 34 result.@ValueScheme = valueSchemeSimple; 35 if (cardinalityMin) 36 result.@CardinalityMin = cardinalityMin; 37 if (cardinalityMax) 38 result.@CardinalityMax = cardinalityMax; 39 if (attributeList.length > 0) { 40 var attributeListTag:XML = <AttributeList></AttributeList>; 41 for each (var attribute:CMDAttribute in attributeList) { 42 attributeListTag.appendChild(attribute.toXml()); 43 } 44 result.appendChild(attributeListTag); 45 } 46 if (valueSchemePattern) { 47 result.appendChild(<ValueScheme><pattern></pattern>{valueSchemePattern}</ValueScheme>) 48 } 49 if (valueSchemeEnumeration != null) { 50 var enumerationScheme:XML = <ValueScheme><enumeration></enumeration></ValueScheme>; 51 enumerationScheme.appendChild(valueSchemeEnumeration); 52 result.appendChild(enumerationScheme); 53 } 54 return result; 28 55 } 56 29 57 30 58 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDModelFactory.as
r206 r224 54 54 if (xml.hasOwnProperty(ComponentMD.VALUE_SCHEME)) { 55 55 if (xml.ValueScheme.hasOwnProperty(ComponentMD.PATTERN)) { 56 result.valueScheme Simple= xml.ValueScheme.pattern;56 result.valueSchemePattern = xml.ValueScheme.pattern; 57 57 } else if (xml.ValueScheme.hasOwnProperty(ComponentMD.ENUMERATION)) { 58 result.valueScheme Complex= new XMLListCollection(xml.ValueScheme.enumeration.*);58 result.valueSchemeEnumeration = new XMLListCollection(xml.ValueScheme.enumeration.*); 59 59 } 60 60 } … … 81 81 } else { 82 82 if (xml.ValueScheme.hasOwnProperty(ComponentMD.PATTERN)) { 83 result.valueScheme Simple= xml.ValueScheme.pattern;83 result.valueSchemePattern = xml.ValueScheme.pattern; 84 84 } else if (xml.ValueScheme.hasOwnProperty(ComponentMD.ENUMERATION)) { 85 result.valueScheme Complex= new XMLListCollection(xml.ValueScheme.enumeration.*);85 result.valueSchemeEnumeration = new XMLListCollection(xml.ValueScheme.enumeration.*); 86 86 } 87 87 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BrowserService.as
r161 r224 3 3 4 4 import mx.collections.ArrayCollection; 5 import mx.controls.Alert; 5 6 import mx.messaging.messages.HTTPRequestMessage; 6 7 import mx.rpc.AsyncToken; … … 9 10 import mx.rpc.events.ResultEvent; 10 11 import mx.rpc.http.HTTPService; 11 import mx.utils.ObjectUtil;12 12 import mx.utils.StringUtil; 13 13 … … 47 47 public function fault(faultEvent:FaultEvent):void { 48 48 var errorMessage:String = StringUtil.substitute("Error in {0}: {1} - {2}", this, faultEvent.fault.faultString, faultEvent.fault.faultDetail); 49 throw new Error(errorMessage);49 Alert.show(errorMessage); 50 50 } 51 51 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/ComponentInfoService.as
r134 r224 5 5 import clarin.cmdi.componentregistry.common.ItemDescription; 6 6 7 import mx.controls.Alert; 7 8 import mx.messaging.messages.HTTPRequestMessage; 8 9 import mx.rpc.AsyncToken; … … 13 14 import mx.utils.StringUtil; 14 15 15 [Event(name="ComponentLoaded", type="flash.events.Event")]16 [Event(name="ComponentLoaded", type="flash.events.Event")] 16 17 public class ComponentInfoService { 17 18 public static const COMPONENT_LOADED:String = "ComponentLoaded"; 18 19 19 20 private var service:HTTPService; … … 48 49 public function fault(faultEvent:FaultEvent):void { 49 50 var errorMessage:String = StringUtil.substitute("Error in {0}: {1} - {2}", this, faultEvent.fault.faultString, faultEvent.fault.faultDetail); 50 throw new Error(errorMessage);51 Alert.show(errorMessage); 51 52 } 52 53 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/ComponentListService.as
r161 r224 12 12 public function ComponentListService() { 13 13 super(Config.instance.componentListUrl); 14 if (_instance != null) {15 throw new Error("Service can only be accessed through ComponentListService.instance");16 }17 14 } 18 15 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/Config.as
r92 r224 12 12 private static var _instance:Config = new Config(); 13 13 14 private var _serviceRootUrl:String = "http://localhost:8080/ComponentRegistry"; 14 private var _serviceRootUrl:String = "http://localhost:8080/ComponentRegistry"; 15 15 //Default _serviceRootUrl value can be useful for testing. Set the proper value in your (index.)html that embeds the flash object. 16 //Like this: "FlashVars", "serviceRootUrl=http://localhost:8080/ComponentRegistry" 16 //Like this: "FlashVars", "serviceRootUrl=http://localhost:8080/ComponentRegistry" 17 18 private var _isocatSearchUrl:String = "http://www.isocat.org/rest/user/guest/search"; 19 //Default _isocatSearchUrl value can be useful for testing. Set the proper value in your (index.)html that embeds the flash object. 20 //Like this: "FlashVars", "isocatSearchUrl=http://www.isocat.org/rest/user/guest/search" 17 21 18 22 … … 24 28 if (serviceRootUrl != null) { 25 29 _serviceRootUrl = serviceRootUrl; 30 } 31 var isocatSearchUrl:String = Application.application.parameters.isocatSearchUrl; 32 if (isocatSearchUrl != null) { 33 _isocatSearchUrl = isocatSearchUrl; 26 34 } 27 35 } … … 51 59 } 52 60 61 public function get isocatSearchUrl():String { 62 return _isocatSearchUrl; 63 } 64 53 65 public static function get instance():Config { 54 66 return _instance; -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/DeleteService.as
r206 r224 1 1 package clarin.cmdi.componentregistry.services { 2 2 import clarin.cmdi.componentregistry.common.ItemDescription; 3 3 4 4 import com.adobe.net.URI; 5 5 import com.hurlant.util.Base64; 6 6 7 import flash.events.ErrorEvent; 7 8 import flash.events.Event; 8 9 import flash.events.EventDispatcher; 9 10 10 11 import mx.controls.Alert; 12 import mx.managers.CursorManager; 11 13 import mx.utils.StringUtil; 12 14 13 15 import org.httpclient.HttpClient; 14 import org.httpclient.events.HttpErrorEvent;15 16 import org.httpclient.events.HttpResponseEvent; 16 import org.httpclient.events.HttpStatusEvent;17 17 import org.httpclient.http.Delete; 18 18 … … 27 27 service.listener.onComplete = handleResult; 28 28 service.listener.onError = handleError; 29 service.listener.onStatus = handleStatus;30 29 } 31 30 … … 35 34 36 35 public function deleteItem(item:ItemDescription):void { 36 CursorManager.setBusyCursor(); 37 37 var uri:URI = new URI(item.dataUrl); 38 38 var httpDelete:Delete = new Delete(); … … 42 42 43 43 private function handleResult(resultEvent:HttpResponseEvent):void { 44 if (resultEvent.response.code == "200") { 44 CursorManager.removeBusyCursor(); 45 if (resultEvent.response.isSuccess) { 45 46 dispatchEvent(new Event(ITEM_DELETED)); 47 } else if (resultEvent.response.isClientError) { 48 Alert.show("Unauthorized to delete item, you are not the creator."); 49 } else if (resultEvent.response.isServerError) { 50 Alert.show("Unexpected error, server returned status: " + resultEvent.response.code); 46 51 } 47 52 } 48 53 49 public function handleError(faultEvent:HttpErrorEvent):void { 54 public function handleError(faultEvent:ErrorEvent):void { 55 CursorManager.removeBusyCursor(); 50 56 var errorMessage:String = StringUtil.substitute("Error in {0}: {1}", this, faultEvent.text); 51 throw new Error(errorMessage);57 Alert.show(errorMessage); 52 58 } 53 59 54 private function handleStatus(event:HttpStatusEvent):void {55 if (event.code != "200") {56 if (event.code == "401") {57 Alert.show("Unauthorized to delete item, you are not the creator.");58 }59 trace("(httpstatus code was: " + event.code + ")");60 }61 }62 60 } 63 61 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/ProfileInfoService.as
r206 r224 8 8 9 9 import mx.collections.ArrayCollection; 10 import mx.controls.Alert; 10 11 import mx.messaging.messages.HTTPRequestMessage; 11 12 import mx.rpc.AsyncToken; … … 59 60 public function fault(faultEvent:FaultEvent):void { 60 61 var errorMessage:String = StringUtil.substitute("Error in {0}: {1} - {2}", this, faultEvent.fault.faultString, faultEvent.fault.faultDetail); 61 throw new Error(errorMessage);62 Alert.show(errorMessage); 62 63 } 63 64 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/UploadService.as
r206 r224 2 2 import clarin.cmdi.componentregistry.common.ItemDescription; 3 3 import clarin.cmdi.componentregistry.importer.UploadCompleteEvent; 4 4 5 5 import com.adobe.net.URI; 6 6 import com.hurlant.util.Base64; 7 7 8 8 import flash.events.DataEvent; 9 import flash.events.ErrorEvent; 9 10 import flash.events.Event; 10 import flash.events.HTTPStatusEvent;11 11 import flash.events.IOErrorEvent; 12 12 import flash.events.ProgressEvent; … … 16 16 import flash.net.URLRequest; 17 17 import flash.net.URLVariables; 18 18 19 19 import mx.controls.ProgressBar; 20 20 21 21 import org.httpclient.HttpClient; 22 22 import org.httpclient.events.HttpDataEvent; 23 import org.httpclient.events.HttpErrorEvent; 24 import org.httpclient.events.HttpStatusEvent; 23 import org.httpclient.events.HttpResponseEvent; 25 24 import org.httpclient.http.Post; 26 25 import org.httpclient.http.multipart.Multipart; … … 51 50 httpClient = new HttpClient(); 52 51 httpClient.listener.onError = httpclientErrorHandler; 53 httpClient.listener.onData = httpclientDataHandler; 54 httpClient.listener.on Status = httpclientStatusHandler;52 httpClient.listener.onData = httpclientDataHandler; 53 httpClient.listener.onComplete = httpclientCompleteHandler; 55 54 } 56 55 … … 136 135 } 137 136 138 private function httpclient StatusHandler(event:HttpStatusEvent):void {139 if ( event.code != "200") {140 addToMessage("Server Failed to handle registration. Unexpected error, try again later. (httpstatus code was: " + event. code + ")\n");137 private function httpclientCompleteHandler(event:HttpResponseEvent):void { 138 if (!event.response.isSuccess) { 139 addToMessage("Server Failed to handle registration. Unexpected error, try again later. (httpstatus code was: " + event.response.code + ")\n"); 141 140 } 142 141 } … … 148 147 } 149 148 150 private function httpclientErrorHandler(event: HttpErrorEvent):void {149 private function httpclientErrorHandler(event:ErrorEvent):void { 151 150 addToMessage("Server Failed to handle registration. Unexpected error, try again later. (error: " + event.text + ")\n"); 152 151 }
Note: See TracChangeset
for help on using the changeset viewer.