I don't know about the rest of you, but whenever I open a help file for a class, I get the following error:

---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?

Line: 91
Error: 'parent.titlebar.document' is null or not an object
---------------------------
Yes   No  
---------------------------


This only happens when using the internal help browser.  If I set it up to launch externally, no problem.  So I rolled up my sleeves and managed to kludge it out.

You'll need to open up
C:\Program Files\Adobe\Flex Builder 2\plugins\com.adobe.flexbuilder.help_2.0.143459\doc.zip
(or wherever you installed it)

First, make a backup copy of the zip!

Then open asdoc.js and look for the findTableTitleObject function declaration.  Replace it and the next two functions with the code below.  You'll need to stick your new version of asdoc.js back into the zip file.  That will vary depending on your setup.  You don't need to reload Flex.  Any new help tab opened will automatically read from this script.

function findTitleTableObject(id)
{
    if (isEclipse() && parent.titlebar && parent.titlebar.document)
        return parent.titlebar.document.getElementById(id);
    else if (top.titlebar && top.titlebar.document)
        return top.titlebar.document.getElementById(id);
    else
        return document.getElementById(id);
}

function titleBar_setSubTitle(title)
{
    if (isEclipse() || top.titlebar) {
    var obj = findTitleTableObject("subTitle");
    if (obj)
          obj.childNodes.item(0).data = "">
  }
}

function titleBar_setSubNav(showConstants,showProperties,showStyles,showEffects,showEvents,showConstructor,showMethods,showExamples,
                showPackageConstants,showPackageProperties,showPackageFunctions,showInterfaces,showClasses,showPackageUse)
{
    if (isEclipse() || top.titlebar)
    {
        var o = findTitleTableObject("propertiesLink"); if (o) o.style.display = showProperties ? "inline" : "none";
        var o = findTitleTableObject("propertiesBar"); if (o) o.style.display = (showProperties && (showPackageProperties || showConstructor || showMethods || showPackageFunctions || showEvents || showStyles || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("packagePropertiesLink"); if (o) o.style.display = showPackageProperties ? "inline" : "none";
        var o = findTitleTableObject("packagePropertiesBar"); if (o) o.style.display = (showPackageProperties && (showConstructor || showMethods || showPackageFunctions || showEvents || showStyles || showConstants || showEffects || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("constructorLink"); if (o) o.style.display = showConstructor ? "inline" : "none";
        var o = findTitleTableObject("constructorBar"); if (o) o.style.display = (showConstructor && (showMethods || showPackageFunctions || showEvents || showStyles || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("methodsLink"); if (o) o.style.display = showMethods ? "inline" : "none";
        var o = findTitleTableObject("methodsBar"); if (o) o.style.display = (showMethods && (showPackageFunctions || showEvents || showStyles || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("packageFunctionsLink"); if (o) o.style.display = showPackageFunctions ? "inline" : "none";
        var o = findTitleTableObject("packageFunctionsBar"); if (o) o.style.display = (showPackageFunctions && (showEvents || showStyles || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("eventsLink"); if (o) o.style.display = showEvents ? "inline" : "none";
        var o = findTitleTableObject("eventsBar"); if (o) o.style.display = (showEvents && (showStyles || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("stylesLink"); if (o) o.style.display = showStyles ? "inline" : "none";
        var o = findTitleTableObject("stylesBar"); if (o) o.style.display = (showStyles && (showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("effectsLink"); if (o) o.style.display = showEffects ? "inline" : "none";
        var o = findTitleTableObject("effectsBar"); if (o) o.style.display = (showEffects && (showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("constantsLink"); if (o) o.style.display = showConstants ? "inline" : "none";
        var o = findTitleTableObject("constantsBar"); if (o) o.style.display = (showConstants && (showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("packageConstantsLink"); if (o) o.style.display = showPackageConstants ? "inline" : "none";
        var o = findTitleTableObject("packageConstantsBar"); if (o) o.style.display = (showPackageConstants && (showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("interfacesLink"); if (o) o.style.display = showInterfaces ? "inline" : "none";
        var o = findTitleTableObject("interfacesBar"); if (o) o.style.display = (showInterfaces && (showClasses || showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("classesLink"); if (o) o.style.display = showClasses ? "inline" : "none";
        var o = findTitleTableObject("classesBar"); if (o) o.style.display = (showClasses && (showPackageUse || showExamples)) ? "inline" : "none";

        var o = findTitleTableObject("packageUseLink"); if (o) o.style.display = showPackageUse ? "inline" : "none";
        var o = findTitleTableObject("packageUseBar"); if (o) o.style.display = (showPackageUse && showExamples) ? "inline" : "none";

        var o = findTitleTableObject("examplesLink"); if (o) o.style.display = showExamples ? "inline" : "none";
    }
}


--
Jason __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to