Hi there.
I have a program with many plugins which will be loaded with Regfree.
I need to be able to recive events from any plugin and that any plugin can receive events.
Like the Addeventlistener de Javascript.
If it can be without using subclasses or hook, there are many plugins and I would not like to have so many subclasses.
Here an example.
I'm sorry, i use translator
Greetings thanks
I have a program with many plugins which will be loaded with Regfree.
I need to be able to recive events from any plugin and that any plugin can receive events.
Like the Addeventlistener de Javascript.
If it can be without using subclasses or hook, there are many plugins and I would not like to have so many subclasses.
Here an example.
Code:
'''''''''pluginManager
Dim plugins As Collection 'Here I have a collection with all the charged plugins
Public Sub SendEvent(name As String)
End Sub
Public Function RegistrerEvent(name As String)
'I do not know which is the best way to record the events
'keeping in a collection and tour the collection every time there is an event
End Function
'''''''''
''''''''plugin1
Dim pm As pluginManager 'In each plugin there is a Plugin Manager object
Public Sub ReciveEvent(name As String)
If name = "UPDATE" Then
MsgBox ""
End If
End Sub
Private Sub Class_Initialize()
pm.RegistrerEvent "UPDATE"
End Sub
''''''''plugin2
Public Sub test()
pm.SendEvent "UPDATE"
End Sub
''''''''
I'm sorry, i use translator
Greetings thanks