PDA

View Full Version : showing status bar while uploading image


mohan
09-02-2003, 04:02 AM
Hai antun,

How do i show the status bar while file is uploading in laszlo.
Like " Loading image please wait"


Thanks
Rudresh

antun
09-02-2003, 09:39 AM
Like I said here:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=366

This isn't handled by Laszlo at all. You can't upload from the Flash client. My suggestion is to use a separate browser window to handle the upload.

-Antun

antun
09-11-2003, 08:23 AM
How do i show the status bar while file is uploading in laszlo.


Or did you mean downloading?

-Antun

mohan
11-10-2003, 06:37 AM
Hi Antun,

I am able to upload an image from my local machine and store it in the remote server. While displaying the same image in my application , it will take time to download.During that time i want to show the status(progrss) bar to the user so that he can wait for a while.

Thanks alot

Mallesh

antun
11-10-2003, 10:16 AM
I can't think of a way to do this right now. There is an onloadperc event (and a corresponding loadperc attribute) of view, however it doesn't get triggered intermittently when a stagic image is being downloaded, whereas it does for audio and video.

What you can do is to have some kind of loading indicator that does not show the amount of progress, but rather just assures the user that something is loading. See my earlier post on this thread for more on that.

-Antun

antun
11-10-2003, 10:17 AM
Sorry, I didn't mean see my earlier post, see here instead:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=347

-Antun

JApostoles
11-08-2004, 11:02 AM
What if you just want to hide the display, say, until all images within a group have been loaded?

For example, I have an object that contains an image view. If I have three of these objects created inside of a view, is there a way to trigger an event when all three of the images within these three objects have loaded? Basically I want to hide the display while they load, and then fade the view in when the three objects (and their images) have loaded.

antun
11-08-2004, 11:10 AM
<view> has an onload event that is sent when it attaches (finishes loading) its resource (image).

You could write some logic that waits for all three to send their onload event before displaying them.

-Antun

JApostoles
11-08-2004, 11:34 AM
I thought of that, but the image resources that need to be loaded are actually in a more complex object. The data for these objects are loaded from XML. If I use your suggestion, the objects would have to notify another object (ie: now these objects are dependent on another object, but are not derived classes).

In pictures:


{parent object}
some view
\\\_______ creates three objects of type IMG

{IMG object}
onLoad = notify parent view it's loaded



You can see the problem.. now the object has the unneccesary restriction that it must be in a view that has some kind of notification variable / event.

antun
11-08-2004, 12:19 PM
I think you might want to look at delegates for this - they're a procedural way of binding to events:

http://www.laszlosystems.com/lps-2.2/docs/guide/delegates.html

-Antun

JApostoles
11-08-2004, 12:59 PM
Hmm.. can you register a delegate in one object to call a method in another?

antun
11-08-2004, 01:02 PM
The first argument to the LzDelegate constructor is its context, which is the view you want to call the method specified by the second argument in.

-Antun

JApostoles
11-08-2004, 01:06 PM
Alright, I'm going to look into using that. I'll post what happens to the thread just in case others may benefit.

- Jon