DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

25
kicks
published 7 months, 5 days ago, submitted by bradygaster bradygaster 7 months, 5 days ago

weblogs.asp.net — If you are like me and you've read the many articles about how to get other javascript libraries to work in VS2008, you'll know that all you really need to do is install the visual studio HOTFIX. This patches your VS and among other things, gets the javascript intellisense working nicely.

Add a comment 2 comments | category: | Views: 40 | Get KickIt image code
tags: , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
Does anyone know the technical reason for why you need to provide a ton of metadata for systems like jquery before intellisense will function? Did the VS2008 team just write too basic an implementation? There have been about four articles on DNK so far that explain different workarounds for intellisense and documentation strings, but I don't think anyone has pinpointed the problem. I understand the challenges with documentation strings, just not why intellisense needs so much additional help.
posted by jesse 7 months, 4 days ago
JavaScript is a typeless language that is super flexible, and there is often no way to determine API shapes without executing/evaluating the actual code of the API. The VS 2008 intellisense engine actually executes the JavaScript library at parse time to get a good idea of what the shape looks like. That is why you get basic intellisense with JQuery, Prototype and other libraries without doing anything.

However, for cases where you are dynamically chaining methods together with dynamic objects/methods it is often impossible to infer how the code will evaluate without additional metadata. Both VS 2008 and Aptana (the other popular JavaScript intellisense tool) have this issue. That is why they both use intellisense friendly versions of the JavaScript libraries that have additional metadata comments for tools to use to provide extra code hints and better code completion.

The above article shows a cool trick where you can reference both the real JQuery as well as the meta-data version (within a placeholder control that will hide it at runtime) and get full intellisense for the library at design-time while using the trimmed down version at runtime.

Hope this helps,

Scott
posted by scott 7 months, 4 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge