I want to add some custom buttons to the maintenance toolbar in the maintenance form


I want to add some custom buttons to the maintenance toolbar in the...
Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Trent L. Taylor (09/24/2008)
This would have to be a sublass to call the base like this.  If you are within a form and wanting to call the base.MemberName of a method on the form from which you are inherited it would work fine.  However, if you are on a form and want to call the base for a button on the form, that would not work.  All base methods (unless exclicitly exposed) will be protected

If I understand you correctly, this would be a consequence of the fact that .NET does not implement a strong containership model. Or am I on Mars Tongue ?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This would have to be a sublass to call the base like this.  If you are within a form and wanting to call the base.MemberName of a method on the form from which you are inherited it would work fine.  However, if you are on a form and want to call the base for a button on the form, that would not work.  All base methods (unless exclicitly exposed) will be protected which would prevent you from doing this...so you would have to subclass in this case.

I may not be entirley sure of what you are trying to accomplish, but in regards to inheritance and calling a base member, this is how encapsulation and .NET are designed...as they should be.  VFP was really bad about enforcing encapsulation...we like to refer to VFP as "decapsulated" BigGrin  When we go back and look at old code we always laugh at what we had done...now being "pure and clean" Tongue

Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Trent L. Taylor (09/22/2008)
Well, if you want to control the event order then you will want to subclass the item and the override the ItemClicked.  In this case you would call base.MemberName.

base.MemberName

You will want to do this when overriding an On method so that you can control whether your code is executed before or after other event handlers. 

Do I have to subclass the item? Can't I just put this code in the form instance?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, if you want to control the event order then you will want to subclass the item and the override the ItemClicked.  In this case you would call base.MemberName.

base.MemberName

You will want to do this when overriding an On method so that you can control whether your code is executed before or after other event handlers. 

Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Well, here I am talking to myself again Tongue I tried the obvious and created an event handler for the toolbar's ItemClicked event and it worked. The thing that I was concerned about was if there was code up the inheritance hierarchy, I did not want to over-ride it. However, I tried to step into it, and apparently there was no code up the hierarchy. So I am curious, where is the magic code that handles when the add, edit and other buttons in the toolbar are clicked.

Also, in VFP I know that I can call up the inheritance hierarchy by using DODEFAULT(). What is the equivalent was to do this in C#?

Thanks

Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi All?

This one should be fairly straight-forward Smile

Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search