Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How to loop through all Properties
Collapse
X
-
Originally posted by Zeos6 View PostYou can do this (loop through your properties) by implementing the ICustomTypeDescriptor interface and then using GetProperties().
Bryan
Leave a comment:
-
Originally posted by NinjaTrader_AdamP View Postcass,
Here is some more information on get and set : http://msdn.microsoft.com/en-us/library/w86s7x04.aspx
Thanks!
Leave a comment:
-
cass,
Here is some more information on get and set : http://msdn.microsoft.com/en-us/library/w86s7x04.aspx
Leave a comment:
-
Originally posted by NinjaTrader_AdamP View Postcassb,
This would be a C# feature unfortunately. Get/Set are both parts of C#.
Is there a FieldExit event or something I can use to do this?
Leave a comment:
-
cassb,
This would be a C# feature unfortunately. Get/Set are both parts of C#.
Leave a comment:
-
OK, thanks Adam!
I have a related question then... you'll notice that if you click on a parameter value and change it to something different and then hit Tab or Return, then the get/set accessors are called. However, if you click on a parameter value and change it to the same value it already was, then the get/set is not called. I have some code in the 'set' that I want called regardless of whether you changed the parameter value or not, as long as you clicked on it. Is this a NT limitation or a C# feature?
Thanks!
Bryan
Edit: Wait... maybe the "get" is called when you first access the parameter field? I could put my code into that instead of "set"... I'll try that first.
Leave a comment:
-
cass,
Unfortunately there is no way to do this via supported methods as these are separate variables, not arrays or lists.
You may find this useful however : http://en.wikipedia.org/wiki/Reflect...er_programming)
And this : http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
Leave a comment:
-
How to loop through all Properties
Can you tell me what the internal structure is so I can write a For loop to go through all my public properties that are defined in the Properties region?
Thanks!
BryanTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bmartz, Today, 09:30 AM
|
2 responses
11 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
4 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM |
Leave a comment: