Subject Re: Menus Again
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Thu, 06 Aug 2020 04:51:55 -0400
Newsgroups dbase.getting-started

Hi Tony,

I didn't send you a fix; I sent you one way of determining the problem.
Now that I can see some code, we can proceed.

Firstly, your program is not a menu program as most here will understand it; dBASE menu files have an "mnu" extension.
Yours is a form that calls other forms; that's fine as long as well all know what we're talking about. :-)

The form works on my screen (after I commented out the picture file reference) so nothing wrong there.

You don't say what you mean by "will not work".  Do you mean it will not call any of the nine forms or just some, or one of them?
Please post the code of just one form that does not get called.
Also post the code of the identical MbcMenu so that we can check it for differences; many eyes make light work.

Regards,
Andy

> Hi Andy,
> I tried your "Fix" and could not get a response ?
>
> This is my menu program for the coding (Allpro ??? ) -There are Nine form to  I have done, which all executes as expected, and this Menu file did operate for 3 / 4 weeks and now will not. The Mbcmenu now executes after the incident I wrote about earlier, and looks exactly the same as this - As I said previously I can't understand the difference.
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 06/08/2020
> //
> parameter bModal
> local f
> f = new StartForm()
> if (bModal)
>    f.mdi = false // ensure not MDI
>    f.readModal()
> else
>    f.open()
> endif
>
> class StartForm of FORM
>    with (this)
>       onOpen = class::FORM_ONOPEN
>       metric = 6        // Pixels
>       height = 497.0
>       left = 564.0
>       top = 35.0
>       width = 484.0
>       text = ""
>    endwith
>
>    this.ALLPROICON = new IMAGE(this)
>    with (this.ALLPROICON)
>       height = 99.0
>       left = 0.0
>       top = 0.0
>       width = 117.0
>       dataSource = 'FILENAME "C:\Users\Anthony Hughes\Desktop\allprotest\alproicon.jpg"'
>       alignment = 3        // Keep Aspect Stretch
>       borderStyle = 1        // Raised
>    endwith
>
>    this.PUSHCLOSE = new PUSHBUTTON(this)
>    with (this.PUSHCLOSE)
>       onClick = class::PUSHCLOSE_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 441.0
>       width = 119.0
>       text = "Close Menu"
>       fontSize = 12.0
>       fontBold = true
>       colorNormal = "Red/BtnFace"
>    endwith
>
>    this.PUSHEMP = new PUSHBUTTON(this)
>    with (this.PUSHEMP)
>       onClick = class::PUSHEMP_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 99.0
>       width = 120.0
>       text = "Employee's"
>    endwith
>
>    this.PUSHRAWS = new PUSHBUTTON(this)
>    with (this.PUSHRAWS)
>       onClick = class::PUSHRAWS_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 225.0
>       width = 120.0
>       text = "Raws Product"
>    endwith
>
>    this.PUSHRAWSADJ = new PUSHBUTTON(this)
>    with (this.PUSHRAWSADJ)
>       onClick = class::PUSHRAWSADJ_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 45.0
>       width = 120.0
>       text = "Adjust Raws"
>    endwith
>
>    this.PUSHFORMULA = new PUSHBUTTON(this)
>    with (this.PUSHFORMULA)
>       onClick = class::PUSHFORMULA_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 153.0
>       width = 120.0
>       text = "Formula's"
>    endwith
>
>    this.PUSHTESTBATCH = new PUSHBUTTON(this)
>    with (this.PUSHTESTBATCH)
>       onClick = class::PUSHTESTBATCH_ONCLICK
>       height = 46.0
>       left = 147.0
>       top = 306.0
>       width = 120.0
>       text = "Tast Batch Make Batch"
>    endwith
>
>    this.PUSHBUTTON1 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON1)
>       onClick = class::PUSHBUTTON1_ONCLICK
>       height = 46.0
>       left = 336.0
>       top = 306.0
>       width = 120.0
>       text = "Forward Estimates"
>    endwith
>
>    this.PUSHBUTTON2 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON2)
>       onClick = class::PUSHBUTTON2_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 45.0
>       width = 107.0
>       text = "Order Raws"
>    endwith
>
>    this.PUSHBUTTON3 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON3)
>       onClick = class::PUSHBUTTON3_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 99.0
>       width = 107.0
>       text = "Receive Raws"
>    endwith
>
>    this.PUSHBUTTON4 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON4)
>       onClick = class::PUSHBUTTON4_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 153.0
>       width = 107.0
>       text = "Raws Grid"
>    endwith
>
>
>    function PUSHBUTTON1_onClick()
>       do allproahead.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON2_onClick()
>       do allproorders.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON3_onClick()
>       do allproreceivals.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON4_onClick()
>       do allprodetail.wfm
>       form.close()
>                 return
>
>    function PUSHCLOSE_onClick()
>    form.close()  
>       return
>
>    function PUSHEMP_onClick()
>       do allproemp.wfm
>       form.close()
>                 return
>
>    function PUSHFORMULA_onClick()
>       do allproformula.wfm
>                 form.close()
>       return
>
>    function PUSHRAWSADJ_onClick() // = {;msgbox(set("directory")); do MbcDisplay.wfm}
>     do allproadjust.wfm
>          form.close()
>                 return
>
>    function PUSHRAWS_onClick()
>       do allproraws.wfm
>       Form.Close()
>                 return
>
>    function PUSHTESTBATCH_onClick()
>       do allprobatch.wfm
>       return
>
>    function form_onOpen()
>       Form.left = 500
>                 form.top = 0
>                 form.width = 500
>                 form.height = 550
>       return
>
> endclass
>
>
>
>
>
>
>
>
> Andy Taylor Wrote:
>
> > Tony,
> >
> > I'm guessing that your pushbutton that runs the form has the following in it's code:
> >    onClick = {;do MbcDisplay.wfm}
> >
> > Please change that to:
> >    onClick = {;msgbox(set("directory")); do MbcDisplay.wfm}
> >
> > Run the form, press the pushbutton and check that the folder shown is, in fact, the one that contains MbcDisplay.wfm.
> >
> > My guess is that the folder that dBASE is running in is not the one you think it is.
> >
> > There are plenty of other things that we can check on if I am wrong...this will be something simple and is very unlikely to be a bug.
> >
> > Andy
> >
> >  
> > > Hi Akshat,
> > >
> > > I mean the dBase wfm Files are all in a folder called "Mbcdisplay" together with the other Mbcfiles?? . When I open the Mbcdisplay folder & double left click Mbcdisplay.wfm it executes OK. Right beside it is Mbcmenu.wfm and when I double left click on it in the same folder it also executes OK. However Mbcmenu.wfm pushbutton. with Do Mbcdisplay.wfm  can't find Mbcdisplay.wfm to make it execute. ??.  
> > > Error "file does not exist ?"
> > >
> > > However sit down and rest ?? - Late yesterday ( Monday Australia) i went to show my daughter a couple of things I had coded and dBase went OFF the air, black screen, unresponsive etc. End Task would not execute, Escape had no response, so I turned the computer completely off for 30 minutes. When I switched it on again, the Mbcmenu.wfm executed as exactly as it should ?? - I know it would not excite dBase LLc, but think it is a "dBase Language Bug" , and now AllproMenu.wfm will not execute, and I have had it running for at least 4 weeks - No I have not played with the coding, so it all seems weird to this 83 year old ??
> > >
> > > How do you report this to dBase Llc for a possible patch ??
> > >
> > > Tony Hughes
> > >
> >
>