No intellisense for anything in there (bummer), which was the question at the top of this post...... but the real disappointing part is now that line "breaks" intellisense working in both "common.js" and "greybox.js"
If i go to the masterpage and remove the ".." from the src tag for jquery-1.2.1.min.js and give studio's compiler a little time to catch up, then intellisense starts working again for "greybox" and "common"...
ideas? workarounds? thoughts?
"If you make it idiot proof, they'll build a better idiot"
There is probably something in the jquery-1.2.1.min.js file that causes VS intellisense engine to throw an exception and hence intellisense disappears in all attached files. I presume you are using
http://jquery.com/, right?
At DevConnections i heard jQuery briefly, so brief that i missed it, mentioned during talk of improved Javascript Intellisense... perhaps it was to say "won't work", heh heh
But was hoping someone could deny or confirm that
"If you make it idiot proof, they'll build a better idiot"
Not every possible file works since if there an error in the file, jscript intellisense engine may throw an exception. When I attach the file in question, Error List displays
Warning 1 Error updating JScript IntelliSense: Client-side script IntelliSense information was not generated due to an error in an external script reference.
Which goes away if I delete (); at the end of the js file. We will investigate the issue though - not sure if this is a bug.
No matter where i was in the project, whether it was "/default.aspx" or "/Sections/Reports/Internal/default.aspx", that js file would load properly since it's told to "start at the root of the site"....
But when i use src="/____" in VS2008, Intellisense doesn't work (i'm assuming because the ide wants to look "inside out" rather than "outside in" if that makes sense)
So if i change it to src="../_____", Intellisense works on "/default.aspx"
and also on "/Sections/Reports/Internal/default.aspx"
But if i actually pull up "/Sections/Reports/Internal/default.aspx" in a browser..... 404 error for "code.js" (and looking in the source code, it's exactly right as it is taking the script src value of "../common/code.js" and looking in "/Sections/Reports/common/code.js",
which obviously doesn't exist)
What's the solution here?
Do I just have to live without the so much "improved intellisense" that MS has been touting all year? I do a ton of javascript/ajax programming and this feature was the main draw for me to move to the new IDE
"If you make it idiot proof, they'll build a better idiot"
This is something many people are looking for. It would be awsome to be able to use the js intellisene, but it's broken with jQuery, my favourite js lib. Hope this can be fixed...
and what is sucking is that it *seems* that say you have 4 external JS files defined..... if VS cannot pickup intellisense from one, then anything after it will also not get picked up.... considering frameworks like jQuery need to go first, it really
kills off this much anticipated, much talked about feature :-(
"If you make it idiot proof, they'll build a better idiot"
I can't suggest a good workaround. I think deleting trailing (); in the js file helps, but it may not be a good workaround since you'll have to remember to restore it before publishing. The issue will be fixed in the service pack.
MorningZ
Star
8849 Points
1822 Posts
Intellisense for frameworks like jQuery (plus failing behavior)
Dec 05, 2007 10:07 PM|LINK
Just curious at why studio doesn't pick up intellisense for libraries like jQuery?
Also i am noticing something kinda horked.....
In my master page i had (in VS2005, now working in '08) (it's located in a subfolder called "Design")
I noticed that when in aspx files using this master page that i wasn't getting intelliense for my "common.js" file
So instead of using the virtual root, i changed the path to be relative to the masterpage, a la:
Bam... my functions now are "lit up" in the test aspx page's script block i have in the header
I still had no intellisense for "greybox.js", so did the same change:
And again, intellisense was working for events/variables in "greybox.js"
So backed up one more and changed the jQuery include to be, hoping it would work:
No intellisense for anything in there (bummer), which was the question at the top of this post...... but the real disappointing part is now that line "breaks" intellisense working in both "common.js" and "greybox.js"
If i go to the masterpage and remove the ".." from the src tag for jquery-1.2.1.min.js and give studio's compiler a little time to catch up, then intellisense starts working again for "greybox" and "common"...
ideas? workarounds? thoughts?
Mikhail Arkh...
All-Star
33139 Points
6083 Posts
Microsoft
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 06, 2007 12:35 AM|LINK
There is probably something in the jquery-1.2.1.min.js file that causes VS intellisense engine to throw an exception and hence intellisense disappears in all attached files. I presume you are using http://jquery.com/, right?
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
MorningZ
Star
8849 Points
1822 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 06, 2007 01:06 AM|LINK
indeed.....
At DevConnections i heard jQuery briefly, so brief that i missed it, mentioned during talk of improved Javascript Intellisense... perhaps it was to say "won't work", heh heh
But was hoping someone could deny or confirm that
Mikhail Arkh...
All-Star
33139 Points
6083 Posts
Microsoft
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 06, 2007 02:13 AM|LINK
Not every possible file works since if there an error in the file, jscript intellisense engine may throw an exception. When I attach the file in question, Error List displays
Warning 1 Error updating JScript IntelliSense: Client-side script IntelliSense information was not generated due to an error in an external script reference.
Which goes away if I delete (); at the end of the js file. We will investigate the issue though - not sure if this is a bug.
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
MorningZ
Star
8849 Points
1822 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 06, 2007 02:48 PM|LINK
Mikhail....
Thanks for the help so far..... I could live without some JS not working with Intellisense, it would just be a nice "to have"
So back to the situation above...
My project is laid out like so (folders in bold):
- App_Code
- SomeCode1.vb
- SomeCode2.vb
- etc
- App_Data
- Bin
- foo.dll
- bar.dll
- etc
- Common
- code.js
- etc
- Design
- MainMaster.master
- Sections
- Reports
- default.aspx
- Internal
- default.aspx
- Links
- default.aspx
- etc etc
- default.aspx
- login.aspx
In my MasterPage as mentioned above, before when i was working in VS2005, i had this:
<script language="javascript" type="text/javascript" src="/common/code.js"></script>
No matter where i was in the project, whether it was "/default.aspx" or "/Sections/Reports/Internal/default.aspx", that js file would load properly since it's told to "start at the root of the site"....
But when i use src="/____" in VS2008, Intellisense doesn't work (i'm assuming because the ide wants to look "inside out" rather than "outside in" if that makes sense)
So if i change it to src="../_____", Intellisense works on "/default.aspx" and also on "/Sections/Reports/Internal/default.aspx"
But if i actually pull up "/Sections/Reports/Internal/default.aspx" in a browser..... 404 error for "code.js" (and looking in the source code, it's exactly right as it is taking the script src value of "../common/code.js" and looking in "/Sections/Reports/common/code.js", which obviously doesn't exist)
What's the solution here?
Do I just have to live without the so much "improved intellisense" that MS has been touting all year? I do a ton of javascript/ajax programming and this feature was the main draw for me to move to the new IDE
xlogic
Member
4 Points
2 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 24, 2007 12:14 AM|LINK
This is something many people are looking for. It would be awsome to be able to use the js intellisene, but it's broken with jQuery, my favourite js lib. Hope this can be fixed...
MorningZ
Star
8849 Points
1822 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Dec 24, 2007 12:34 AM|LINK
For sure...
and what is sucking is that it *seems* that say you have 4 external JS files defined..... if VS cannot pickup intellisense from one, then anything after it will also not get picked up.... considering frameworks like jQuery need to go first, it really kills off this much anticipated, much talked about feature :-(
MikeBosch
Member
617 Points
127 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Jan 03, 2008 09:42 PM|LINK
Any update on this? I am trying to use jquery intellisense...
http://weblogs.asp.net/mikebosch
*** Please MARK this post as ANSWERED, if you find it helpful) ***
xlogic
Member
4 Points
2 Posts
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Jan 04, 2008 10:17 AM|LINK
Mikhail Arkh...
All-Star
33139 Points
6083 Posts
Microsoft
Re: Intellisense for frameworks like jQuery (plus failing behavior)
Jan 04, 2008 02:54 PM|LINK
I can't suggest a good workaround. I think deleting trailing (); in the js file helps, but it may not be a good workaround since you'll have to remember to restore it before publishing. The issue will be fixed in the service pack.
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.