Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Assign with Object = Crash
Message
From
22/09/2004 11:29:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00944851
Message ID:
00945018
Views:
26
Hello Martin.

Thank you for your reply - it worked great.

Now the 1,254,395.25 $ question: why does the SetAll() in combination of passing an object crash like that?

But hey - its working - thats what counts <s>

Thanks again!



>And crashed in VFP 7.0/8.0 too.
>
>You can create PUBLIC variable and link it:
>
>
>LOCAL lcName
>lcName=SYS(2015)
>PUBLIC (lcName)
>STORE This TO (lcName)
>This.Parent.SetAll("NavigationsReportToMaster", lcName)
>RELE (lcName)
>
>
>LPARAMETERS vNewVal
>*To do: Modify this routine for the Assign method
>THIS.NavigationsReportToMaster = EVAL(vNewVal)
>* *** also tried this without the following 2 lines
>vNewVal = .null.
>release vNewVal
>
>
>MartinJ
>
>>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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform