- Jun 6, 2020
- 11,593
- 4,507
When creating an object that raises an event, is it possible to automatically address the caller module?
In the following example, the testobject object raises an event: in the Initialize sub, I used Me to specify the current module.
Is there another way to do it, so the Initialize sub can have only the "event" parameter and not the callback one, since it will always be "Me"?
It should be possible, since the Serial library object has only "eventname" in the Initialize sub.
Main:
testobject:
In the following example, the testobject object raises an event: in the Initialize sub, I used Me to specify the current module.
Is there another way to do it, so the Initialize sub can have only the "event" parameter and not the callback one, since it will always be "Me"?
It should be possible, since the Serial library object has only "eventname" in the Initialize sub.
Main:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
testobject:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید