Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddOn class -- how to get workspace persistence for menu & property values

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

    AddOn class -- how to get workspace persistence for menu & property values

    The AddOn examples show adding menu entries to the Control Center. My AddOn does that. My AddOn class:
    • Creates a menu entry on the Tools menu, and sub-menu entries from there. Some of the leaf-node menu entries are checked menu items.
    • Provides some properties used to coordinate with indicators of mine.

    How can I get the state of these things saved/restored along with the workspace? ( I have looked at the IWorkspacePersistence interface, but that appears to only be used for NTWindows classes, not AddOn classes.)

    If another example is needed, suppose the AddOn's menu entry posts a configuration dialog. There needs to be a way to save the result of that configuration when the workspace is saved.

    --EV
    Last edited by ETFVoyageur; 08-20-2015, 09:22 PM.

    #2
    ETF,

    Unfortunately this slipped past us, apologies. Did you still need an answer on this? If so I will respond promptly. .

    Thank You.
    BrettNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Brett View Post
      Unfortunately this slipped past us, apologies. Did you still need an answer on this? If so I will respond promptly.
      Hey Brett, I would definitely be interested in seeing how to do this as well.. I've developed a couple add-ons now, and have a couple other ideas as well as a couple indy's that I'd probably like to create/convert to addons if I could ever figure out how to maintain/serialize variables for each/between windows..


      -=Edge=-
      NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

      Comment


        #4
        Sure,

        Its all driven by the window IWorkspacePersistance on a window. Will you be able to utilize IWorkspacePersistance on a NTWindow or will you need to do this outside of that context?
        BrettNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Brett View Post
          Its all driven by the window IWorkspacePersistance on a window. Will you be able to utilize IWorkspacePersistance on a NTWindow or will you need to do this outside of that context?
          I'm thinking I might need something outside of that context, but to be honest, I'm not real sure.. Let me try to give a very simple example that references ETF's original question.

          Attached is slightly modified sample script of something posted on another thread some time ago now. It does nothing more than add an NTMenuItem to the Control Center's New Menu. I've just added a single bool variable, and changed the click event to toggling the bool true/false along with setting the NTMenuItem's checked state according to the bool state. The problem is the bool state is not maintained/serialized between compiles, restarts, etc..

          Now this is an extremely simple example as it's only looking at one window, the control center.. But for all practical purposes, this same bool could be used for any/every window that is created (regardless of it's type), and I'm looking for a way to be able to maintain/serialize that variable's state for each/any/every NTWindow that it might be used on..


          Attached Files
          -=Edge=-
          NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

          Comment


            #6
            Thanks for posting and clarifying over skype. Looking into this and will get back at the latest tomorrow.
            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
            577 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