Modules and Events

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Jan 4, 2009.

  1. Cableguy

    Cableguy Expert Licensed User

    HI, trying to keep a "clean house", i created several modules in my app...
    One of wich is in charge of initializing and setting Objects....
    These Objects are ALL used in others forms...
    How can I use an event in a module were the Object was NOT created?
     
  2. agraham

    agraham Expert Licensed User

    Use AddEvent?
     
  3. Cableguy

    Cableguy Expert Licensed User

    As a workaround I'm "delegating" the event from the dolule who "Owns" the object and call a sub on the module I wish to trigger...
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    As agraham wrote you can use AddEvent to use a sub in a different module as the event sub.
     
  5. Cableguy

    Cableguy Expert Licensed User

    That would sometime be troubling as if we only have "Working" Subs and no 2initialization" Sub, the addevent keyword will error out...
    I will post this in wish list...The possability of turning an event "Public"..
     
  6. agraham

    agraham Expert Licensed User

    You can put initialisation code in Globals in each module - works quite well for me. As far as I know there is no limitation on what you can do there.
    Why? :confused:
     
  7. Cableguy

    Cableguy Expert Licensed User

    You would be adding an event that had already benn added...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice