..optional, something like ResetList(list(),-1).
would be nice for reverse iterating with While
a parameter for ResetList() to seek behind end
why does ChangeCurrentElement() not return something usefull, like the former element.
then instead of thatyou could write
then instead of that
Code: Select all
*remember = @list()
ChangeCurrentElement(list(),*parent)
;...do something at another position
ChangeCurrentElement(list(),*remember)
Code: Select all
*remember = ChangeCurrentElement(list(),*parent) ; returns the address of the former element
;...do something at another position
ChangeCurrentElement(list(),*remember)
> ResetList(list(),-1)
well, it would be usefull if PreviousElement() would automatically jump to the last element if there is no current element selected (-1). no need for an extra flag in ResetList() imo.
> ChangeCurrentElement()
yes, thats something i also noticed. would be cool if it would return the pointer of the former element, but only if the change was successfull, otherwise return 0.
and also a #True/#False for SwapElements() maybe? in case of an invalid pointer, instead of an invalid memory access error. just an idea.
c ya,
nco2k
well, it would be usefull if PreviousElement() would automatically jump to the last element if there is no current element selected (-1). no need for an extra flag in ResetList() imo.
> ChangeCurrentElement()
yes, thats something i also noticed. would be cool if it would return the pointer of the former element, but only if the change was successfull, otherwise return 0.
and also a #True/#False for SwapElements() maybe? in case of an invalid pointer, instead of an invalid memory access error. just an idea.
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
I think this is a great idea.why does ChangeCurrentElement() not return something usefull, like the former element.

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system