There are many parts to our API that you might not know about unless
you were looking for them. We will be posting code snippets regularly to help expose some of these features.
[NOTE: you can find out more detailed information about any of these functions in the recently updated online documentation]
Most web developers recommend using Firefox with Firebug for debugging,
as there are not many good alternatives for debugging in Internet
Explorer. You can print out messages to your browser's debug console using widget.debug(). This works in a similar fashion to the "trace" command in Flash CS3/4. To view traced messages in Firefox, click the Firebug icon in the lower right corner to bring up the console, Click the check mark next to "Allow Console Logging" (if its not already checked), then click on the console tab to see the traced messages. Alternatively, you can use widget.alert() to bring up a javascript-style alert box directly into your widget. Widget.debugMode must be set to true to see output in the console -- this is useful because you can set it to false to hide all of your debug messages once your widget is ready for production. Note that you may encounter a bug when using older versions of our API that would prevent you from compiling when referencing the "debugMode" property, so make sure to grab the latest release here. Examples of both the alert and debug functions below:
Recent Comments