Aller au contenu

Photo

How do I jump to a function definition in the toolset?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
fro7k

fro7k
  • Members
  • 372 messages
I'm reading script source in the toolset and to the right there's a window with a large list of functions, and an ability to filter them.  Double-clicking them doesn't take me to the function definition as I intuitively expected, rather, I think it tries to insert a call to the function in the source, and appropriately tells me that the source is read-only.  How do I go to a function's definition once i know the name of it?

#2
Augerman

Augerman
  • Members
  • 38 messages
You need to have the Help window opened. View>Other Windows>Help




#3
TimelordDC

TimelordDC
  • Members
  • 923 messages
Enable the Help Window. I don't have the toolset here so don't know the exact name but I think it is under View menu -> other windows (or something like that).

The function description appears in that window.

#4
fro7k

fro7k
  • Members
  • 372 messages
That's not a definition though, in the programming sense. I mean seeing the actual code of the function.

#5
fro7k

fro7k
  • Members
  • 372 messages
I assume these are script functions and not hard-coded.

#6
Challseus

Challseus
  • Members
  • 1 032 messages
You have to have the function written in the script editor somewhere. I usually just double click the function while on an editable script. Then, right click the selected function, and select "Go To Definition". If the function is implemented anywhere but the engine, you will be taken to the appropriate file and implementation. If it's an engine function (i.e. GetHero()), then you'll just see it popup in the help window.

Modifié par Challseus, 11 décembre 2009 - 08:05 .


#7
fro7k

fro7k
  • Members
  • 372 messages
Heh, I already thought of that method (although I assumed it wouldn't allow me to even type into a read-only file) so I didn't try it, and it's a rather ropey way of doing it.