This project is read-only.

Subscribing to ObjectList Events VB.NET

Sep 15, 2011 at 10: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, 

Steve

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
     _data.NotesList(0).Delete()
End Sub
Private Sub NoteRemoved(o as Object, e as Widgetsphere.Core.EventArgs.BusinessObjectEventArgs)
     Debug.Print(Ctype(e.BusinessObject, Notes).Message)
End Sub