Results 1 to 2 of 2

Thread: withevents on array, how??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210

    withevents on array, how??

    ok, i can't have an array withevents, but it should be some way to do that.

    Any help?

    How can i use collection capturing the events??
    My application is based on the events of each object, and the objects are loaded dinamicaly, so it is impossible to do each one separated.

    Thank you,
    Guilherme Costa

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You will need to build a collection for each type of object that will raise events unless the objects all share some form of commonality (interfaces/base class). Everytime an item is added you can use AddHandler to catch an event for that object and make it fire a method with the same signature as the event. Likewise use RemoveHandler when the item is removed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width