Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widget.system() - asynchronous usage



CurrentStdout is just the variable name that is passed to your handler.

So you do something like this:

var obj = widget.system ("blah", myfinishedcallback);

obj.onreadoutput = mystdoutfunc;


function mystdoutfunc (stdout)
{
    alert (stdout);
}


> Hi.
> 
> I've some problems with asynchronous usage of widget.system().
> 
> URL:
> http://developer.apple.com/documentation/AppleApplications/Conceptual/
> Dashboard_Tutorial/Scripts/chapter_12_section_4.html
> 
> -------------------------------------------
> Your onreadoutput handler should accept an argument. When it is
> called, it is passed a string that has the most recent string placed
> on stdout:
> 
> function outHandler(currentStringOnStdout){    // Code that does
> something with the command¹s current output like...
>      document.getElementById(³element²).innerText = currentStdout;}
> -------------------------------------------
> 
> I don't understand from where came the variable "currentStdout". The
> way I see it it is not possible to pass the outHandler function an
> argument: myCommand.onreadoutput = outputHandler; ... how con I get
> the output from widget.system() (asynchronous usage)?
> 
> greetings
> Dirk Einecke _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Dashboard-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/dashboard-dev/email@hidden
> 
> This email sent to email@hidden

--------------------------------------------------
John Louch         Internet #: email@hidden
(805) 541 2965


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >widget.system() - asynchronous usage (From: Dirk Einecke <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.