Forum
15:36
10/08/2009
First of all I want answer Tom posted in /blog/feature-request/vsdoc-possibilities about importance of “-vsdoc.js” files. A lot of people misunderstand the role of “-vsdoc.js” files. Then I describe what a real problem with IntelliSense in jqGrid is and write my suggestion to fix the problem.
Visual Studio 2008 has built-in support for JavaScript IntelliSense. See http://weblogs.asp.net/scottgu.....sense.aspx and http://blogs.msdn.com/webdevto.....orcas.aspx for example. So there is also support of IntelliSense for jqGrid. Using “-vsdoc.js” or “.debug.js” files are important mostly for released (minimized) version of js scripts.
Scott Guthrie in
http://weblogs.asp.net/scottgu.....-2008.aspx
describes what should be done to have more IntelliSense in Visual Studio 2008 with respect of vsdoc.js files. By the way, if you download jquery-1.3.2-vsdoc.js from http://code.google.com/p/jquer.....-vsdoc2.js don’t forget rename it from jquery-1.3.2-vsdoc2.js to jquery-1.3.2-vsdoc.js.
The most important thing during support of -vsdoc.js is installation of KB958502. But IntelliSense works in Visual Studio 2008 without the patch also, if you start a JS-file with the lines
/// <reference path='~/Scripts/jquery-1.3.2-vsdoc.js'/>
Instead of
/// <reference path='~/Scripts/jquery-1.3.2.js'/>
After installation of KB958502 and adding jquery-1.3.2-vsdoc.js to your Visual Studio project, you can see
and
If one want to see more information about function’s parameters like
one needs write comment inside the jqGrid functions. The format of comments is described, for example, in http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx by Bertrand Le Roy. This XML comments are very close to XML Documentation Comments described in http://msdn.microsoft.com/en-us/library/b2s063f7.aspx. Bertrand Le Roy wrote a tool http://www.codeplex.com/ajaxdoc I find not a real solution of the problem.
I find out another solution which I want to suggest Tony to include in one next version of jqGrid.
If we change the lines 63 and 64 of jqModal.js, which currently looks like
i=$('<iframe src=”javascript:false;document.write(\'\');” class=”jqm”></iframe>').css({opacity:0}),
e=function(h){if(ie6)if(h.o)h.o.html('<p style=”width:100%;height:100%”/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
to
e = function(h) {
if (ie6) {
var i=$('<iframe src=”javascript:false;document.write(\'\');” class=”jqm”></iframe>').css({opacity:0});
if (h.o)
h.o.html('<p style=”width:100%;height:100%”/>').prepend(i);
else if (!$('iframe.jqm', h.w)[0])
h.w.prepend(i);
f(h);
}
},
(we move definition of “i” inside of e = function(h)). Such change has sense because variable “i” will be used only if ie6 is true. Moreover, after the change of jqModal.js IntelliSense works perfectly in Visual Studio 2008 with all jqGrid files! It’s exactly what we all wants.
Best regards
Oleg
04:48
Moderators
30/10/2007
Hello,
Thanks. Fixed in GitHub.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
85 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66