Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Assign with Object = Crash
Message
From
22/09/2004 00:01:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
_Assign with Object = Crash
Miscellaneous
Thread ID:
00944851
Message ID:
00944851
Views:
61
Hello everybody.

i have multible navigation controls on my forms with Edit, Save, etc buttons. some of my forms have a large number of objects on them.

i need to collect references of all navigation objects into one control's (custom) array. the known usual way is to loop through all objects/containers on the form and look for them.

i am trying a different approach, however, get resistence from the fox.

in the forms init i call:
ThisForm.NavigationControl1.GetAllNavigationObjects()
the GetAllNavigationObjects() method looks as follows
* *** *****************************************************
* *** reset the array
dime THIS.a_NavigationObjects(1,3)
THIS.a_NavigationObjects = .f.

* *** *****************************************************
* *** we make all navigations report to me
This.Parent.SetAll("NavigationsReportToMaster", This)
the 'NavigationsReportToMaster' property on all navigation containers have an assign method attached which looks like this:
LPARAMETERS vNewVal
*To do: Modify this routine for the Assign method

SET STEP ON

THIS.NavigationsReportToMaster = vNewVal

* *** also tried this without the following 2 lines
vNewVal = .null.
release vNewVal

*!*	* *** this will add this navigation to the
*!*	* *** Navigation Master Controll
*!*	THIS.NavigationsReportToMaster.AddNavigation(This)
LOCAL ;
	NewRow

WITH THIS.NavigationsReportToMaster
	* *** adjust the array size
	NewRow = ALEN(.a_NavigationObjects, 1)
	IF TYPE(".a_NavigationObjects(NewRow, 1)") = "O"
		NewRow = NewRow + 1
	ENDIF
	DIME .a_NavigationObjects(NewRow, 3)

	* *** add the new navigation to the array
	.a_NavigationObjects(NewRow, 1) = THIS
	.a_NavigationObjects(NewRow, 2) = SYS(1272, THIS)
	.a_NavigationObjects(NewRow, 3) = ""
ENDWITH
as you can see i have already tried different versions. this works great for the 1st navigation object, but as soon as the first assign method finishes Vfp 6 SP5 crashes with a C0005 (or what that number is) completly.

any idea why this would'n work? i've also tried to add the class names to the SetAll() command with no success.

any ideas and thoughts are greatly appreaciated!
Next
Reply
Map
View

Click here to load this message in the networking platform