I've dug around on the net for the best solution to this.. so far without much luck.
I have a form, with a listview control on it. From another class, when a variable (arraylist) gets updated (arraylist.add), the next line needs to be code that will add the last value to the listview control on the form (from this class object).
So for now I've simply added a Public method to the form itself. IE: Public void UpdateListControl.
To get at that method from the class i'm casting a Form object.
I'm not convinced this is the best way to do this.. ie: My understanding of Forms and business logic, was to always add as little extra code to the Form (code) , keeping it streamlined.
Is there another way of doing this?
This other class object that needs to update the form control is also part of a new thread which is created at some point, so passing form controls via a parameter has been avoided as a result.
Thanks
I have a form, with a listview control on it. From another class, when a variable (arraylist) gets updated (arraylist.add), the next line needs to be code that will add the last value to the listview control on the form (from this class object).
So for now I've simply added a Public method to the form itself. IE: Public void UpdateListControl.
To get at that method from the class i'm casting a Form object.
I'm not convinced this is the best way to do this.. ie: My understanding of Forms and business logic, was to always add as little extra code to the Form (code) , keeping it streamlined.
Is there another way of doing this?
This other class object that needs to update the form control is also part of a new thread which is created at some point, so passing form controls via a parameter has been avoided as a result.
Thanks