Exemple #1
0
///Daje użytkownikowi możliwość wprowadzenia ścieżki do sclang
bool getSCPath()
{
	FILE* pathFile=fopen(SC_PATH_FILE, "r");
	if(pathFile!=NULL)
	{
		fgets(sclangPath, MAX_PATH, pathFile);
		if(existsTest(sclangPath))
		{
			return true;
		}
	}
	fclose(pathFile);
	
	ShowAlert(L"SuperCollider Path", L"To launch program you must provide path to sclang in SuperCollider folder.");
	getOpenFile(sclangPath, MAX_PATH);
	
	printf("Selected path: %s\n", sclangPath);
	
	if(existsTest(sclangPath))
	{
		return true;
	}
	else
	{
		ShowAlert(L"SuperCollider Path", L"Patch to sclang is incorrect!");
		return false;
	}
}
/**
 * Returns a new valid test identifier
 * @return A new test identifier
 */
QString NMGModuleInstanceManager::newTestId()
{
	QString id;
	do id.setNum ( random.random() ); while ( existsTest ( id ) );
	return id;
}