Changeset 268
- Timestamp:
- 03/22/10 13:37:57 (14 years ago)
- Location:
- ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/AttributeListEdit.as
r264 r268 3 3 import clarin.cmdi.componentregistry.editor.model.CMDAttribute; 4 4 import clarin.cmdi.componentregistry.editor.model.ValueSchemeInterface; 5 5 6 6 import flash.events.Event; 7 7 import flash.events.MouseEvent; 8 9 import mx.binding.utils. BindingUtils;8 9 import mx.binding.utils.ChangeWatcher; 10 10 import mx.collections.ArrayCollection; 11 11 import mx.collections.XMLListCollection; … … 54 54 } 55 55 56 57 58 **/ 56 /** 57 * Public utility method to create ValueScheme Component. By lack of better placed put in this class 58 **/ 59 59 public static function createAndAddValueScheme(valueScheme:ValueSchemeInterface):UIComponent { 60 60 var valueSchemeInput:ValueSchemeInput = new ValueSchemeInput("Type"); … … 68 68 valueSchemeInput.valueSchemeEnumeration = valueScheme.valueSchemeEnumeration; 69 69 } 70 BindingUtils.bindSetter(function(val:String):void { 70 ChangeWatcher.watch(valueSchemeInput, "valueSchemeSimple", function(val:String):void { 71 valueScheme.valueSchemeSimple = val; 72 valueScheme.valueSchemePattern = ""; 73 valueScheme.valueSchemeEnumeration = null; 74 }); 75 ChangeWatcher.watch(valueSchemeInput, "valueSchemePattern", function(val:String):void { 71 76 valueScheme.valueSchemePattern = val; 72 77 valueScheme.valueSchemeEnumeration = null; 73 78 valueScheme.valueSchemeSimple = ""; 74 }, valueSchemeInput, "valueSchemePattern"); 75 BindingUtils.bindSetter(function(val:String):void { 76 valueScheme.valueSchemeSimple = val; 77 valueScheme.valueSchemePattern =""; 78 valueScheme.valueSchemeEnumeration = null; 79 }, valueSchemeInput, "valueSchemeSimple"); 80 BindingUtils.bindSetter(function(val:XMLListCollection):void { 79 }); 80 ChangeWatcher.watch(valueSchemeInput, "valueSchemeEnumeration", function(val:XMLListCollection):void { 81 81 valueScheme.valueSchemeEnumeration = val; 82 82 valueScheme.valueSchemeSimple = ""; 83 83 valueScheme.valueSchemePattern = ""; 84 } , valueSchemeInput, "valueSchemeEnumeration");84 }); 85 85 return valueSchemeInput; 86 86 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
r238 r268 35 35 _parent = parent; 36 36 styleName = StyleConstants.XMLBROWSER; 37 if ( component.componentId == null) { // new empty component, otherwise it would be an already existed component which cannot be edited.37 if (!component.componentId) { // new empty component, otherwise it would be an already existed component which cannot be edited. 38 38 addEventListener(DragEvent.DRAG_ENTER, dragEnterHandler); 39 39 addEventListener(DragEvent.DRAG_OVER, dragOverHandler); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/UploadService.as
r242 r268 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 9 import flash.events.ErrorEvent; … … 14 14 import flash.net.FileFilter; 15 15 import flash.net.FileReference; 16 import flash.net.URLVariables; 17 16 18 17 import mx.controls.ProgressBar; 19 18 import mx.managers.CursorManager; 19 20 20 import org.httpclient.HttpClient; 21 21 import org.httpclient.events.HttpDataEvent; … … 45 45 46 46 private function createAndInitRequest():void { 47 CursorManager.setBusyCursor(); 47 48 httpClient = new HttpClient(); 48 49 httpClient.listener.onError = httpclientErrorHandler; … … 111 112 } catch (error:Error) { 112 113 trace("Unable to upload file. Error: " + error); 114 CursorManager.removeBusyCursor(); 113 115 throw error; 114 116 } … … 131 133 addToMessage("Server Failed to handle registration. Unexpected error, try again later. (httpstatus code was: " + event.response.code + ")\n"); 132 134 } 135 CursorManager.removeBusyCursor(); 133 136 httpClient.close(); 134 137 }
Note: See TracChangeset
for help on using the changeset viewer.