Permalink
Browse files

Updates for using strictly AS3 library code. Change to build file to …

…only link in needed as3corelib classes that use only AS3.
  • Loading branch information...
1 parent ab80dd1 commit 1de960fd26ef1d5874ce8d51508fd0313134c6ad Todd Anderson committed Apr 16, 2010
Showing with 117 additions and 73 deletions.
  1. BIN bin/as3couchdb-0.4.1.swc
  2. BIN bin/as3couchdb-0.4.1.swf
  3. BIN bin/as3couchdb-0.4.swc
  4. BIN bin/as3couchdb-0.4.swf
  5. +14 −2 build.properties
  6. +12 −0 build.xml
  7. BIN examples/flex/AttachmentsFlexExample/libs/as3couchdb-0.4.1.swc
  8. BIN examples/flex/AttachmentsFlexExample/libs/as3couchdb.swc
  9. +8 −0 ...ttachmentsFlexExample/src/com/custardbelly/couchdb/example/view/renderer/ContactItemRenderer.mxml
  10. BIN examples/flex/AuthorizationFlexExample/libs/as3couchdb-0.4.1.swc
  11. BIN examples/flex/BasicFlexExample/libs/as3couchdb-0.4.1.swc
  12. BIN examples/flex/BasicFlexExample/libs/as3couchdb.swc
  13. +1 −0 examples/flex/DocumentsFlexExample/.actionScriptProperties
  14. BIN examples/flex/DocumentsFlexExample/libs/as3couchdb-0.4.1.swc
  15. BIN examples/flex/DocumentsFlexExample/libs/as3couchdb.swc
  16. +2 −1 examples/flex/DocumentsFlexExample/src/com/custardbelly/couchdb/example/view/ContactsForm.as
  17. +1 −1 src/com/custardbelly/as3couchdb/as3couchdb_internal.as
  18. +2 −2 src/com/custardbelly/as3couchdb/command/CouchRequestCommand.as
  19. +1 −1 src/com/custardbelly/as3couchdb/command/CreateDatabaseCommand.as
  20. +1 −1 src/com/custardbelly/as3couchdb/command/IRequestCommand.as
  21. +1 −1 src/com/custardbelly/as3couchdb/core/CouchAttachment.as
  22. +1 −5 src/com/custardbelly/as3couchdb/core/CouchDatabase.as
  23. +1 −1 src/com/custardbelly/as3couchdb/core/CouchDocument.as
  24. +1 −1 src/com/custardbelly/as3couchdb/core/CouchModel.as
  25. +1 −1 src/com/custardbelly/as3couchdb/core/CouchModelEntity.as
  26. +1 −1 src/com/custardbelly/as3couchdb/core/CouchServiceFault.as
  27. +1 −1 src/com/custardbelly/as3couchdb/core/CouchServiceResult.as
  28. +1 −1 src/com/custardbelly/as3couchdb/core/CouchSession.as
  29. +1 −1 src/com/custardbelly/as3couchdb/core/CouchUser.as
  30. +1 −1 src/com/custardbelly/as3couchdb/enum/CouchActionType.as
  31. +1 −1 src/com/custardbelly/as3couchdb/enum/CouchContentType.as
  32. +1 −1 src/com/custardbelly/as3couchdb/enum/CouchFaultType.as
  33. +1 −1 src/com/custardbelly/as3couchdb/enum/CouchRequestMethod.as
  34. +1 −1 src/com/custardbelly/as3couchdb/enum/CouchRequestStatus.as
  35. +1 −1 src/com/custardbelly/as3couchdb/event/CouchEvent.as
  36. +1 −1 src/com/custardbelly/as3couchdb/mediator/CouchDatabaseActionMediator.as
  37. +1 −1 src/com/custardbelly/as3couchdb/mediator/CouchDocumentActionMediator.as
  38. +1 −1 src/com/custardbelly/as3couchdb/mediator/CouchSessionActionMediator.as
  39. +1 −1 src/com/custardbelly/as3couchdb/mediator/ICouchDatabaseActionMediator.as
  40. +1 −1 src/com/custardbelly/as3couchdb/mediator/ICouchDocumentActionMediator.as
  41. +1 −1 src/com/custardbelly/as3couchdb/mediator/ICouchSessionActionMediator.as
  42. +1 −1 src/com/custardbelly/as3couchdb/mediator/IServiceMediator.as
  43. +1 −1 src/com/custardbelly/as3couchdb/mediator/helper/AttachmentRequestQueue.as
  44. +1 −1 src/com/custardbelly/as3couchdb/responder/AbstractDatabaseResponder.as
  45. +1 −1 src/com/custardbelly/as3couchdb/responder/AbstractDocumentResponder.as
  46. +1 −1 src/com/custardbelly/as3couchdb/responder/BasicCouchResponder.as
  47. +1 −1 src/com/custardbelly/as3couchdb/responder/CreateDatabaseResponder.as
  48. +1 −1 src/com/custardbelly/as3couchdb/responder/CreateDocumentResponder.as
  49. +1 −1 src/com/custardbelly/as3couchdb/responder/DeleteDatabaseResponder.as
  50. +1 −1 src/com/custardbelly/as3couchdb/responder/DeleteDocumentResponder.as
  51. +1 −1 src/com/custardbelly/as3couchdb/responder/ICouchServiceResponder.as
  52. +1 −1 src/com/custardbelly/as3couchdb/responder/ReadAllDocumentsResponder.as
  53. +1 −1 src/com/custardbelly/as3couchdb/responder/ReadDatabaseResponder.as
  54. +1 −1 src/com/custardbelly/as3couchdb/responder/ReadDocumentResponder.as
  55. +1 −1 src/com/custardbelly/as3couchdb/responder/ReadDocumentsFromViewResponder.as
  56. +1 −1 src/com/custardbelly/as3couchdb/responder/UpdateDocumentResponder.as
  57. +1 −1 src/com/custardbelly/as3couchdb/serialize/CouchDatabaseReader.as
  58. +1 −1 src/com/custardbelly/as3couchdb/serialize/CouchDatabaseWriter.as
  59. +1 −1 src/com/custardbelly/as3couchdb/serialize/CouchDocumentReader.as
  60. +1 −1 src/com/custardbelly/as3couchdb/serialize/CouchDocumentWriter.as
  61. +1 −1 src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseReader.as
  62. +1 −1 src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseWriter.as
  63. +1 −1 src/com/custardbelly/as3couchdb/serialize/ICouchDocumentReader.as
  64. +1 −1 src/com/custardbelly/as3couchdb/serialize/ICouchDocumentWriter.as
  65. +1 −1 src/com/custardbelly/as3couchdb/service/AbstractCouchRequest.as
  66. +1 −1 src/com/custardbelly/as3couchdb/service/CouchDatabaseService.as
  67. +1 −1 src/com/custardbelly/as3couchdb/service/CouchDocumentService.as
  68. +1 −1 src/com/custardbelly/as3couchdb/service/CouchRequest.as
  69. +1 −1 src/com/custardbelly/as3couchdb/service/CouchService.as
  70. +1 −1 src/com/custardbelly/as3couchdb/service/ExInCouchRequest.as
  71. +3 −3 src/com/custardbelly/as3couchdb/service/HTTPCouchRequest.as
  72. +1 −1 src/com/custardbelly/as3couchdb/service/HTTPSessionRequest.as
  73. +1 −1 src/com/custardbelly/as3couchdb/service/ICouchDatabaseService.as
  74. +1 −1 src/com/custardbelly/as3couchdb/service/ICouchDocumentService.as
  75. +1 −1 src/com/custardbelly/as3couchdb/service/ICouchRequest.as
  76. +1 −1 src/com/custardbelly/as3couchdb/service/ICouchService.as
  77. +17 −3 src/com/custardbelly/as3couchdb/util/UUID.as
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -13,12 +13,24 @@ optimizer.loc=${flexsdk.bin.dir}/optimizer
# asdoc.loc=${flexsdk.bin.dir}/asdoc.exe
# optimizer.loc=${flexsdk.bin.dir}/optimizer.exe
-# Project properties.
+# Project location properties.
src.dir=${basedir}/src
lib.dir=${basedir}/lib
bin.dir=${basedir}/bin
doc.dir=${basedir}/doc
+
+# Directory for external code libraries.
+# This is mainly used to compile in code from as3corelib that is
+# ActionScript only. Specifically JSON and URI packages, and the StringUtil class.
+external.dir=${basedir}/external
+as3corelib.net.src=${external.dir}/com/adobe/net
+as3corelib.json.src=${external.dir}/com/adobe/serialization/json
+as3corelib.utils.StringUtil=${external.dir}/com/adobe/utils/StringUtil.as
+
+# Temporary directory when generating optimized SWF.
optimize.temp.dir=${bin.dir}/temp
-version.num=0.4
+
+# Product properties.
+version.num=0.4.1
project.name=as3couchdb
library.name=${project.name}-${version.num}
View
@@ -5,10 +5,18 @@
<!-- [as3corelib] can be found at: http://code.google.com/p/as3corelib/ -->
<!-- [as3crypto] can be found at http://code.google.com/p/as3crypto/ -->
<!-- [as3httpclientlib] can be found at: http://code.google.com/p/as3httpclientlib -->
+ <!-- -->
<!-- The 'lib' target locates these external libraries within a directory described in the -->
<!-- build.properties file denoted as ${lib.dir}. Make sure you have these libraries within -->
<!-- that defined directory in order to properly build the as3couchdb.swc and/or optimized -->
<!-- SWF file. -->
+ <!-- -->
+ <!-- In order to be truly ActionScript 3 compliant (and not resticted to rely on classes -->
+ <!-- from the Flex framework), specific sources are targeted from the as3corelib project. -->
+ <!-- Specifically, these are the JSON and NET packages, and the StringUtil class. -->
+ <!-- The project is set up to have a local checkout of as3corelib within a directory -->
+ <!-- called externals on the root basedir. compc looks into this directory for as3corelib -->
+ <!-- sources listed in build.properties. -->
<!-- Property file. -->
<property file="build.properties" />
@@ -44,11 +52,15 @@
<target name="lib" depends="clean-lib" description="Generates the library SWC.">
<echo>[EXEC] Compiling ${library.name}.swc</echo>
<exec executable="${compc.loc}" dir="${basedir}">
+ <!--<arg line="-load-config+=${basedir}/as3couchdb-config.xml" />-->
<arg line="-external-library-path ${flexsdk.lib.dir}" />
<arg line="-external-library-path ${playerglobal.lib.dir}" />
<arg line="-library-path+=${lib.dir}" />
<arg line="-source-path ${src.dir}" />
<arg line="-include-sources ${src.dir}" />
+ <arg line="-include-sources ${as3corelib.net.src}" />
+ <arg line="-include-sources ${as3corelib.json.src}" />
+ <arg line="-include-sources ${as3corelib.utils.StringUtil}" />
<arg line="-output '${bin.dir}/${library.name}.swc'" />
</exec>
<echo>[EXEC] Finished compiling ${library.name}.swc. ${library.name}.swc can be found in ${bin.dir}/.</echo>
Binary file not shown.
@@ -17,6 +17,8 @@
import com.custardbelly.couchdb.example.event.ContactEvent;
import com.custardbelly.couchdb.example.model.ContactDocument;
+ import flash.utils.getQualifiedClassName;
+
protected var _data:ContactDocument;
protected function findIconAttachment():CouchAttachment
@@ -43,6 +45,7 @@
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleIconLoadComplete);
+ loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
loader.load( new URLRequest( attachment.url ) );
}
}
@@ -55,6 +58,11 @@
userImage.source = info.content as Bitmap;
}
+ protected function handleLoadError( evt:IOErrorEvent ):void
+ {
+ trace( "[" + getQualifiedClassName(this) + "] IOErrorEvent:: " + evt.text );
+ }
+
protected function handleEdit():void
{
dispatchEvent( new ContactEvent( ContactEvent.EDIT, _data ) );
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,7 @@
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="libs"/>
+ <libraryPathEntry kind="3" linkType="1" path="/as3couchdb/bin/as3couchdb.swc" useDefaultLinkType="false"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
Binary file not shown.
@@ -337,9 +337,10 @@ package com.custardbelly.couchdb.example.view
protected function handleContactSave( evt:ContactEvent ):void
{
var contact:ContactDocument = evt.contact;
+ contact.addEventListener( CouchActionType.CREATE, handleContactSaveResult );
+ contact.addEventListener( CouchActionType.UPDATE, handleContactSaveResult );
contact.update();
hideEditPanel();
- loadContacts();
}
/**
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: as2couchdb_internal.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchRequestCommand.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchService.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CreateDatabaseCommand.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: IRequestCommand.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchAttachment.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchDatabase.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -39,10 +39,6 @@ package com.custardbelly.as3couchdb.core
*/
[Event(name="read", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
/**
- * Dispatched upon successful creation and save of a database in CouchDB.
- */
- [Event(name="save", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
- /**
* Dispatched upon successful deletion of database in CouchDB.
*/
[Event(name="delete", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchDocument.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchModel.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchModelEntity.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchServiceFault.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchServiceResult.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchSession.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchUser.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchActionType.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchContentType.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchFaultType.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchRequestMethod.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchRequestStatus.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchEvent.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchDatabaseActionMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchDocumentActionMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: CouchSessionActionMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: ICouchDatabaseMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: ICouchDocumentActionMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: ICouchSessionActionMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: IServiceMediator.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: AttachmentRequestQueue.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: AbstractDatabaseResponder.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
/**
* <p>Original Author: toddanderson</p>
* <p>Class File: AbstractDocumentResponder.as</p>
- * <p>Version: 0.4</p>
+ * <p>Version: 0.4.1</p>
*
* <p>Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Oops, something went wrong.

0 comments on commit 1de960f

Please sign in to comment.