FIX: Error Using Object Property > 255 Characters As ParameterID: Q221739
|
You have an object property that is a character string of length 255 characters or longer. You attempt to pass this property as a parameter to a form Init method using the DO FORM <formname> WITH <parameter> syntax. When the DO FORM command is executed, the following error is generated:
String is too long to fit.
Upgrade to Visual Studio 6.0 Service Pack 3 or try the workarounds below:
DO FORM testxx WITH (lObj.cText)
LOCAL lcTxt
lcTxt = lObj.cText
DO FORM testxx WITH lcTxt
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
Local aobj[1], xx
Create FORM testxx NOWAIT
=ASELOBJ(aobj,1)
xx = aobj[1]
xx.autocenter = .t.
xx.WriteMethod('init',[LPARA tcInitString] ;
+ chr(13)+ [? tcInitString])
Keyboard 'Y' CLEAR
Release WINDOW 'Form Designer - testxx.scx'
Local lobj, lofrm1, lctxt
lobj = CREATEOBJECT('obj1') && Create an object with a text property
Do FORM testxx WITH lobj.cText && This command produces the error:
Return
Define CLASS obj1 AS CUSTOM
cText = REPLICATE( 'X', 255 )
Enddefine
Additional query words:
Keywords : kbCtrl kbOOP kbVFp300bbug kbVFp500abug kbVFp600 kbVFp600bug kbVS600sp3fix kbGrpFox
Version : WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: June 16, 1999