Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Browse and 'Variable is not found'
Message
De
24/11/2004 04:53:18
 
 
À
22/11/2004 03:39:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00962939
Message ID:
00964166
Vues:
10
Hi Fabio,

I can fully confirm that your workaround indeed works. I think it's even a better workaround then my transform() workaround.

Nevertheless, a bug it is and the vfpteam should be able to simply repair it.

Thanks for your input.


>>Hi All,
>>
>>I'm sure I have found a bug in the BROWSE command. It exists since long. I'm not sure about vfp9. Can other confirm it?
>>
>>
create cursor c_effe ( effe1 i, effe2 c(10) )
>>
>>insert into c_effe values ( 1234, 'hoihoi' )
>>
>>*	This browse will crash immediately: 'Variable is not found'
>>browse fields ;
>>	calcfield = somefunc( effe1 )
>>
>>*	This browse will crash when clicking on the second column: 'Variable is not found'
>>*	Also note that tabbing will not select the second column.
>>*browse fields ;
>>	effe1, ;
>>	calcfield = somefunc( effe1 ), ;
>>	effe2
>>
>>*	This browse too will crash when clicking on the second column: 'Variable is not found'
>>*browse fields ;
>>	effe1, ;
>>	calcfield = somefunc( effe1 ) :P='999,999,999', ;
>>	effe2
>>
>>*	This browse will not crash.
>>*browse fields ;
>>	effe1, ;
>>	calcfield = transform( somefunc( effe1 ), '999,999,999' ), ;
>>	effe2
>>
>>*	This browse will also not crash.
>>*	Somefunc2() handles a character type field.
>>*browse fields ;
>>	effe1, ;
>>	calcfield = transform( somefunc( effe1 ), '999,999,999' ), ;
>>	calcfield2 = somefunc2( effe2 ), ;
>>	effe2
>>
>>*	But this browse will crash. The only difference with the previous line
>>*	is that somefunc2() now receives a numerical value.
>>*browse fields ;
>>	effe1, ;
>>	calcfield = transform( somefunc( effe1 ), '999,999,999' ), ;
>>	calcfield2 = somefunc2( effe1 ), ;
>>	effe2
>>
>>*	This browse will not crash.
>>*	Once more, the transform() appears to have a beneficial effect.
>>*browse fields ;
>>	effe1, ;
>>	calcfield = transform( somefunc( effe1 ), '999,999,999' ), ;
>>	calcfield2 = transform( somefunc2( effe1 ) ), ;
>>	effe2
>>
>>return
>>
>>
>>function somefunc( tnValue )
>>	RETURN tnValue * 2
>>	>function somefunc2( tnValue )
>>	RETURN 'hoihoi'
>
>
>Workaround, force VFP to use a expressions:
>
>...
>calcfield = (somefunc( effe1 ))
>....
>
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform