Code: Alles auswählen
Structure Props
Name.s
;.....
EndStructure
Structure Obj
to_Props.i
;.........
EndStructure
Define Obj1.Obj
Define Prop1.Props
Obj1\to_Props=@Prop1 ; Koppelung Obj1-->Prop1 speichern
Code: Alles auswählen
Structure Props
Name.s
;.....
EndStructure
Structure Obj
to_Props.i
;.........
EndStructure
Define Obj1.Obj
Define Prop1.Props
Obj1\to_Props=@Prop1 ; Koppelung Obj1-->Prop1 speichern
Code: Alles auswählen
EnableExplicit
Structure Props
Name.s
EndStructure
Structure Obj
to_Props.i
Prop1.Props
EndStructure
Define Obj1.Obj
Obj1\Prop1\Name = "hallo"
Debug Obj1\Prop1\Name
Code: Alles auswählen
EnableExplicit
Structure Props
Name.s
EndStructure
Structure Obj
to_Prop.Props
EndStructure
Define Obj1.Obj,Prop1.Props
Prop1\Name="Hallo" ;Eigenschaft von Prop1 festlegen
Obj1\to_Prop=Prop1 ;Prop1 an Obj1 koppeln
Debug Obj1\to_Prop\Name ;Zugriff von Obj1 auf die Daten des angekoppelten Prop1
Code: Alles auswählen
EnableExplicit
Structure Props
Name.s
EndStructure
Structure Obj
*to_Prop.Props
EndStructure
Define Obj1.Obj,Prop1.Props
Prop1\Name="Hallo" ;Eigenschaft von Prop1 festlegen
Obj1\to_Prop=Prop1 ;Prop1 an Obj1 koppeln
Prop1\Name + " World"
Debug Obj1\to_Prop\Name ;Zugriff von Obj1 auf die Daten des angekoppelten Prop1
Code: Alles auswählen
EnableExplicit
Structure Props
Name.s
EndStructure
Structure Obj
*to_Prop.Props
EndStructure
Procedure kopple(*Objekt.Obj,*Propos.Props)
*Objekt\to_Prop=*Propos
EndProcedure
Define Obj1.Obj,Prop1.Props
Prop1\Name="Hallo" ;Eigenschaft von Prop1 festlegen
kopple(@Obj1,@Prop1)
Prop1\Name + " World"
Debug Obj1\to_Prop\Name ;Zugriff von Obj1 auf die Daten des angekoppelten Prop1
Code: Alles auswählen
Debug Obj1\to_Prop\Name
Debug Obj1\to_Prop\Alter
Debug Obj1\to_Prop\Breite
Code: Alles auswählen
If Obj1\to_Prop
Debug Obj1\to_Prop\Name
Debug Obj1\to_Prop\Alter
Debug Obj1\to_Prop\Breite
Else
Debug "Obj1" hat keine gültigen Eigenschaften!"
EndIf