For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 3 replies, 2 voices, and was last updated 20 years, 6 months ago by
David Naas.
-
AuthorPosts
-
David NaasMemberContact us message from:
Name: David Naas
Email: dnaas@hotmail.com
Full Message:
I’m currently testing the enterprise workbench and the javascript ‘code hint’ doesn’t seem to work very well or I’m not using it correctly.if I declare the follow
var dave = new Array();
I should be then able to type in dave. and hit ‘control space’ shouldn’t push, pop,etc… show up?
Also I have an html file that loads the the javascript when I debug, I must debug the html but I can not single step into the js file.
I’m working on windows XP with IIS, Most of my work is in C#, xml, xslt , I’m looking into java programming again and since I do a lot of js programming I’m look touse exlipse and MyElipse as my main tools.
so, Do I first need to setup a webserver for the web project to run in in order to debug my js files?
thanks for any help on this
–Dave
February 6, 2006 at 1:05 pm #246174
support-eugeneMemberDavid,
Unfortunately, JS editor does not track the variable type atm so it won’t suggest the methods for the dave variable.Can you provide more details on the debugger issue. Do you set the breakpoint in the JS file? Do you see the script execute?
February 8, 2006 at 8:58 am #246321
David NaasMemberNo The code in the js file does not single step through the code. I get a gray window that has the following message in red “Source not found for FactoryClass() ClassFactory.js [Line: 73]” yet the code and variables are shown in the variables window.
here is a snipit of the ClassFactory.js
function FactoryClass()
{
this.previousItemName = “”;
this.col = new CollectionClass();//items is an array seperated list items “test^data1”, “test,data2” ….
this.Parse = function(items, delimiter, type)
{
var keyIndex = 0;
var dataIndex = 1;
var itemKey = 2;if ((typeof(items) == “undefined”) || (items.length < 1))
{
return false;
}for(var i= 0; i< items.length; i++)
{
var segments = items[i].split(delimiter);
segmentCount = segments.lengthvar o; //used as default Object
if (segments[keyIndex] != this.previousItemName)
{
this.previousItemName = segments[keyIndex];
o = new GenGroupClass();
o.Name = segments[keyIndex];
o.Type = type;
}
else
{
o = this.col.GetObject(segments[keyIndex]+ “_” + type);
}//if seagment count is 3 then a key is present we should then use genitems class to store the item
//else we will just stuff the string into the array.
if (segmentCount > 2)
{
o.Items.push(new GenItemsClass(segments[dataIndex], segments[itemKey]));
}
else
{
o.Items.push(segments[dataIndex]);
}this.col.Add(segments[keyIndex]+ “_” + type, o);
}
};this.ParseXml = function(xmlDoc)
{
//future functionality
};this.GetObjectsByType = function (type)
{
var collection = this.col.GetCollection();
var resultSet = new Array();for (var i = 0; i < collection.length; i++)
{
if (collection[i].Type == type)
{
resultSet.push(collection[i]);
}
}
return resultSet;
};this.GetParentLevelNames = function (type, sort)
{
var parentNames = new Array();
var results = this.GetObjectsByType(type);for (var i = 0; i <results.length; i++)
{
parentNames.push(results[i].Name);
}if (sort > 0)
{
parentNames.sort();
}return parentNames;
};this.GetChildItems = function (parentName, sort)
{
if ((typeof(parentName) == “undefined”) || (parentName.length < 1))
{
return;
}var results = this.GetObjectsByType(type);
var items;for (var i = 0; i <results.length; i++)
{
if(results[i].Name == parentName)
{
items = results[i].Items;
}
}if (sort > 0)
{
items.sort();
}return items;
};February 8, 2006 at 9:41 am #246328
David NaasMemberHey I just got it fixed the Class name has to match the file name and it works correctly, kind of like ActionScript
-
AuthorPosts
