Expand my Community achievements bar.

FileShare SDK example and FileShare Pod

Avatar

Level 3
Hello CocoWorld,



I am after a pod just like fileShare except for the User
interface which needs to be internationalise (in french).

That is where i naturaly looked at the FileShare model used
in the SDK example.

The problem i encountered is that the example gives me some
errors on uploading file, it starts by updating its size then an
error is thrown.



Error #2044: Unhandled ioError:. text=Error #2038: File I/O
Error. URL:
https://na2.connect.acrobat.com//app/content/accounts/oie/na2-sdk-31fd66ad-d575-452b-8ad8-d0d5a82033...

uploadFileUrl:
https://na2.connect.acrobat.com//app/content/accounts/oie/na2-sdk-31fd66ad-d575-452b-8ad8-d0d5a82033...
filename: BasicCompositionMAX.zip (BasicCompositionMAX.zip)

Error #2044: Unhandled ioError:. text=Error #2038: File I/O
Error. URL:
https://na2.connect.acrobat.com//app/content/accounts/oie/na2-sdk-31fd66ad-d575-452b-8ad8-d0d5a82033...

uploadFileUrl:
https://na2.connect.acrobat.com//app/content/accounts/oie/na2-sdk-31fd66ad-d575-452b-8ad8-d0d5a82033...
filename: edoboard_test.png (edoboard_test.png)



However the FileShare pod works perfectly.

Is the example faulty somehow ?

Any other way to use FileShare pod with a custom gui ?



Thanks again.

11 Replies

Avatar

Level 3
Hi Dean,



The exact sale code is working just fine now, i don't get it
probably a glitch on my side. The topic can be deleted if an admin
comes by.

Thanks.

Avatar

Level 2
hi,

i have these errors:



Severity and Description Path Resource Location Creation Time
Id

1120: Accès à la propriété non
définie myConnectSession. videoconferencetest/src
videoconferencetest.mxml line 127 1236074737812 74

1120: Accès à la propriété non
définie myConnectSession. videoconferencetest/src
videoconferencetest.mxml line 128 1236074737812 75

1120: Accès à la propriété non
définie myConnectSession. videoconferencetest/src
videoconferencetest.mxml line 144 1236074737812 77

1120: Accès à la propriété non
définie myConnectSession. videoconferencetest/src
videoconferencetest.mxml line 150 1236074737812 79

1120: Accès à la propriété non
définie myConnectSession. videoconferencetest/src
videoconferencetest.mxml line 155 1236074737828 80

1120: Accès à la propriété non
définie notificationMessage. videoconferencetest/src
videoconferencetest.mxml line 131 1236074737812 76

1120: Accès à la propriété non
définie notificationMessage. videoconferencetest/src
videoconferencetest.mxml line 146 1236074737812 78

1120: Accès à la propriété non
définie notificationMessage. videoconferencetest/src
videoconferencetest.mxml line 187 1236074737828 81







why i have this as error?







many thanks for your help



Lionceau,

Avatar

Level 2
My source code is :

What i forget in my declaration?



Why i have this errors ?


http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1424553#5...



private function init():void

{

// we are interested in both SYNCHRONIZATION_CHANGE
(connection success) and Error events


myConnectSession.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE,
onSessionEventNotification);

myConnectSession.addEventListener(SessionEvent.ERROR,
onSessionEventNotification);



// small status indicator

notificationMessage.text = "Login to the AFC Service...";

}



/**

* Handles sessionEvents such as synchronization, errors, and
so on.

* @see SessionEvent

*/

private function
onSessionEventNotification(p_evt:SessionEvent):void

{

//The type of event emitted when the session gains or loses
synchronization with its source.

if (p_evt.type == SessionEvent.SYNCHRONIZATION_CHANGE) {



//if we are successfully connected

if (myConnectSession.isSynchronized) {



notificationMessage.text = "Connected";



// Get the file manager from our connectSession.

if (!_fileManager) {

_fileManager = myConnectSession.fileManager;

}



// Get the user manager from connectSession for later use.

if (!_userManager) {

_userManager = myConnectSession.userManager;

}



// create new file publisher to upload/delete files

if(!_filePublisher){

_filePublisher = new FilePublisher();

_filePublisher.initialize();



//Only a room owner can create the new file group (a group
is like folder).

if(!_fileManager.isGroupDefined(_groupid) &&
_fileManager.getUserRole(_userManager.myUserID,_groupid) ==
UserRoles.OWNER) {

//Create a new node with a new groupid.

var nodeConfig:NodeConfiguration = new NodeConfiguration;

nodeConfig.sessionDependentItems = false; //Specifies
whether files in the pod should be deleted as the session ends.

_filePublisher.createAndUseGroup(_groupid, nodeConfig);

}else {

//otherwise, use assigned groupid

_filePublisher.groupName = _groupid;

}

}



// Create a file subscriber to download file.

if(!_fileSubscriber){

_fileSubscriber = new FileSubscriber();

_fileSubscriber.initialize();

}



// Bind to the file manager's file descriptors array
collection to display the datagrid user interface.

_fileDescriptors =
_fileManager.getFileDescriptors(_groupid);

}

}

else if (p_evt.type == SessionEvent.ERROR) {

// we get an error from connect session

notificationMessage.text = "Error: " + p_evt.error;

}

}



/**

* Handle the upload button click.

*/

private function onUploadClick():void

{

var filterArray:Array = [new FileFilter("*.*", "*.*")];

_filePublisher.browse(UIDUtil.createUID(), filterArray);

}



/**

* Handle the download button click.

*/

private function onDownloadClick():void

{

if(_fileGrid.selectedItem) {

try{

_fileSubscriber.download(_fileGrid.selectedItem as
FileDescriptor);

}catch(e:Error) {

trace("Error download: " + e.message);

}

}



}



/**

* Handle the delete button click.

*/

private function onDeleteClick():void

{

if(_fileGrid.selectedItem) {

_filePublisher.remove(_fileGrid.selectedItem as
FileDescriptor);

}

}





many thanks for your help,





Lionceau,

Avatar

Level 2
This is all my declartionand tags for my project :



Why i have this errors ?


http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1424553#5...



<mx:Application layout="absolute"

xmlns:mx="
http://www.adobe.com/2006/mxml"

xmlns:rtc="AfcsNameSpace"

xmlns:collaboration = "com.adobe.rtc.collaboration.*"

xmlns:components="*"

>

<!-- cette partie du code es là plus interessante
car elle sert à capter le moment où notre application est
connectée et synchronisée, nous pouvons ajouter un
écouteur d’événement
SessionEvent.SYNCHRONIZATION_CHANGE sur le container, et surveiller
sa propriété ‘isSynchronized‘. Nous
reviendrons prochainement sur les différents aspects et
acteurs en jeu lors de cette synchronisation. -->



<mx:Script>

<![CDATA[

import mx.controls.Alert;



import com.adobe.rtc.events.SessionEvent; //utilisé
pour les trois blocs

import com.adobe.rtc.messaging.UserRoles; //utilisé
pour les trois blocs

import com.adobe.rtc.collaboration.AudioPublisher; //
AudioPublisher me sert pour la gestion du microphone

import com.adobe.rtc.collaboration.AudioSubscriber; // me
sert pour choisr l' aboné écouté

//import com.adobe.rtc.collaboration; // me sert pour la
gestion du microphone

//import com.adobe.rtc.clientManagers;// me sert pour la
gestion du microphone





import com.adobe.rtc.events.StreamEvent;// pour le son
(audio xml)







import mx.events.ItemClickEvent; //pour le son ( audio xml)

import mx.controls.Label;

import mx.core.UIComponent; // me sert pour la gestion du
microphone

import flash.events.EventDispatcher;// me sert pour la
gestion du microphone

// import com.adobe.rtc.components:ResizableCanvas; amettre?






//debut bloc share

import
com.adobe.rtc.sharedManagers.descriptors.FileDescriptor;

import mx.utils.UIDUtil;

import mx.collections.ArrayCollection;

import com.adobe.rtc.collaboration.FileSubscriber;

import com.adobe.rtc.sharedManagers.UserManager;

import com.adobe.rtc.messaging.NodeConfiguration;

import com.adobe.rtc.events.CollectionNodeEvent;

import com.adobe.rtc.collaboration.FilePublisher;

import com.adobe.rtc.sharedManagers.FileManager;



[Bindable]

private var applicationTitle:String = "File Publisher
Example";



// list of managers

private var _fileManager:FileManager;

private var _filePublisher:FilePublisher;

private var _fileSubscriber:FileSubscriber;

private var _userManager:UserManager;



// our datagrid dataprovider will use this collection

[Bindable]

private var _fileDescriptors:ArrayCollection = new
ArrayCollection();



// file sharing group id, it is similiar to that of folder
concept

private var _groupid:String = "_filePublisherExample";

//fin bloc share



// état de la session

private var isConnected:Boolean = false;

private var activityTimer:Timer = new Timer(30,1);







Why i have this errors ?


http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=759&threadid=1424553#5...









many thanks for your help,





Lionceau,

Avatar

Former Community Member
Hi,



Your code can't find the myConnectSession.

Where is your myConnectSession object? Have you defined the
id property in the ConnectSessionContainer tag to be
myConnectSession?



Look at any example and you will find you need to give an id
to the ConnectSessionContainer, something like this .
<rtc:ConnectSessionContainer id="{myConnectSession}" />



Thanks

Hironmay Basu

Avatar

Level 2
yes it is just , actually there is no error but , but there
nothing



when i click in my button , there is nothing , why ?



<mx:Button id="upload_btn" label="Upload File"
click="onUploadClick()"/>

<mx:Button id="download_btn" label="Download File"
click="onDownloadClick()"/>

<mx:Button id="delete_btn" label="Delete File"
click="onDeleteClick()"/>













it is my source :





/**

* This application shows how to upload, download, delete,
and display files

* via AFCS's FileManager API, FilePublisher, and
FileSubscriber components.

*/





/**

* Completes initialization and adds session listeners to
catch session connected events.

*/



private function init():void

{

// we are interested in both SYNCHRONIZATION_CHANGE
(connection success) and Error events


sessionManager.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE,
onSessionEventNotification);

sessionManager.addEventListener(SessionEvent.ERROR,
onSessionEventNotification);



// small status indicator

notificationMessage.text = "Login to the AFC Service...";

}



/**

* Handles sessionEvents such as synchronization, errors, and
so on.

* @see SessionEvent

*/

private function
onSessionEventNotification(p_evt:SessionEvent):void

{

//The type of event emitted when the session gains or loses
synchronization with its source.

if (p_evt.type == SessionEvent.SYNCHRONIZATION_CHANGE) {



//if we are successfully connected

if (sessionManager.isSynchronized) {



notificationMessage.text = "Connected";



// Get the file manager from our connectSession.

if (!_fileManager) {

_fileManager = sessionManager.fileManager;

}



// Get the user manager from connectSession for later use.

if (!_userManager) {

_userManager = sessionManager.userManager;

}



// create new file publisher to upload/delete files

if(!_filePublisher){

_filePublisher = new FilePublisher();

_filePublisher.initialize();



//Only a room owner can create the new file group (a group
is like folder).

if(!_fileManager.isGroupDefined(_groupid) &&
_fileManager.getUserRole(_userManager.myUserID,_groupid) ==
UserRoles.OWNER) {

//Create a new node with a new groupid.

var nodeConfig:NodeConfiguration = new NodeConfiguration;

nodeConfig.sessionDependentItems = false; //Specifies
whether files in the pod should be deleted as the session ends.

_filePublisher.createAndUseGroup(_groupid, nodeConfig);

}else {

//otherwise, use assigned groupid

_filePublisher.groupName = _groupid;

}

}



// Create a file subscriber to download file.

if(!_fileSubscriber){

_fileSubscriber = new FileSubscriber();

_fileSubscriber.initialize();

}



// Bind to the file manager's file descriptors array
collection to display the datagrid user interface.

_fileDescriptors =
_fileManager.getFileDescriptors(_groupid);

}

}

else if (p_evt.type == SessionEvent.ERROR) {

// we get an error from connect session

notificationMessage.text = "Error: " + p_evt.error;

}

}



/**

* Handle the upload button click.

*/

private function onUploadClick():void

{

var filterArray:Array = [new FileFilter("*.*", "*.*")];

_filePublisher.browse(UIDUtil.createUID(), filterArray);

}



/**

* Handle the download button click.

*/

private function onDownloadClick():void

{

if(_fileGrid.selectedItem) {

try{

_fileSubscriber.download(_fileGrid.selectedItem as
FileDescriptor);

}catch(e:Error) {

trace("Error download: " + e.message);

}

}



}



/**

* Handle the delete button click.

*/

private function onDeleteClick():void

{

if(_fileGrid.selectedItem) {

_filePublisher.remove(_fileGrid.selectedItem as
FileDescriptor);

}

}







Lionceau,

Avatar

Former Community Member


Hi Lionceau,



Sorry, we can't afford to do interactive debugging of your
compile errors - it's just overwhelming us.



For Flex compilation questions, see the Flex forum :
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60&catid=585&entercat=y



thanks

nigel

Avatar

Level 2
hi



yes but i don't know how create a new subject



thanks,



Lionceau,

Avatar

Level 2

hello,

to answer the question thank you for see this topic:

http://forums.adobe.com/thread/452883

many thanks for your help.

lionceau,