Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTWindow Issue

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

    NTWindow Issue

    I'm having trouble identifying my NTWindow after recompiling code. I've attached a sample add on to show the issue. I've created a custom NTWindow of type MyNTWindow. When the window is created using the menu item I've added, the OnWindowCreated() method will successfully identify the window as a MyNTWindow object. However, if I recompile the code with the window opened, NT shows that the window is being destroyed and recreated, but it is not identifying it as a MyNTWindow object when it is being recreated. Am I missing step here?
    Attached Files

    #2
    Hello SystemTrading,

    The window in your script is being created when the button is clicked.

    The Addon itself is reloaded when a compile happens as this is required for any changes to the menu.

    If the button isn't clicked, a new window is created and that variable isn't set to anything.

    You could give you window a resource name and then find it by resource.

    However, why are you attempting to find the existing window in the OnWindowCreated() method?

    Any handlers assigned to buttons or any code running in the window will still be running and will still work even if the script does not have the existing window object saved to a variable.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Something is not working in my program after I recompile. My first instinct was that it was related to the recreation of the window, so I am really just trying to do some debugging.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by chbruno, Today, 04:10 PM
      0 responses
      3 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      6 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frslvr, 04-11-2024, 07:26 AM
      9 responses
      127 views
      1 like
      Last Post caryc123  
      Working...
      X