Forums: Depot:

 

Depot for dummies

first 2 3 last
 

tenPlus Depot for dummies

continuing on from waiting for godot:Introducing Depot

Originally posted by: Arsis
Try this:

- Create a new Fla in the Flash directory (and make sure the com directory is in there).

- Add the following script to the movie:

import com.snepo.depot.*;

url = "/testDir/subDir";

var PO = new Depot("localhost", 2323);

PO.onGet = myOnGet;

PO.onCreate = myOnCreate;

PO.onError = myOnError;

test = "this is a string";

PO.create(url, test, "a test object");

PO.get(url);



function myOnError(event:String, code:String) {

if (code == Errors.NOT_FOUND) {

createDirectory();

}

}

function myOnCreate(event:Object) {

trace("Data created");

}

function myOnGet(resultsIn:Array) {

for (var i = 0; i<resultsIn.length; i++) {

trace(resultsIn[i]);

}

}



I don't have an ide to test but it should create a directory, sotre a test string then retrieve the test string.

If this all works the run Depot Explorer.exe, click the servers tab and add a server at "localhost" port 2323. Click the xplore tab and should should see your depot instance and the new test data.

The more questions asked the better we can understand the issues.... so bring it on. smile


I now have updated FlashMX2004 from 7.0 to 7.2 and directories are setup as specified.

Depot Explorer is running, added a server, ip= localhost, port= 2323 and ..
in the Explore tab I see a dir named localhost. I can open and close it but don't see any test data.
When I click on the Perms tab the User Authentication panel is there asking me for admin password so Ill have to find that file mentioned earlier (or was it in the docs?), delete it and go from there.

 

StinkFist

The file contains the default password it's in c:\depot\config.

The default password is "cthulu" and that can be edited later through the Depot Explorer.

 

tenPlus

The original build required a password on first run. This has been reaplced with setting an admin password in the config. Don't worry about this for now as it is only used for authenitcation when deleting or adding new users.

this is where I'm upto. Do I need to fix the password prob to be able to see any test data?

 

tenPlus

thanx Stinky, that worked.
There are now two users in the Depot Explorer: anonymous and admin.
Also now in the Explore tab there is output of:

Error Message: Depot Error: unsupported object type (getDepotObject).
Error Code: 415

 

tenPlus

I'm not sure if this has any meaning but in the start-web.exe the last output was:

[2006-09-10 20:40:20] [info] sending request through (with body: Nothing)
[2006-09-10 20:40:20] [info] got contents of length: 751
[2006-09-10 20:40:20] [info] closing client handle
[2006-09-10 20:40:20] [info] removed HTTP connection, 0 left

 

StinkFist

The password stuff shouldn't make a difference at all. Can you post a screenshot of the Explorer with all of the folders opened?

 

tenPlus

setting permissions doesn't seem to work in Depot Explorer. It allows me to tick Create, Retrieve, and Delete, but not Update boxes but there's no way for those options to then be set?

 

tenPlus

 

StinkFist

Originally posted by: tenPlus
setting permissions doesn't seem to work in Depot Explorer. It allows me to tick Create, Retrieve, and Delete, but not Update boxes but there's no way for those options to then be set?


That's really a usability bug. The update option is greyed out because it's unimplemented. The Create permission allows both creation and updating of data.



Try this:

Stop the depot service, stop the web server, delete the contents of the c:\depot\data directory, start the depot service.

Run the AS code that Arse posted.

Check the Depot Explorer. If there's nothing present then hit the "refresh" button in the upper left hand side of the explorer.

 

tenPlus

still the same.
"Refresh" didn't work, even after the third time. I had to authenticate admin, and even then that took 3x before it changed i.e. I had to put the password in and click, each time it just went back to the authenticate panel looking for the password.
After the third time it took. When I checked the Explore tab the output was now there.

 

tenPlus

another bug with Depot Explorer: you can't remove a user from the Perms tab/panel either

 

ernieweaselfat

Stupid question #1:

I opened start-web.sh and start-depot.sh, tried opening the localhost:8080/index.html.

connection refused while trying to access localhost:8080...

 

StinkFist



Try localhost:8080/wiki/wiki.html

Odd that you got a "connection refused" error though because you should have just gotten a 404.

Did you do


%> ./start-web.sh &
%> ./start-depot.sh



?

 

ernieweaselfat

When you say:


%> ./start-web.sh &
%> ./start-depot.sh



Do you mean double click start-web.sh and double click start-depot.sh? If so, that would be a yes. If not, I don't know what you mean.

tried opening localhost:8080/wiki/wiki.html and got the same error. It says localhost:8080 connection is refused.

shrug.gif

PS I don't have a firewall.

 

StinkFist

Actually that's a very good point. Double clicking probably won't work.

Open Terminal.app (Applications -> Utilities -> Terminal)

type:


cd ~/depot
./start-web.sh &
./start-depot.sh


That should start it up. If you still can't connect open Preferences, click Sharing, click Firewall and make sure it's allowing traffic through ports 8080 and 2323 smile

 

ernieweaselfat

Originally posted by: StinkFist
Actually that's a very good point. Double clicking probably won't work.

Open Terminal.app (Applications -> Utilities -> Terminal)

type:


cd ~/depot
./start-web.sh &
./start-depot.sh


That should start it up. If you still can't connect open Preferences, click Sharing, click Firewall and make sure it's allowing traffic through ports 8080 and 2323 smile


sweet that worked. the problem was that I was reading the README (which told me to double click) and not the users.pdf which tells me to do what you just told me to do.

 

StinkFist

Shit.

Documentation bugs are the worst. Thanks for bringing that to my attention smile

The problem is that the README is out of date. You can double click to start depot but only if the environmental variable DEPOT_HOME is set to point at Depot's home folder. By default depot home is set to the directory that ./start-depot.sh is opened from. When you double click a file it thinks it's being opened from a different directory.


Like I mentioned in the other thread, there's going to be a few rough edges so the best bet is to ask questions. We tried awfully hard to proof things before Depot went out the door but it's hard to catch everything.

Also remember that if you do decide to buy a license point release upgrades are free (e.g. 1.2 to 1.5, 1.6, 1.7). That means that any fixes that are required will be available, nobody gets stranded smile

 

tenPlus

will you also be updating the trial version at the same time?

 

StinkFist

Absolutely. The demo is always up to date with the full version smile

 

tenPlus

Originally posted by: StinkFist
Try this:

Stop the depot service, stop the web server, delete the contents of the c:\depot\data directory, start the depot service.

Run the AS code that Arse posted.

Check the Depot Explorer. If there's nothing present then hit the "refresh" button in the upper left hand side of the explorer.



nothing when I run Arses code, still nothing when I refresh Depot Explorer, and once I crank up the depot-service and depot-web server the same error then appears in Depot Explorer.

 
first 2 3 last
 

Forums: Depot: Depot for dummies

 
New Post
 
You must be logged in to post