| View previous topic :: View next topic |
| Author |
Message |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Sat Jun 29, 2002 11:04 am Post subject: Lists |
|
|
How can I move an item of a list one place up or down _________________ phpBB Development Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Jun 29, 2002 10:12 pm Post subject: |
|
|
Here's the steps:
LIST SEEK to the item you want moved...
Copy @item(ListName) to a var...
LIST DELETE...
LIST SEEK to the position you want it inserted...
LIST INSERT, ListName, %%var
Remember that when you delete an item, the item index numbers
change from that point to the end of the list. So make sure you have
the correct index number to insert the item.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jun 30, 2002 4:05 pm Post subject: |
|
|
Cool Mac, I didn't know it's possible to use the LIST INSERT command like that, this is very useful.
It's a small error in the VDS documentation, making it seem you could only insert empty items:
"LIST INSERT,<list>"
Tommy |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jun 30, 2002 7:14 pm Post subject: |
|
|
All this info is in the example that was linked to above. It shows you how to move list items up and down, remove and add.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Jun 30, 2002 9:54 pm Post subject: |
|
|
Tommy, I actually had no idea that the VDS help
file had omitted that. I must have just assumed
that LIST INSERT would follow the common usage
of the other LIST commands. Now I'm really glad
I posted it though.
BTW Garrett, I wasn't trying to steal your thunder...
But how many long time VDS users (like Tommy) would
have downloaded your example? I know I didn't.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jul 01, 2002 2:07 am Post subject: |
|
|
No, not thunder, just didn't want you to dissuade someone from actually downloading the example. It's an oldy moldy example and probably poorly written, but it does show the basics of manipulating the lists.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Jul 01, 2002 5:03 pm Post subject: |
|
|
Garrett, my intention wasn't to dissuade anyone from
dloading your example. I just hate to dload stuff myself
if I can avoid it, and I figured if anyone needed further
instructions they'd get your example anyway. No harm
intended whatsoever.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|