VS08 Beta 2: Javascript Intellisense

Hi,

I'm testing the new intellisense in vistal studio 2008 and have some question. please look at the sample below and the question that comes after it:

Main.htm

....

<script src='TaskManager.js'...>

<script src='Task.js'...>

...

<script>

function Start()

{

var taskM = newTaskManager();

taskM.AddTask('task1',alert());

taskM.RunTask ('task1');

}

</script>

...

TaskManager..js

///<reference path="Task.js" />

function TaskManager()
{
///<summary>An instance of TaskManager</summary>
var m_oTasks = {};
this.AddTask = function(taskName,sRunCode)
{
///<summary>Add tasks to the manager</summary>
///<param name="taskName" type="string">The name to give this task</param>
m_oTasks[taskName] = new Task();
m_oTasks[taskName].SetAction(sRunCode);
};

this.RunTask = function(taskName)
{
///<summary>Run a task</summary>
///<param name="taskName" type="string">The name to give this task</param>
m_oTasks[taskName].Run();
};
}

Task.js

function Task()
{
///<summary>An instance of Task</summary>
///<returns type="Task"/>
this.name = "asd";
var _action;
this.Run = function()
{
eval(_action);
};


this.SetAction=function(value)
{
///<summary>Set The action item</summary>
///<param name="value" type="string">the action value</param>
_action = value;
};
}

remarks:

  1. All question are to design time.
  2. I used an ASP.net Application with framework 3.5

Question:

  1. I can't see any public methods oftaskM (in main.htm).
  2. I see the Task object from TaskManager, how ever can't see it public members at all (same as 1).
  3. Lets say 1,2 was true - note the reference in the array. should I be able to see the members of this reference (m_oTasks[taskName].?).
  4. Is it possible to see object fromreferencedfile since this seem to be working when the script is on the same JS file.
  5. Should i code it differently to make it work or visual studio doesn't support this?

Thanks,

Tidhar

[3719 byte] By [tidharn] at [2008-1-8]

Visual Studio Orcas

Site Classified