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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
        24 responses
        74 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by businessman1929, 04-29-2024, 01:28 PM
        3 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by mintos, 04-02-2024, 08:22 PM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Creamers, 04-27-2024, 05:32 AM
        13 responses
        74 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by tradebot, Yesterday, 01:25 PM
        4 responses
        19 views
        0 likes
        Last Post tradebot  
        Working...
        X