ForEach MyList() As *MyListElement
Re: ForEach MyList() As *MyListElement
+1!
Or you can use the syntax like in Python:
In the meantime i use a macro:
I put the Macro into a resident file so it is available all the time.
Best regards,
Uwe
Or you can use the syntax like in Python:
Code: Select all
ForEach *pointer.MyListStruct In MyList()
Code: Select all
Macro Item(Object, ListOrMap)
ListOrMap
Object=ListOrMap
EndMacro
Structure Person
Name.s
Age.i
EndStructure
NewList Persons.Person()
AddElement(Persons())
Persons()\Name = "Jim"
Persons()\Age = 30
ForEach Item(*p.Person, Persons())
Debug *p\Name + " is " + *p\Age + " years old"
Next
Best regards,
Uwe
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
Re: ForEach MyList() As *MyListElement
+1 and
As I already had a request and don't wont to create an endless list... I think this one adds up here nice.
ForEach GadgetType()
(case #PB_GadgetType_Button : change color, change text (language), change center etc.)
As I already had a request and don't wont to create an endless list... I think this one adds up here nice.
ForEach GadgetType()
(case #PB_GadgetType_Button : change color, change text (language), change center etc.)
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.