AddHandler Question

The code here could not work :

[code]Public Sub FxButtonSaveAction(Page As WebDialog)
// this part I had referencing it wrongly, but I can’t think of a better way to do it.

Select Case Page.Name
Case “WebDialog1”
Dim d As MethodCaller
Dim w As New WebDialog1
d = AddressOf w.ButtonSave
d.Invoke
Case “WebDialog2”
’ Do the following…
End

End Sub[/code]

You cannot get the value of the TextField on one instance by recreating another.

Before going into convoluted module stuff, why don’t you start by creating simple things that work ?

[quote=309889:@Michel Bujardet]

Before going into convoluted module stuff, why don’t you start by creating simple things that work ?[/quote]

I am trying to a create a framework/webapp which does not need to replicate my codes. In event, if I need to make any modifications, I do not need to end up having to modify each individual pages.

If this is too sophisticated to be implemented, then I will have no choice but to revert to replicating my codes when I am creating a new WebDialog. Or maybe I should change to using Webpage instead of webdialog as I have no issue calling Webpage methods from a module (provided implicit instance is enabled in webpage).

I just being disappointed that what seems to be possibly implemented but I just can’t able to make it right. :frowning:

Anyway, I sincerely appreciate your precious time and effort taken to reply me in the forum.

Alvin, if I may, I think you are trying to do too much for your current level of comprehension of the tool. You are moving too fast.

Programming is mostly a matter of learning by doing.

Start by doing a project as proof of concept. You are trying to optimize the design before you grasp the very concepts that underline the notion of OOP.

It does not matter if you duplicate methods in a proof of concept. You will have plenty of time to optimize.