Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multicasting inheritance
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00417460
Message ID:
00417505
Vues:
18
>Rather than setting the connection on the GotFocus, why not set it in the Form_Load? This way, it gets set just once.

If I did that I would need to initialize an object for each text box, some 2 dozen in this case. Here I have just initialized one object and then change the object's TextBox and ActiveControl property to reference the current text box via the GotFocus.

As you can see I just added the multicasting properties to my exixting business object (BO) which I initialize with the form. I like the idea of managing all the text box behaviours through the BO. I wonder if this behaviour will still work if I change the UI to ASP.

>Remember, if you have any code in the individual text boxes, that code will fire, followed by the class module code.

Yes, I saw that. It is cool how this works. Of course it is easy to prevent DODEFAULT from firing by doing something like this:
Private Sub Address1_Validate(Cancel As Boolean)
   ' Process custom validation here.
   oBusObject.NoDefault = True
End Sub
And then set it back to False after bypassing the Validate code in oBusObject.

> I believe that this sort of technique accomodates about 80% of the needs for inheritance I see out there.

I would not quite say 80%. Well maybe for controls on a form, but in a typical MDI app that supports inheritance I would see myself going down 3 or 4 levels on a typical form

BasicForm -> DataForm -> DataPageForm -> frmFinal
George
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform