ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

TList<T>.ListChanged event not firing #433

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Build a new TList<T>.  
2.  Add an event handler to the ListChanged event
3.  Add a new T() to the list.  

What is the expected output? There is no ListChangedType.ItemAdded event fired. 
 What do you see instead?

What version of .netTiers (2.3.1) and CodeSmith (4.0) are you using?

Please provide any additional information below.

It appears to be related to a change in /Templates/Entities/ListBase.cst on 
line 224.  The override method:
224./// <summary>
225./// This override was needed due to how WPF was calling sort. It was 
causing a FatalExecutionEngineError because the inherited class was calling 
base.InsertItem and the BindingList was throwing the exception.
226./// </summary>
227./// <param name="index"></param>
228./// <param name="item"></param>
229.protected override void InsertItem(int index, T item)
230.{
231.this.Items.Insert(index, item);
232.}

Appears to be interfering with the individual item's ability to bubble events 
through to the list's event handler.  

Original issue reported on code.google.com by Avia...@gmail.com on 31 Jul 2013 at 8:14

GoogleCodeExporter commented 9 years ago
note:  See issue https://code.google.com/p/nettiers/issues/detail?id=367  

I removed the override method from the template.  Seems fine now.  

Original comment by Avia...@gmail.com on 31 Jul 2013 at 8:35