Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddOn constructor question

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

    AddOn constructor question

    I tried putting a do-nothing constructor in my AddOn, and it appears to prevent the AddOn from running. What's up with that?
    Code:
            VsaMenu() : base()
            {
            }
    Other questions, related to multiple cooperating AddOns:
    • Is there any way to control the order AddOns are created?
    • Is it guaranteed that all AddOns will be constructed before any other calls are made to any AddOn?
    • I have an AddOn that needs to set a static pointer to itself so that related AddOns can call it. The pointer needs to be set before any of the related AddOns has its OnWindowCreated() method called. When should it set that pointer?
    • Is there a better way for cooperating AddOns to find the first AddOn's instance so they can call it?
    • Do separate AddOns run in separate threads? If I have AddOns calling each other, does the code need to be threadsafe?

    The basic question is how multiple AddOns can cooperate. In my case I presently have two AddOns that depend on a third AddOn. They need it to be operational before they make calls on it. I'd rather stay with whatever NT support there is, but if there is no adequate support I can work around that. I just need to know.

    --EV
    Last edited by ETFVoyageur; 08-16-2015, 07:58 PM.

    #2
    Hello ETFVoyageur,

    Thank you for your patience.

    We will review these items and follow up with information.

    Comment


      #3
      Hello PatrickH,

      something new ? It will be very instructive to read the answers.

      Thanks.

      Comment


        #4
        Addons do not have a dependable start sequence. However to solve your scenario I would suggest you look into the 'Singleton' c# pattern.

        This will allow you to make sure that any 'critical' resources are created on the first call to that resource. This way the start order does not matter.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X