Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Assign with Object = Crash
Message
 
À
22/09/2004 00:01:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00944851
Message ID:
00944872
Vues:
18
This message has been marked as the solution to the initial question of the thread.
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!
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform