Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
8 Bug?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: 8 Bug?
Miscellaneous
Thread ID:
00754397
Message ID:
00754606
Views:
18
>In different forms I got three textboxes in a container, .Enabled=.f.,
>controlSource="dsbld(1)", (2) and (3).
>
>There´s a textbox, .Enabled=.f., controlSource="dsbld(4)", NOT in a container.
>
>There are always several other objects.
>
>VFP8: Error 45 in command oFrm1.Show - Not a character expression
>
>If I remove the container with the textboxes the error is gone.
>
>When I Watch dsbld in the debugger the error is gone too. This is the weirdest part to me: What´s
>the voodoo that the exception disappears when a variable is in the Watch window?
>
>Upon inspection dsbld is properly initialized, dsbld is A, all items are C.
>
>Sorry for reposting this, but I´m tired of my monolog and I tried to be as precise as I can. When
>I fell over this the whole thing was a multi-step exploration.

I'm not seeing this. Can you change the code below to make it fail?
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


DEFINE CLASS form1 AS form


	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT cnt3 AS cnt3

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "dsbld(4)", ;
		Enabled = .F., ;
		Left = 48, ;
		Top = 120, ;
		Name = "Text1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 192, ;
		Left = 240, ;
		Caption = "Command1", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 156, ;
		Left = 240, ;
		Caption = "Command2", ;
		Name = "Command2"


	ADD OBJECT command3 AS commandbutton WITH ;
		Top = 120, ;
		Left = 240, ;
		Caption = "Command3", ;
		Name = "Command3"


	PROCEDURE Load
		PUBLIC ARRAY dsbld(4)

		dsbld(1) = "Item 1"
		dsbld(2) = "Item 2"
		dsbld(3) = "Item 3"
		dsbld(4) = "Item 4"
	ENDPROC


ENDDEFINE

DEFINE CLASS cnt3 as Container
		Top = 12
		Left = 24
		Width = 144
		Height = 96
		Name = "Container1"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "dsbld(1)", ;
		Enabled = .F., ;
		Left = 24, ;
		Top = 12, ;
		Name = "Text1"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "dsbld(2)", ;
		Enabled = .F., ;
		Left = 24, ;
		Top = 36, ;
		Name = "Text2"


	ADD OBJECT text3 AS textbox WITH ;
		ControlSource = "dsbld(3)", ;
		Enabled = .F., ;
		Left = 24, ;
		Top = 60, ;
		Name = "Text3"
ENDDEFINE
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform