http://mootools.net/docs/Native/Function#Function:delay
function.delay(delay, bind, args)
On Sun, Oct 26, 2008 at 8:31 AM, Marco M. Jaeger <
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:
>
> Hello
> I'm having some issues with using selector - I've an image element
> that gets added to the DOM with some delay - what I came up with so
> far is this:
>
> findImageElement: function(marker) {
> id = marker.get('id');
> dbug.log(id);
> try {
> el = self.mapCanvas.getElements('img[src$='
> + id + ']')[0];
> if (!$chk(el)) throw "error";
> dbug.log('element found');
> } catch(e) {
> this.findImageElement.delay(500, marker);
> }
> },
>
>
> the problem I'm having is that recalling the function in the catch
> part doesn't pass the marker element again to the function.
>
> I'm kind of lost on this one - is there a better way to do this and if
> not, what is the proper way anyway.
>
> Hope somebody can help please.
>
> Thanks
>
>
> ------------------------------
> View message @
> http://n2.nabble.com/try---catch-issue-tp1379204p1379204.html
> To start a new topic under MooTools Users, email
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> To unsubscribe from MooTools Users, click here< (link removed) >.
>
>
>
-----
The MooTools Tutorial: http://www.mootorial.com www.mootorial.com
CNET Clientside: http://clientside.cnet.com clientside.cnet.com
--
View this message in context:
http://n2.nabble.com/try---catch-issue-tp1379204p1379634.html
Sent from the MooTools Users mailing list archive at Nabble.com.