Index
1998-05-26 13:35Michael G. Emmons : Forms Connected to Menus?
1998-06-24 13:19Bob Archer : Data Driven Menus...
1998-06-24 17:52Ed Leafe : Re: Data Driven Menus...
1998-06-25 09:07Bob Archer : Re: Data Driven Menus...
1998-06-25 17:24Ed Leafe : Re: Data Driven Menus...
1998-07-13 16:56Frank Blunier : Menus and Toplevel Forms
1999-01-27 11:48Dana Dill : Adding bitmaps to your menus....
1999-04-12 22:31Michael G. Emmons : Codebook App With Extensive Menus?
1999-04-12 23:29Charles T. Blankenship : Re: Codebook App With Extensive Menus?
1999-04-13 02:21Jose Constant : Re: Codebook App With Extensive Menus?
Back to top
Forms Connected to Menus?

Author: Michael G. Emmons

Posted: 1998-05-26 13:35:03   Link

I was looking over some of the ebizobj init code the other day and noticed the following bit of code:

*–– Put up a custom menu pad if specified

IF !EMPTY(this.cMenuPad) AND llFormIsPresent AND ;

TYPE("goApp.oMenu") == "O"

=EVAL("goApp.oMenu." + this.cMenuPad + ".Show()")

ENDIF

If I remember correctly, the bizobj will add a menu item associated with it on the fly, no? This code seems to assume that the menu pad is already loaded, but is hidden. Just to test this I added a pad I had already defined in my amenus.vcx to the cMenuPad property. Sure enough, I got a "Unknown member" error when trying to show() the menu pad. Has this code changed from the original bizobj code?

Michael G. Emmons

<a href="mailto:MichaelE@flashcreative.com">MichaelE@flashcreative.com</a>

Senior Consultant

<a href="http://www.flashcreative.com" class="white" onmouseover="style.color='#00cc00'" onmouseout="style.color='#0000ff'" title="Flash Creative Management Web Site">Flash Creative Management</a>

©1998 Michael G. Emmons
Back to top
Data Driven Menus...

Author: Bob Archer

Posted: 1998-06-24 13:19:37   Link

Hey all...

I am about to embark on a program that will take informaitno from a file and create a Codebook menu using the CodeBook wrapper classes.

THis would also include a menu editor (actaully editing the file) that could be used by the developer and included in the AP for the user.

However, if anyone has done this, or something simmilar, and would like to share, I would appreciate it.

Bob

©1998 Bob Archer
Back to top
Re: Data Driven Menus...

Author: Ed Leafe

Posted: 1998-06-24 17:52:54   Link

<I><FONT COLOR="#663300">I am about to embark on a program that will take informaitno from a file and create a Codebook menu using the CodeBook wrapper classes.

THis would also include a menu editor (actaully editing the file) that could be used by the developer and included in the AP for the user.

However, if anyone has done this, or something simmilar, and would like to share, I would appreciate it.</FONT></I>

I've written data-driven menubar classes, which had properties to identify the table to use, the expression to create the prompt, and the ON BAR code to execute. If you'd like, I can post the code the next time I'm in my office.

<font color="#cc0000"> ___/

/

__/

/

____/</font>

Ed Leafe

©1998 Ed Leafe
Back to top
Re: Data Driven Menus...

Author: Bob Archer

Posted: 1998-06-25 09:07:09   Link

<I><FONT COLOR="#663300">

I've written data-driven menubar classes, which had properties to identify the table to use, the expression to create the prompt, and the ON BAR code to execute. If you'd like, I can post the code the next time I'm in my office.

</FONT></I>

Sure... every little bit helps... Does it generate the code book menus using cMenu,cPad,cPopup methods?

BOb

©1998 Bob Archer
Back to top
Re: Data Driven Menus...

Author: Ed Leafe

Posted: 1998-06-25 17:24:28   Link

<I><FONT COLOR="#663300">Sure... every little bit helps... Does it generate the code book menus using cMenu,cPad,cPopup methods?</FONT></I>

Not exactly - what it does is use a table to dynamically create the aChildren() arrays at run time. I'm including the class export code below. Bear in mind that this was for a 3.0 app and was written over 2.5 years ago!

**************************************************

*-- Class: tablepopup (f:cdbk30fislibsamenus.vcx)

*-- ParentClass: cpopup (f:cdbk30common30libscmenus.vcx)

*-- BaseClass: container

*

#INCLUDE "f:cdbk30fisincludeappincl.h"

*

DEFINE CLASS tablepopup AS cpopup

Width = 173

Height = 25

*-- Alias from which the popup bars are selected

calias = ""

*-- Filter expression to be used when selecting from the alias

cfilter = ""

*-- Name of the field used to populate the popup bars

cfldname = ""

*-- Field in the cAlias table containing the unique ID of the selected bar's record.

cidfld = ""

*-- name of the class of the bars to add.

cbarclass = ""

*-- The value to be passed to the child bars when a "New..." bar is selected.

cnewid = ("000000")

*-- Name of directory to find the table for the cAlias property.

cdatadir = "DATA"

Name = "tablepopup"

*-- If .T., adds a bar with the word "New..." to the popup

laddnewbar = .F.

*-- If .T., the bar labelled "New..." is placed at the top of the popup

lnewbarontop = .F.

*-- Array which holds additional info about the bars to be created. Its rows match with those in the aChildren property.

DIMENSION achildinfo[1,2]

PROCEDURE loadchildren

LOCAL lcDataDir, lcAlias, lcFilter, lcFldName, lcIDFld, laBars[1], lnTally, ;

llNewBar, llNewTop, lnOffset

IF TYPE("goApp") = "O"

lcDataDir = goApp.GetSetting('DBC Locations - Local', 'CDBK30')

ELSE

lcDataDir = This.cDataDir

ENDIF

lcAlias = This.cAlias

IF !USED(lcAlias)

USE (lcDataDir + "" + lcAlias + ".DBF") IN 0 ALIAS &lcAlias

ENDIF

lcFilter = IIF(EMPTY(This.cFilter), "", ;

"WHERE " + This.cFilter)

lcFldname = This.cFldName

lcIDFld = This.cIDFld

llNewBar = This.lAddNewbar

llNewTop = This.lNewBarOnTop

lnOffset = IIF(llNewBar AND llNewTop, 1, 0)

SELECT &lcFldName, &lcIDFld ;

FROM &lcAlias ;

&lcFilter ;

INTO ARRAY laBars

lnTally = _TALLY + IIF(llNewBar, 1, 0)

LOCAL laChildren[lnTally, ALEN(this.aChildren,2)], ;

laChildInfo[lnTally, 3], lnCnt, lcBarClass, ;

lnBarRow

#DEFINE CHILD_CAPTION 1

#DEFINE CHILD_ID 2

#DEFINE CHILD_NEW 3

lcBarClass = This.cBarClass

IF llNewbar

lnCnt = IIF(llNewTop, 1, lnTally)

laChildren[lnCnt, CHILD_CLASS] = lcBarClass

laChildren[lnCnt, CHILD_NAME] = "o" + ;

lcBarClass + ALLTRIM(STR(lnCnt))

laChildInfo[lnCnt, CHILD_CAPTION] = "New..."

laChildInfo[lnCnt, CHILD_ID] = This.cNewID

laChildInfo[lnCnt, CHILD_NEW] = .T.

ENDIF

lnBarRow = 0

LOCAL lnLo, lnHi

lnLo = (1 + lnOffset)

lnHi = lnTally - IIF(llNewbar, (1-lnOffSet), 0)

FOR lnCnt = lnLo TO lnHi

lnBarRow = lnBarRow + 1

laChildren[lnBarRow, CHILD_CLASS] = lcBarClass

laChildren[lnBarRow, CHILD_NAME] = "o" + lcBarClass + ALLTRIM(STR(lnCnt))

laChildInfo[lnBarRow, CHILD_CAPTION] = ALLTRIM(laBars[lnBarRow, CHILD_CAPTION])

laChildInfo[lnBarRow, CHILD_ID] = ALLTRIM(laBars[lnBarRow, CHILD_ID])

laChildInfo[lnCnt, CHILD_NEW] = .F.

ENDFOR

DIMENSION This.aChildren[lnTally, ALEN(laChildren,2)], This.aChildInfo[lnTally, ALEN(laChildInfo,2)]

=ACOPY(laChildren, This.aChildren)

=ACOPY(laChildInfo, This.aChildInfo)

RETURN lnTally

ENDPROC

PROCEDURE createchildren

#DEFINE CHILD_CAPTION 1

#DEFINE CHILD_ID 2

#DEFINE CHILD_NEW 3

*-- Iterates through the aChildren[] array adding each object

*-- to the collection using this.Add()

LOCAL lnChild, ;

laChildren[ALEN(this.aChildren, 1), ALEN(this.aChildren, 2)], ;

laChildInfo[ALEN(this.aChildInfo, 1), ALEN(this.aChildInfo, 2)]

=ACOPY(this.aChildren, laChildren)

=ACOPY(this.aChildInfo, laChildInfo)

FOR lnChild = 1 TO ALEN(laChildren, 1)

*-- Create default name for object if not specified

IF TYPE("laChildren[lnChild, " + ALLT(STR(CHILD_NAME)) + "]") <> "C"

laChildren[lnChild, CHILD_NAME] = ;

"o" + laChildren[lnChild, CHILD_CLASS]

ENDIF

IF !this.Add( laChildren[lnChild, CHILD_NAME], ;

laChildren[lnChild, CHILD_CLASS], ;

laChildInfo[lnChild, CHILD_CAPTION], ;

laChildInfo[lnChild, CHILD_ID], ;

laChildInfo[lnChild, CHILD_NEW])

RETURN .F.

ENDIF

ENDFOR

ENDPROC

ENDDEFINE

*

*-- EndDefine: tablepopup

**************************************************

<font color="#cc0000"> ___/

/

__/

/

____/</font>

Ed Leafe

©1998 Ed Leafe
Back to top
Menus and Toplevel Forms

Author: Frank Blunier

Posted: 1998-07-13 16:56:28   Link

Did anybody allready implement the CBDK menus in Toplevelforms.

And how are you handling the shortcut menus?

Thanks for any input.

Frank

©1998 Frank Blunier
Back to top
Adding bitmaps to your menus....

Author: Dana Dill

Posted: 1999-01-27 11:48:02   Link

Using the codebook method is there a way to add bitmaps to the menus as is popular in alot of todays new applications. If not...Is it possible to use a 3rd party product that supports this and still use the codebook framework?

Thanks for the Help!!!

©1999 Dana Dill
Back to top
Codebook App With Extensive Menus?

Author: Michael G. Emmons

Posted: 1999-04-12 22:31:26   Link

Has anyone else developed a codebook app with an extensive menu system? An app I am working on has 161 classes in amenus (popups, pads and bars) and the load time is simply unacceptable. It takes the app an average of 14 seconds to load--and that's on a PIII 500 w/128MB of RAM and a 100Mb network connection. Running on slower machines the time doubles or triples. In addition the menus system is pulling huge amounts of data over the network. For comparison, the app with the menus enabled pulls a total of approximately 25MB of data to load. Without any menus enabled it's about 3.5MB of data. YAG, CTB, Ed? Are there any optimizations that can speed this up? Unless I can come up with a major performance boost I think I'll just deep six the object oriented menu system and forego all the nice bells and whistles that come with it.

Michael G. Emmons

<a href="mailto:MichaelE@flashcreative.com">MichaelE@flashcreative.com</a>

Senior Consultant

<a href="http://www.flashcreative.com" class="white" onmouseover="style.color='#00cc00'" onmouseout="style.color='#0000ff'" title="Flash Creative Management Web Site">Flash Creative Management</a>

©1999 Michael G. Emmons
Back to top
Re: Codebook App With Extensive Menus?

Author: Charles T. Blankenship

Posted: 1999-04-12 23:29:42   Link

<I><FONT COLOR="#663300">Has anyone else developed a codebook app with an extensive menu system? An app I am working on has 161 classes in amenus (popups, pads and bars) and the load time is simply unacceptable. It takes the app an average of 14 seconds to load--and that's on a PIII 500 w/128MB of RAM and a 100Mb network connection. Running on slower machines the time doubles or triples. In addition the menus system is pulling huge amounts of data over the network. For comparison, the app with the menus enabled pulls a total of approximately 25MB of data to load. Without any menus enabled it's about 3.5MB of data. YAG, CTB, Ed? Are there any optimizations that can speed this up? Unless I can come up with a major performance boost I think I'll just deep six the object oriented menu system and forego all the nice bells and whistles that come with it.

</FONT></I>

Hi Michael:

The OO Menu system has been "deep sixed" on a couple of projects that I know of ... Ed did it I know for a fact for one of his clients. I'm sure he'll chime in here quite soon and elighten you on the gotchas he ran into. From what I hear he is "really" busy ... I just wanted to let you know that the "deep six" approach is not necessarily a bad one in your situation and has been done before ... and it didn't look real difficult either.

Have a nice one,

CT

Flash Creative Management, Inc. (FLASH)

http://www.flashcreative.com

ctb@flashcreative.com

tomandanna@erols.com

©1999 Charles T. Blankenship
Back to top
Re: Codebook App With Extensive Menus?

Author: Jose Constant

Posted: 1999-04-13 02:21:14   Link

<I><FONT COLOR="#663300I just wanted to let you know that the "deep six" approach is not necessarily a bad one in your situation and has been done before ... and it didn't look real difficult either.

Have a nice one,

CT</FONT></I>

Hi CT,

Owning an old CJ I know what a slant six is. But what is a "deep six"?

Jose

Jose Constant

Constant Software Systems

Belgium

<a href=http://www.constant.be/css target=_blank>Jose's Web Site</a>

©1999 Jose Constant