Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String is too long to fit
Message
From
28/12/1998 15:55:17
 
 
To
28/12/1998 15:17:21
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00170802
Message ID:
00170930
Views:
33
Um, Eric-

Isn't that what I said???

When you DO someProc WITH someVar it is passed by reference. So, when you DO FORM someform WITH someproperty, you get an error precisely because the property can't be passed by reference. IOW, I don't thing it is VFP's bug < s >.

I tried the following:
set step on
yoyo = createobject('obj1')
*!*	do form temp with yoyo.lottatext
set classlib to temp.vcx
xoxo = createobject('temp', yoyo.lottatext )
xoxo.show(1)
on error
define class obj1 as custom
	lottatext = replicate( 'fubar', 100 )
enddefine

**************************************************
*-- Class:        temp (d:\nec\temp.vcx)
*-- ParentClass:  form
*-- BaseClass:    form
*
DEFINE CLASS temp AS form


	Top = 0
	Left = 0
	Height = 293
	Width = 625
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT label1 AS label WITH ;
		WordWrap = .T., ;
		Caption = "Label1", ;
		Height = 286, ;
		Left = 2, ;
		Top = 1, ;
		Width = 618, ;
		Name = "Label1"


	PROCEDURE Init
		lparameter tctext
		this.label1.caption = tctext
	ENDPROC


ENDDEFINE
*
*-- EndDefine: temp
**************************************************
With the result that CREATEOBJECT passed the property just fine.

HTH
p.s.Cristof Lange's article on parameters in the Jan FPA pointed me in this direction


>Form properties are always passed by value, there is no other way. My personal conclusion from playing with it and from reading the posts here is that I have encountered a bug. Good thing there is an easy workaround. This is one for my records...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform