Skip to content

Commit

Permalink
Updates for using strictly AS3 library code. Change to build file to …
Browse files Browse the repository at this point in the history
…only link in needed as3corelib classes that use only AS3.
  • Loading branch information
Todd Anderson committed Apr 16, 2010
1 parent ab80dd1 commit 1de960f
Show file tree
Hide file tree
Showing 77 changed files with 117 additions and 73 deletions.
Binary file added bin/as3couchdb-0.4.1.swc
Binary file not shown.
Binary file added bin/as3couchdb-0.4.1.swf
Binary file not shown.
Binary file modified bin/as3couchdb-0.4.swc
Binary file not shown.
Binary file modified bin/as3couchdb-0.4.swf
Binary file not shown.
16 changes: 14 additions & 2 deletions build.properties
Expand Up @@ -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}
12 changes: 12 additions & 0 deletions build.xml
Expand Up @@ -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" />
Expand Down Expand Up @@ -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>
Expand Down
Binary file not shown.
Binary file not shown.
Expand Up @@ -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
Expand All @@ -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 ) );
}
}
Expand All @@ -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 ) );
Expand Down
Binary file not shown.
Binary file not shown.
Binary file removed examples/flex/BasicFlexExample/libs/as3couchdb.swc
Binary file not shown.
1 change: 1 addition & 0 deletions examples/flex/DocumentsFlexExample/.actionScriptProperties
Expand Up @@ -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>
Expand Down
Binary file not shown.
Binary file not shown.
Expand Up @@ -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();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/as3couchdb_internal.as
@@ -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
Expand Down
@@ -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
Expand All @@ -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
Expand Down
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/command/IRequestCommand.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchAttachment.as
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/com/custardbelly/as3couchdb/core/CouchDatabase.as
@@ -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
Expand Down Expand Up @@ -38,10 +38,6 @@ package com.custardbelly.as3couchdb.core
* Dispatched upon successful read in and application of attributes from a database instance in CouchDB.
*/
[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.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchDocument.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchModel.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchModelEntity.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchServiceFault.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchServiceResult.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchSession.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/core/CouchUser.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/enum/CouchActionType.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/enum/CouchContentType.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/enum/CouchFaultType.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/enum/CouchRequestMethod.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/enum/CouchRequestStatus.as
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/com/custardbelly/as3couchdb/event/CouchEvent.as
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down
@@ -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
Expand Down

0 comments on commit 1de960f

Please sign in to comment.