> > Hello friends,
> >
> > I am stuck with coding my first VFP (OOP) shortcut menu.
> >
> > I have a form which contains a variable number of Image objects. Each object is subclassed and has its own custom methods (in this case, a method ToggleSize()) which I want to fire with the shortcut menu.
> >
> > I have constructed the SCmenu, and it functions OK alone on dry run. The SCmenu is called by a RightClick from each object with...
> >
> > DO ImgShCut.mpr WITH THIS
> >
> > ...as instructed in the manual.
> >
> > Then I receive an error message "No PARAMETER statement is found". What parameters?
> >
> > I can get rid of the error by omitting the "WITH THIS" in the above calling command, but then other problems emerge, and this isn't the answer either. I clearly don't understand the meaning of the WITH THIS, and also find that I cannot place a THIS.MethodName call in the Result-Options column of the Menu Designer where it calls for a COMMAND or a PROCEDURE.
> >
> > I am really confused. Any help would be much appreciated.
> >
> > TIA
> >
> > BillvV
> > Rochester, Michigan
>
> Thanks - you just taught me something about the menu designer that I didn't know !!
> The .mpr file is just a procedure file that is generated by the menu designer. So when you issue the statement - DO ImgShCut.mpr WITH THIS you are passing an object reference to your image object to the menu procedure (I assume that you want to do this for some reason).
>
> If you go into the menu designer for your shortcut and then select View/General Options you should have some code in there like :
>
> LPARAMETERS toImage
>
> Then generate the .mpr file (MENU/GENERATE) and edit the .mpr file. You will see the code you entered at the beginning of the .mpr file and VFP will be happy - you have called it with a parameter and now the .mpr is handling the parameter.
>
> I assume that your menu wants to act upon the image and thus you should have some code in your menu items like :
>
> toImage.ToggleSize()
>
> or whatever the shortcut is supposed to call.
>
> Cheers,
> Jamie
>
jamie.osborn@foxite.comHi,
If you choose to create a SHORTCUT and not a MENU the lparameters statement should automatically be included in your mpr file. So it seems that you have created a MENU and not a SHORTCUT.
Khalil Shaddad (Lebanon)