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.

    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?

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,221 views
            0 likes
            Last Post xiinteractive  
            Started by andrewtrades, Today, 04:57 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            6 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            437 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            9 views
            0 likes
            Last Post FAQtrader  
            Working...
            X