Mailing Lists: Apple Mailing Lists

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

widget.system() - asynchronous usage



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


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.