Does anyone have any insight into how the object IDs are generated in Genie?
Some of the Flash applications we are attempting to test do not seem to have fixed IDs.
Thanks,
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The algorithm of geneID generation is written in CommandsMain.as in function named helpCreateIDPart. Since in flash applications there are scenarios where objects are dynamic in nature and sometimes the objects masks the same object over and over again i.e. the previous object is not disposed but is either marked as hidden or its parent is marked as hidden due to which they are present on stage env.
If genieId of the object in question is changing that you should use the GenieLocatorInfo functionality which is meant to return the genieId of the object based on certain properties of the object. For more info see the userGuide.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
first match named Sprite/MoviClip/Shape..., using the name (mc_fooBar)
else match unamed other type, using the class name (FooBar)
Identifying an object:
first try (recursively) to get a child (cf above), then use FirstParent:::Self:::Child
else use SecondParent:::FirstParent:::Self
Index and ocurrences:
for Self and FirstParent, add index (IX, PX).
to distingish homonynous id, add a sequence (ITR, PTR)
(PTR is the first parent itr)
(ITR is incremented while the resulting id is already registered)
exemple:
MovieClip "root" {
B { C{D{E}} }
B { C{D{F{G}}} C{D{F{G}}} }
}
give names "root", "B", "C", "D", "E", "F", "G".
give ids for B/C/D/E/F:
// B distinghished by index in parent (IX)
FP^root:::SE^B:::CH^C::PX^0::PTR^0::IX^0::ITR^0
FP^root:::SE^B:::CH^C::PX^0::PTR^0::IX^1::ITR^0
// 1' 2' C distinghished by parent index (PX)
// 2' 3' C distinghished by index (IX)
FP^B:::SE^C:::CH^D::PX^0::PTR^0::IX^0::ITR^0
FP^B:::SE^C:::CH^D::PX^1::PTR^0::IX^0::ITR^0
FP^B:::SE^C:::CH^D::PX^1::PTR^0::IX^1::ITR^0
// 1' 2' D distinghished by child (CDE vs CDF)
// 2' 3' D distinghished by parent index (C1DF vs C2DF)
FP^C:::SE^D:::CH^E::PX^0::PTR^0::IX^0::ITR^0
FP^C:::SE^D:::CH^F::PX^0::PTR^0::IX^0::ITR^0
FP^C:::SE^D:::CH^F::PX^1::PTR^0::IX^0::ITR^0
// F give same id, so are distinghised by ITR
FP^D:::SE^F:::CH^G::PX^0::PTR^0::IX^0::ITR^0
FP^D:::SE^F:::CH^G::PX^0::PTR^0::IX^0::ITR^1
// G has no child, so use second parent
// G are distinghised by parent itr (PTR), so ITR is non needed
SP^D:::FP^F:::SE^G::PX^0::PTR^0::IX^0::ITR^0
SP^D:::FP^F:::SE^G::PX^0::PTR^1::IX^0::ITR^0
That said, the are special name (mainly for root).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Does anyone have any insight into how the object IDs are generated in Genie?
Some of the Flash applications we are attempting to test do not seem to have fixed IDs.
Thanks,
Mike
The algorithm of geneID generation is written in CommandsMain.as in function named helpCreateIDPart. Since in flash applications there are scenarios where objects are dynamic in nature and sometimes the objects masks the same object over and over again i.e. the previous object is not disposed but is either marked as hidden or its parent is marked as hidden due to which they are present on stage env.
If genieId of the object in question is changing that you should use the GenieLocatorInfo functionality which is meant to return the genieId of the object based on certain properties of the object. For more info see the userGuide.
Basically:
Naming an object:
Identifying an object:
Index and ocurrences:
(PTR is the first parent itr)
(ITR is incremented while the resulting id is already registered)
exemple:
MovieClip "root" {
B { C{D{E}} }
B { C{D{F{G}}} C{D{F{G}}} }
}
give names "root", "B", "C", "D", "E", "F", "G".
give ids for B/C/D/E/F:
// B distinghished by index in parent (IX)
FP^root:::SE^B:::CH^C::PX^0::PTR^0::IX^0::ITR^0
FP^root:::SE^B:::CH^C::PX^0::PTR^0::IX^1::ITR^0
// 1' 2' C distinghished by parent index (PX)
// 2' 3' C distinghished by index (IX)
FP^B:::SE^C:::CH^D::PX^0::PTR^0::IX^0::ITR^0
FP^B:::SE^C:::CH^D::PX^1::PTR^0::IX^0::ITR^0
FP^B:::SE^C:::CH^D::PX^1::PTR^0::IX^1::ITR^0
// 1' 2' D distinghished by child (CDE vs CDF)
// 2' 3' D distinghished by parent index (C1DF vs C2DF)
FP^C:::SE^D:::CH^E::PX^0::PTR^0::IX^0::ITR^0
FP^C:::SE^D:::CH^F::PX^0::PTR^0::IX^0::ITR^0
FP^C:::SE^D:::CH^F::PX^1::PTR^0::IX^0::ITR^0
// F give same id, so are distinghised by ITR
FP^D:::SE^F:::CH^G::PX^0::PTR^0::IX^0::ITR^0
FP^D:::SE^F:::CH^G::PX^0::PTR^0::IX^0::ITR^1
// G has no child, so use second parent
// G are distinghised by parent itr (PTR), so ITR is non needed
SP^D:::FP^F:::SE^G::PX^0::PTR^0::IX^0::ITR^0
SP^D:::FP^F:::SE^G::PX^0::PTR^1::IX^0::ITR^0
That said, the are special name (mainly for root).