Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object not cantained in form (Menu)
Message
De
26/11/1997 08:37:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00061435
Message ID:
00062373
Vues:
35
>>The toolbar is placed there when the first form is opened by a call from the form init to a method "ShowAppToolbar" in the main
>>However if the user tries to access the menu with the form showing I get the
>>"Object is not contained in a Form" message. It does nothing more since the
>>menu then works. However if the user then quits the application he is informed that oApp does not exist. This is a mess since >oApp.Cleanup does my quitting house keeping. The user gets "Cancel" "Suspend" Ignore" "Ignore All" choices over and over again.
>
>
>It still appears that your toolbar is not in a formset, and it must be. I have a formset called Opening and there is nothing in it except the toolbar. I do not use _msysmenu, I set my own menus. The toolbar and menu are all a part of the formset Opening. I can then open and close as many additional forms as I wish with no ill effect because the toolbar is always a part of the Opening formset. The exit button click method closes and releases everything, and of course Opening.Release is the last issued command. Here is a portion of the MAIN.PRG. Up until I created a formset with the toolbar as part of the set, I always received the same error message as you, "Object is not contained in a form". Remember a formset is not a form.
>
>set refresh to 20, 100
>set reprocess to automatic
>set exclusive off
>set default to subst(sys(16), 1, rat([\], sys(16)))
>set talk off
>set status bar off
>set deleted on
>set help to GOLDQTE.HLP
>set sysmenu to
>set debug off
>set procedure to PROCS
>clear all
>
>do MAINMENU.MPR
>do while .T.
> do case
> case gnNextForm = 1
> _Screen.Caption = [GoldQuote Quotation Form]
> _Screen.WindowState = 2
> _Screen.Closable = .F.
> _Screen.Visible = .T.
> do form OPENING
> do form QUOTE
>
>It works for me.
>
>DJ :o)

DJ,

Sorry it took so long.

I had a "thisform.property" reference in a menu pad "Skip for" instead of
a "_screen.activeform.property" reference. The "Object is not contained in a form"
message was referring to the menu, not the toolbar.

I appreciate your help. You got me thinking about the whole application, not just the
single problem I had and it helped alot.

Thanks Don

>DJ :o)
Best Regards
Don Simpson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform