Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewObject gives me an error: Object name is invalid
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
NewObject gives me an error: Object name is invalid
Miscellaneous
Thread ID:
00559510
Message ID:
00559510
Views:
47
Hi everybody,

I have a form with two pages. On the first page I have a grid called grdDataDict. In the run-time I change each header to Header based on myHeader class. This code is in Init of the form and works fine.

On the second page I add container with page objects on the fly (I use this technique to not load unvisible objects, which may be never accessed). This is the code in Page2.Activate:
********************************************************************
*  Description.......: Page2.Activate
*  Calling Samples...:
*  Parameter List....:
*  Created by........:
*  Modified by.......: Nadya Nosonovsky 05/31/2000 05:41:31 PM
********************************************************************
thisform.dataenvironment.initialselectedalias="IndxDict"
select IndxDict
with this
	if type("this.ContIndxPage")<>"O"
		.newobject("ContIndxPage","IndxDictPage","ddwg.vcx")
		with .ContIndxPage
			.top=5
			.left=20
			.visible=.t.
			set step on
			local loColumn, lcCaption
			for each loColumn in .grdIndxDict.Columns
		     lcCaption = loColumn.Header1.Caption
		     loColumn.removeobject('Header1')
		     loColumn.NewObject('Header1','myheader','myheader.prg',,m.lcCaption)
		next       
		endwith
	endif
	.refresh()
	thisform.navstand.navupdate()
	thisform.navstand.lstOrders.enable()
	.ContIndxPage.grdIndxDict.setfocus()	
endwith
Line with NewObject generates an Error : Object name is invalid (Error 1575)

What could be wrong here?

Thanks a lot for any clue.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform