ActionsDev

Tim Plumb

15 Mar 2010, 12:12 pm

Alerts in fwDrawItem break preview

This is more of a ‘please note’ than a bug but I thought that I’d share… I’ve just spent the last hour trying to track down why one of my actions wasn’t previewing when placed as an inline item only to find that part of the issue was that my debugging alert in the fwDrawItem function was in itself causing the function to fail. So for example;

function fwDrawItem()
{
    var theHTML = createHTMLPreview();
    alert(theHTML); //  <-- causes fwDrawItem to fail

    if (theHTML)
    {
        return new FWImage( theHTML,    // the HTML
            null,       // default width (item width)
            null,       // default height (item height)
            1,          // flags (wait for resources to load)
            0.1);       // delay after load (to allow webkit time to render)
    }
    return null;
}

I’m off now to patch up my bleeding head and mend the broken wall. :-) Regards, Tim.

FreewayActions.com - Freeware and commercial actions for Freeway Express & Pro. ………………………………………………………………………… Protect your mailto links from being harvested by spambots with Anti Spam. Only available at FreewayActions.com ………………………………………………………………………… http://www.freewayactions.com

quote


Extend Freeway the way you want with FreewayActions.com

http://www.freewayactions.com

Dan J

16 Mar 2010, 8:21 am

Tim, it’s that kind of dedication that has made you famous.

quote