Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local vs private
Message
De
12/08/2005 11:39:17
 
 
À
11/08/2005 04:59:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01039725
Message ID:
01040575
Vues:
16
Thanks to all of you who have shared thoughts on this subject. I gave it a try in my current application and this is what I found. In the load event of my first form I place:

private frmSwitchboard
frmSwitchboard = thisform

Then in a button on frmSwitchboard I place

frmSwitchboard.visible = .f.
do form frmForm2

In the destroy event of frmForm2 I place

frmSwitchboard.visible = .t.

At this point I get an error that effectively says it can't see frmSwitchboard. Now if frmForm2 was called by frmSwitchboard, why can't frmForm2 see it?

Incidentally, if I replace the PRIVATE statement with a PUBLIC one, the problem goes away.

- Don

>>Hi,
>>
>>>>I don't use any PUBLIC variables. In my Main.prg, I create a PRIVATE var,
>>
>>So what's the difference between a PUBLIC var and a var declared as PRIVATE at the top level ?
>>
>>Regards,
>>Viv
>
>One difference comes to mind - goApp loses being immune to "release all" command if declared as PRIVATE. ie:
>
>*Main1.prg
>PRIVATE goApp
>*...
>
>*Some procedure
>release all && goApp is released - wouldn't if declared as PUBLIC w/o extended clause
>
>IOW I'm with you. I declare it as PUBLIC if not using Application object instead.
>Cetin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform