Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning A value from a Class???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00668213
Message ID:
00668306
Vues:
21
>Your GetState form class needs to have its windowType property set to 1 (modal). Otherwise, the code after your show() will run, causing oMyState to go out of scope, which causes it to disappear :)

I already have the windowType property set to 1.
These are the list of properties that I have set:
Height = 159
Width = 189
Desktop = .F.
ShowWindow = 2
DoCreate = .T.
AutoCenter = .T.
Caption = "Get State"
TitleBar = 0
WindowType = 1
WindowState = 0
AlwaysOnTop = .T.
BackColor = 128,128,128
thisstate = ('')
al_state = ([])
Name = "getstate"
sa_label1.Visible = .F.
sa_label1.Name = "sa_label1"
The methods are very simple:
PROCEDURE Unload
RETURN THIS.THISSTATE 

ENDPROC
PROCEDURE Init
*!*	USE
*!*	IF !USED(DATAPATH + '\USERCODE')
*!*		USE (DATAPATH + '\USERCODE') SHARED IN 0
*!*	ENDIF	
**** this is the array that will populate the list box on the form
SELECT CODE,CODEDESC FROM USERCODE ;
   INTO ARRAY laMyState ;
   WHERE CODETYPE = 'STATE' 

   

ENDPROC
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform