Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! Form is painted with values of variables
Message
De
29/12/1999 17:07:09
 
 
À
29/12/1999 16:54:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00310116
Message ID:
00310121
Vues:
23
>Hi,
>I have a form with ole bound control on it. In the action event of a buton on the form, I am getting a file name from user and loading that file into a table field. When I do it, the form is getting paited with the values of local variables in the click method.
>Given below is the code in my click method:
>========================================
>local lcFileName, lsIdParticipant
>lcFileName = GETFILE("Photo Files:gif,bmp,jpeg,jpg", "c:\", "Select", 0, "Choose Picture")
>IF !EMPTY(lcFileName)
> lsIdParticipant = THISFORM.m_sIdParticipant
> IF NOT SEEK(lsIdParticipant,"photo","photo_idx")
> * Create a new record with the id 'idParticipant'
> APPEND BLANK IN photo
> REPLACE participant_id WITH lsIdParticipant IN photo
> THISFORM.m_bIsRecAdded = .T.
> ENDIF
>
> APPEND GENERAL photo.picture_data FROM (lcFileName)
> THISFORM.m_bIsPhotoAdded = .T.
>ENDIF
>========================================================
>
>What am I doing wrong that is causing the values getting printed on the form?
>

It's likely that the value of SET TALK is being altered somewhere - SET TALK is scoped to the datasession, so if the datasession changes just before the method code is called, that might be an answer. Forms with private datasession may do this even if they don't explicitly open files, although clearly your code expects to find files open and ready to use.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform