Select to view content in your preferred language

Code Assist plugin for VS

583
2
Jump to solution
05-09-2014 03:18 AM
SimonHodge
Deactivated User
Hi,

I'm developing using Visual Studio 2012 and just followed the instructions  here to setup the code assist plugin.  I have downloaded the latest version which is 3.8, put it in my project and linked to it using a script tag on the page, e.g.

<script type="text/javascript" src="path_to_the_code_assist_document"></script>

However, I've got the following issues:

1. It doesn't seem to work.  I've got the following code:

var map = new Map("map", {                 basemap: "topo",                 center: [0, 0]             });


I was expecting to then be able to type "map." and the intellisense show me the various properties and methods of the Map object, but it doesn't.

2. The page now tries to load the jsapi_vsdoc12_v38.js file in the live environment unless I manually take out the script element referencing it, which on multiple pages is going to be a pain.  It's over 0.5MB so I don't really want it loaded by each visitor.  Does anyone have an idea to resolve this?

3.  There appears to be at least one error in the file.  When I open the page I've referenced it from on my machine, which does then load it, it complains that the 'true' keyword on line 5188 can't be used as a parameter:

setFolderVisibility: function (folder,true) {


I surely can't be the first person to have found these issues though, so hopefully someone out there has an idea or two!?

Thanks
Simon
0 Kudos
1 Solution

Accepted Solutions
SimonHodge
Deactivated User
I have found a solution to this (thanks to someone on StackOverflow).  Details here in case anyone else comes up against this issue:

http://stackoverflow.com/questions/23564117/design-time-only-javascript-in-visual-studio?noredirect=...

View solution in original post

0 Kudos
2 Replies
SimonHodge
Deactivated User
I've just discovered that if I use the full name space then intellisense does work, i.e.

var map = esri.Map(...)

Typeing "map." does then provide the correct intellisense so this is good.  The only question therefore is, what is the best way to get rid of the script tags when deploying to the live environment (other than manually removing them).

Thanks
Simon
0 Kudos
SimonHodge
Deactivated User
I have found a solution to this (thanks to someone on StackOverflow).  Details here in case anyone else comes up against this issue:

http://stackoverflow.com/questions/23564117/design-time-only-javascript-in-visual-studio?noredirect=...
0 Kudos