• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where are the context pop-ups for user defined methods?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Where are the context pop-ups for user defined methods?

    When I'm working in the NinjaScript editor, I like the way that whenever I type a method name or hover my mouse over a variable, a little box pops up to help me understand the method overloads or variable type.

    When I write a custom indicator, and refer to it from another indicator, information about the parameters pops up for my custom indicator. That's nice too.

    So why is it, if I have a bunch of custom classes and methods in a UserDefinedMethods strategy, I get no pop-up help at all when I'm editing another strategy that needs to reference that stuff? I get those helpful pop-ups only when I'm editing my user defined methods file, not when I'm editing something that needs to refer to it. I'm even putting the standard C# summary comments above each one, to no avail. I know my UserDefinedMethods is visible, because everything compiles OK.

    -Alex
    Last edited by anachronist; 05-14-2012, 04:07 PM.

    #2
    Alex, so you can compile well and access the UserDefined Strategy method, but just miss the Intellisense help?

    If you type this. in your strategy, would it then pop up allow you to select the user defined public method coming from the partial class?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      The methods are all in custom classes. In my strategy I have
      Code:
      protected override void Initialize() {
          BAtm atm = new BAtm(this);
      }
      Class BAtm is a public class inside my UserDefinedMethods file.

      Within class BAtm there are several public methods. While editing the UserDefinedMethods file, the Intellisense help works just fine. While editing my strategy, it doesn't matter if I access those methods using atm.MethodName() or this.atm.MethodName(), no Intellisense help pops up. But everything compiles just fine, and I can step through my code with Visual Studio and see that the methods are indeed executed.

      -Alex

      Comment


        #4
        Alex, it could be that the custom class is preventing proper Intellisense access here, if you just try this public method returning a bool in the partial strategy class in UserDefinedMethods, would you be able to see the Intellisense then for it as expected?

        public bool PermToTrade()
        {
        if (ToTime(Time[0]) >= 100000 && ToTime(Time[0]) <= 154500)
        return true;

        else return false;

        }
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Yup, that works. Looks like the custom public class is preventing intellisense from working. I even appended :Strategy to the class declaration but that didn't help.

          Funny thing is, I could swear that it was working a couple months ago.
          -Alex

          Comment


            #6
            Originally posted by anachronist View Post

            Funny thing is, I could swear that it was working a couple months ago.
            -Alex
            Alex,

            I have a complex custom class. For some reason, to get the intellisense working with NT7, I need to keep the class files open in the editor. Doesn't work when the class is not open in the editor.

            Not sure why, would love to know. But it is a work-around.

            Comment


              #7
              NJA_MC: Your experience differs from mine. I have multiple editor windows open. I get the Intellisense help for stuff in my custom class only when I'm actually working in the editor window for that custom class. In any other editor window, I don't get Intellisense help for my custom class.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Audiofail, Today, 05:40 AM
              6 responses
              18 views
              0 likes
              Last Post willwin
              by willwin
               
              Started by jerblaster23, Today, 03:42 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by brian meade, Today, 01:39 PM
              2 responses
              10 views
              0 likes
              Last Post brian meade  
              Started by Johnny Santiago, Today, 12:20 PM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by NinjaTrader_Brandon, Today, 10:24 AM
              0 responses
              67 views
              0 likes
              Last Post NinjaTrader_Brandon  
              Working...
              X