Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
System setup and ctMenus
Message
From
18/09/2000 07:55:16
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
17/09/2000 12:10:11
Ed Gay
Computer Software Consultants
Bangor, Maine, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00417417
Message ID:
00417534
Views:
21
Ed,

You could do that, but you probably want to override the LoadChildren method in your aMenu class. Then create subclasses of all classes from there to FilePopup, replacing all pertinent classes in the LoadChildren method.

In this case:

1) Override aMenu.LoadChildren,

#DEFINE NUMCHILDREN 7
LOCAL laChildren[NUMCHILDREN,ALEN(this.aChildren,2)]

laChildren[1,CHILD_CLASS] = "Afilepad"
laChildren[1,CHILD_NAME] = "oFilePad"
laChildren[2,CHILD_CLASS] = "Ceditpad"
laChildren[2,CHILD_NAME] = "oEditPad"
laChildren[3,CHILD_CLASS] = "Cadministrationpad"
laChildren[3,CHILD_NAME] = "oAdministrationPad"
laChildren[4,CHILD_CLASS] = "Cnavigationpad"
laChildren[4,CHILD_NAME] = "oNavigationPad"
laChildren[5,CHILD_CLASS] = "Cutilitiespad"
laChildren[5,CHILD_NAME] = "oUtilitiesPad"
laChildren[6,CHILD_CLASS] = "Cwindowpad"
laChildren[6,CHILD_NAME] = "oWindowPad"
laChildren[7,CHILD_CLASS] = "Chelppad"
laChildren[7,CHILD_NAME] = "oHelpPad"

DIMENSION this.aChildren[NUMCHILDREN,ALEN(laChildren,2)]
=ACOPY(laChildren,this.aChildren)

RETURN NUMCHILDREN

2) Subclass CFilePad as AFilePad
3) Subclass CFilePopUp as AFilePopup. AFilePopup.LoadChildren is:

#DEFINE NUMCHILDREN 18
LOCAL laChildren[NUMCHILDREN,ALEN(this.aChildren,2)]

laChildren[1,CHILD_CLASS] = "Cfilenewbar"
laChildren[1,CHILD_NAME] = "oFileNewBar"
laChildren[2,CHILD_CLASS] = "Cfileclosebar"
laChildren[2,CHILD_NAME] = "oFileCloseBar"
laChildren[3,CHILD_CLASS] = "Cfilesavebar"
laChildren[3,CHILD_NAME] = "oFileSaveBar"
laChildren[4,CHILD_CLASS] = "Cfilecancelbar"
laChildren[4,CHILD_NAME] = "oFileCancelBar"
laChildren[5,CHILD_CLASS] = "Cfiledeletebar"
laChildren[5,CHILD_NAME] = "oFileDeleteBar"
laChildren[6,CHILD_CLASS] = "Cfilerefreshbar"
laChildren[6,CHILD_NAME] = "oFileRefreshBar"
laChildren[7,CHILD_CLASS] = "Cseparatorbar"
laChildren[7,CHILD_NAME] = "oSeparatorBar"
laChildren[8,CHILD_CLASS] = "Cfileprintreportsbar"
laChildren[8,CHILD_NAME] = "oFilePrintReportsBar"
laChildren[9,CHILD_CLASS] = "Cfileprintsetupbar"
laChildren[9,CHILD_NAME] = "oFilePrintSetupBar"
laChildren[10,CHILD_CLASS] = "Cseparatorbar"
laChildren[10,CHILD_NAME] = "oSeparatorBar"
laChildren[11,CHILD_CLASS] = "Cfileuserprefbar"
laChildren[11,CHILD_NAME] = "oFileUserPrefBar"

laChildren[12,CHILD_CLASS] = "AFileSysConfigBar"
laChildren[12,CHILD_NAME] = "oFileSysConfigBar"

laChildren[13,CHILD_CLASS] = "Cseparatorbar"
laChildren[13,CHILD_NAME] = "oSeparatorBar"
laChildren[14,CHILD_CLASS] = "Cfiledbutilsbar"
laChildren[14,CHILD_NAME] = "oFileDBUtilsBar"
laChildren[15,CHILD_CLASS] = "CFileSecurityBar"
laChildren[15,CHILD_NAME] = "oFileSecurityBar"
laChildren[16,CHILD_CLASS] = "CFileEventLogBar"
laChildren[16,CHILD_NAME] = "oFileEventLogBar"
laChildren[17,CHILD_CLASS] = "Cseparatorbar"
laChildren[17,CHILD_NAME] = "oSeparatorBar"
laChildren[18,CHILD_CLASS] = "Cfileexitbar"
laChildren[18,CHILD_NAME] = "oFileExitBar"


DIMENSION this.aChildren[NUMCHILDREN,ALEN(laChildren,2)]
=ACOPY(laChildren,this.aChildren)

RETURN NUMCHILDREN

4) Subclass cFileSysConfigBar AS aFileSysConfigBar

HTH

Rex

>I'm getting ready to add a system setup to my menu and I see that there is already a "System Settings". When you click on it you get a message that says it's not implemented yet. This is great, I'm thinking" I'll have this start my program!
>Well it seems that the filepopup is in ctmenus and not in amenus. Does this mean I have to break the inheritance chain and copy the cFilePad into my aMenus and make the change to start my program? I understand from reading the MM Developers Guide that this is not a nice thing to do.
>I'm I missing something (not thinking clearly)?
>
>Any suggestions, comments, or help would be appreciated.
>Ed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform