HighDots Forums  

F12 causes error message

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss F12 causes error message in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ZenP
 
Posts: n/a

Default F12 causes error message - 08-06-2004 , 08:05 AM






Setup:

DW04, CF as remote server, local and remote on local HD.

If I click the Refresh icon in Files | Files and then the blue Put up arrow
and then refresh an already open IE6 or FireFox, the site refreshes perfectly.

But, if neither browser is open, I open DW and then the default.cfm page and
hit F12, I get the following error:

"While executing receiveArguments in PIB_Dynamic.htm, the following JavaScript
error(s) occurred:
At line 111 of file "C:'MacromediaStudioMX04\Dreamwevaer MX
2004\Configuration\Menues\MM\PIB_Dynmaic.js":
Exception thrown in native function."

This is the referenced file:

// Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved.

function havePreviewTarget()
{
var bHavePreviewTarget = false;

if (dw.getFocus(true) == 'site')
{
if (site.getFocus() == 'remote')
{
bHavePreviewTarget = site.getRemoteSelection().length > 0 &&
site.canBrowseDocument();
}
else if (site.getFocus() != 'none')
{
var selFiles = site.getSelection();

if (selFiles.length > 0)
{
var i;

bHavePreviewTarget = true;

for (i = 0; i < selFiles.length; i++)
{
var selFile = selFiles;
var urlPrefix = "file:///";
var strTemp = selFile.substr(urlPrefix.length);

// If this is an FTP/RDS site, we have a target.
if (selFile.indexOf("%%SERVER%%") != -1)
bHavePreviewTarget = true;

// otherwise...
else if (selFile.indexOf(urlPrefix) == -1)
bHavePreviewTarget = false;
else if (strTemp.indexOf("/") == -1)
bHavePreviewTarget = false;
else if (!DWfile.exists(selFile))
bHavePreviewTarget = false;
else if (DWfile.getAttributes(selFile) == null)
bHavePreviewTarget = true;
else if (DWfile.getAttributes(selFile).indexOf("D") != -1)
bHavePreviewTarget = false;
}
}
}
}
else if (dw.getFocus() == 'document' ||
dw.getFocus() == 'textView' || dw.getFocus("true") == 'html' )
{
var dom = dw.getDocumentDOM('document');
if (dom != null)
{
var parseMode = dom.getParseMode();
if (parseMode == 'html' || parseMode == 'xml')
bHavePreviewTarget = true;
}
}

return bHavePreviewTarget;
}

function receiveArguments()
{
var whichBrowser = arguments[0];
var theBrowser = null;
var i=0;
var browserList = null;
var result = false;

if (havePreviewTarget())
{
// Code to check if we were called from a shortcut key
if (whichBrowser == 'primary' || whichBrowser == 'secondary')
{
// get the path of the selected browser
if (whichBrowser == 'primary')
{
theBrowser = dw.getPrimaryBrowser();
}
else if (whichBrowser == 'secondary')
{
theBrowser = dw.getSecondaryBrowser();
}

// match up the path with the name of the corresponding browser
// that appears in the menu
browserList = dw.getBrowserList();
while (i < browserList.length)
{
if (browserList[i+1] == theBrowser)
theBrowser = browserList;
i+=2;
}
}
else
theBrowser = whichBrowser;

// Only launch the browser if we have a valid browser selected
if (theBrowser != "file:///" && typeof(theBrowser) != "undefined" &&
theBrowser.length > 0)
{
if (dw.getFocus(true) == 'site')
{
// Only get the first item of the selection because
// browseDocument() can't take an array.
//dw.browseDocument(site.getSelection()[0],theBrowser);
site.browseDocument(theBrowser);
}
else
THIS IS LINE 111
Quote:
dw.browseDocument(dw.getDocumentPath('document'),t heBrowser)
;
}
else
{
// otherwise, if the user hit the F12 or Ctrl+F12 keys,
// ask if they want to specify a primary or secondary browser now.
if (whichBrowser == 'primary')
{
result = window.confirm(MSG_NoPrimaryBrowserDefined);
}
else if (whichBrowser == 'secondary')
{
result = window.confirm(MSG_NoSecondaryBrowserDefined);
}

// If they clicked OK, show the prefs dialog with the browser panel
if (result)
dw.showPreferencesDialog('browsers');
}
}
}

function canAcceptCommand()
{
var PIB = dw.getBrowserList();

if (arguments[0] == 'primary' || arguments[0] == 'secondary')
return havePreviewTarget();

return havePreviewTarget() && (PIB.length > 0);
}

// getDynamicContent returns the contents of a dynamically generated menu.
// returns an array of strings to be placed in the menu, with a unique
// identifier for each item separated from the menu string by a semicolon.
//
// return null from this routine to indicate that you are not adding any
// items to the menu
function getDynamicContent(itemID)
{
var browsers = null;
var PIB = null;
var i;
var j=0;
browsers = new Array();
PIB = dw.getBrowserList();
// each browser pair has the name of the browser and the path that leads
// to the application on disk. We only put the names in the menus
for (i=0; i<PIB.length; i=i+2)
{
browsers[j] = new String(PIB);

if (dw.getPrimaryBrowser() == PIB[i+1])
browsers[j] += "\tF12";
else if (dw.getSecondaryBrowser() == PIB[i+1])
browsers[j] += "\tCmd+F12";

browsers[j] += ";id='"+escQuotes(PIB)+"'";

if (itemID == "DWPopup_PIB_Default")
browsers[j] = MENU_strPreviewIn + browsers[j];

j = j+1;
}
return browsers;
}


Please help.

THank you.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.