Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with path in form property
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01554808
Message ID:
01554902
Vues:
34
>>>>>>There's a limit to the lengths of properties entered into the property sheet. Please show the offending property value.
>>>>>>
>>>>>>>I have VFP9 app originally developed on XP and then moved to a Windows 2008 server. A form in the app has a property for a data path (something like d:\datafolder\datapath\). When the form loads, the ":" is stripped out of the property value, and of course the program fails because the resulting path is invalid.
>>>>>>>
>>>>>>>Clearly this is a platform issue - is there something we can do in the App or in Windows to correct the problem? We can certain change the app to pull the path info from metadata instead, but I would like to understand why this is happening.
>>>>>>>
>>>>>>>TIA for your help,
>>>>>>>Margaret
>>>>>
>>>>>There are two - one is "d:\capella\tables\" and the other is "d:\projects\remotewarehouse\". I do not believe we are exceeding the maximum size of the property value.
>>>>
>>>>That's strange. Have you tried to set the properties in code instead, for instance in the init?
>>>
>>>It is very strange. I have tried setting the properties in the init of the form and also did the following: removed the properties from the form, saved the from changes, run "clean up project", then closed VFP. Reopened the app, rebuilt the project and then the properties back into the form with the default value of '=space(0)', then set the values in the init. Still having the same problem.
>>
>>I found the problem (can you say "stupid programmer"?). It was my error in entering information into the metadata. The form properties have default values that are then adjusted if necessary based on metadata. The error was in the metadata where the path information was incorrect, entered without the ":" in the path.
>>
>>I appreciate your help anyway!
>
>I have seen this as well in my code. A good strategy would be to not enter any default values if they are adjusted in another method.
>
>For instance you have an object loValues and a property FullPath which can get the value from your metadata. In this case, let the Fullpath empty:
>loValues.FullPath = ""
>
>Then you have the method where you set the values from the metadata object:
>loValues.SetValues()
>
>Which could look like this:
>
>LPARAMETERS toMetaData
>THIS.FullPath = toMetaData.FullPath
>etc...
>
>
>If you have default values, those must be defined in the MetaData class, NOT in loValues.class. In the context of the MetaData class you are aware of the situation that the values come from some table or XML file.

Thanks Chris. That is actually very similar to what we have in place now, implemented after we ran into this problem. There is, however, still the requirement that the metadata be correct for this to work and that is what was at the root of our problem to start with.
Margaret Duddy
mmd@outformations.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform