main logo
Subject: Customizing Class Based Menus
Author: Gary E. Krell
Posted: 2001/04/07 12:04:47
 
View Entire Thread
New Search


The following may be useful for beginners that are attempting to implement Class Based Menus in CB 6.1 after creating their first project with NEWAPP.

When I did this, I attempted to follow along with 'Step 7: Customizing the Menu' (pg 53) in "Codebook for Mere Mortals". (This seems to be the same procedure as Ch. 5 in the "Definitive Guide" but does not use the builders.) I found the procedure to be obsolete. Duh!

With the help of CBSF contributors, I worked through the problem. Here are my notes.

Before beginning, in Project Manager , do this:

A. In the class library 'aMenus', rename 'AdministrationPad' to 'aAdministrationPad' and 'AdministrationPopup' to 'aAdministrationPopup'.

B. Modify 'aAdministrationPad' and change the property .cPopup=aAdministrationPopup

C. Modify 'MainMenu' and edit the property .cChildList so that the 3rd value in the comma delimited string is 'aAdministrationPad' rather than 'AdministrationPad'.

Rather than renaming 'AdminTemplateBar' as directed in 7.1, do this:

D. Subclass 'iBar' (in class lib 'aMenus') to create your bars. Name them like 'aAdminMyFirstBar', etc. and save them in the aMenus lib.

Follow steps 7.2 thru 7.4, skip steps 7.5 and 7.6 and, finally, do this:

E. Modify aAdministrationPopup and change the value of property cChildList to a comma delimited list of your bars created above. Like this:
aAdminMyFirstBar,aAdminMySecondBar

I assume that the problems I had were due to issues in the templates and the builders, but it is beyond my expertise to tackle them right now. For the present this works. Good luck!
Gary Krell


 
©2001 Gary E. Krell
<-- Prior Message New Search Next Message -->