Subscribing to ObjectList Events VB.NET

Sep 15, 2011 at 9:09 PM

I seem to be having problems getting my eventhandler to fire when I Delete an item from an object list.

My question is; Is there something I am missing that is preventing this EventHandler from firing?


Thanks in advance, 


Here's a sample code snippet.

Private WithEvents _data as MyNhydrateObject
Public Sub New()
     _data = MyNhydrateObject.SelectByPrimaryKey(1)
     AddHandler _data.notesList.ObjectRemoved, NoteRemoved
     'This is the line that I expect to fire the handler
End Sub
Private Sub NoteRemoved(o as Object, e as Widgetsphere.Core.EventArgs.BusinessObjectEventArgs)
     Debug.Print(Ctype(e.BusinessObject, Notes).Message)
End Sub