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 Stanfillirenfro, Yesterday, 09:19 AM
      7 responses
      51 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by TraderCro, 04-12-2024, 11:36 AM
      4 responses
      69 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Mindset, Yesterday, 02:04 AM
      1 response
      15 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by agclub, 04-21-2024, 08:57 PM
      4 responses
      18 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Irukandji, Today, 04:58 AM
      0 responses
      6 views
      0 likes
      Last Post Irukandji  
      Working...
      X