Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Events Order Problem
Message
De
04/05/2000 04:15:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/05/2000 15:08:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00365110
Message ID:
00365982
Vues:
18
>Jason
>
>Thanks for your response
>
>I tried having a procedure call both formA(Maps) and FormB(Coverages) independently from a menu call. This did clean up one other problem. The problem of the class on the second form not recognizing the occurance of the first form still exists. From inside the code in the class on the secong form (Coverages) I use:
>
>called from coverages.coverprop1.populate()
>
>maps.map1.layers.add (I get an error that maps does not exist)
>
>Is it normal for a class on a form not being able to see another form that already exists? I can refer to formA(Maps) from the init of formB(Coverages)


Quinn,
Situation is different than in your original post. You try to access a method of FormA from FormB. FormB doesn't know FormA because it's not initialized yet. Still after initialization :
maps.map1...
would work only in the case its scx name is "maps.scx" and it's the first instance of that form. To overcome call formB with passing FormA's object ref :
do form formb with this

formB.init
lparameters toCaller
this.SomeObject.Value = toCaller.Somemethod
toCaller.SomeProperty.Value = toCaller.Somemethod
...

To accomodate this to your case :
*Maps.init
...
do form Coverages with this
....

*Coverages.Init
lparameters toCaller
....
toCaller.Map1.Layers.Add(layer)


Seeing the form names I guess this is MapObjects using ArcInfo coverages. This way GeoDataset and recordset would be FormB's and if it's closed FormA would error I guess. Wouldn't it be better FormB returns coverage path and FormA connects.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform