MSFN Forum: [BUG+FIX] Dependencies are ignored on startup - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[BUG+FIX] Dependencies are ignored on startup Rate Topic: -----

#1 User is offline   Francesco 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 394
  • Joined: 20-March 04

Posted 02 August 2012 - 01:46 PM

Fix
In check.js replace

function parentsAreChecked(i)
{
	position="check.js";
	whatfunc="parentsAreChecked()";

	var j, elem;

	for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i]
	{
		//find parent's checkbox
		try
		{
			elem=eval("document.all." +deps[i][j]);
		}
		catch(ex)
		{
			return false;
		}

		if (elem != null)
		{
			if (!elem.checked || elem.disabled)
				return false;
		}
	}

	return true;
}


function parentsAreEnabled(i)
{
	position="check.js";
	whatfunc="parentsAreEnabled()";

	var j, elem;

	for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i]
	{
		//find parent's checkbox
		try
		{
			elem=eval("document.all." +deps[i][j]);
		}
		catch(ex)
		{
			return false;
		}

		if (elem.disabled)
			return false;
	}

	return true;
}



with

function parentsAreChecked(i)
{
	position="check.js";
	whatfunc="parentsAreChecked()";

	for (var j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i]
	{
		var itemIndex=findProgByUID(deps[i][j]);

		if (itemIndex>0)
		{
			var itemCheckbox = document.getElementById("chkbox"+itemIndex);
		
			if (!itemCheckbox.checked || itemCheckbox.disabled)
				return false;
		}
	}

	return true;
}


function parentsAreEnabled(i)
{
	position="check.js";
	whatfunc="parentsAreEnabled()";

	var j, elem;

	for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i]
	{
		var itemIndex=findProgByUID(deps[i][j]);

		if (itemIndex>0 && document.getElementById("chkbox"+itemIndex).disabled)
				return false;
	}

	return true;
}


This post has been edited by Francesco: 02 August 2012 - 01:49 PM



#2 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 August 2012 - 01:59 PM

FIXED!!!

#3 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,323
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 03 August 2012 - 07:29 PM

added.

#4 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 04 August 2012 - 11:44 PM

View PostKelsenellenelvian, on 03 August 2012 - 07:29 PM, said:

added.

Sorry Kel but bug still present in 8.5.2 (don't think you added it correctly

This post has been edited by ricktendo64: 04 August 2012 - 11:44 PM


#5 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,388
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 August 2012 - 12:57 AM

You can update WPI v8.5.2 to get the new release WPI v8.5.3.

Regards

This post has been edited by myselfidem: 08 August 2012 - 03:35 PM


#6 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 August 2012 - 01:02 AM

My bad, was manually updating did not realize I could use the Auto Update function

This post has been edited by ricktendo64: 05 August 2012 - 01:02 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy