forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Lists

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sat Jun 29, 2002 11:04 am    Post subject: Lists Reply with quote

How can I move an item of a list one place up or down
_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 29, 2002 12:34 pm    Post subject: Lists Reply with quote

You can have a look at an example that Garrett made at:
http://www.vdsworld.com/index.php?page=download&fileid=96

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Jun 29, 2002 10:12 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Jun 30, 2002 4:05 pm    Post subject: Reply with quote

Cool Mac, I didn't know it's possible to use the LIST INSERT command like that, this is very useful. Very Happy

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
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jun 30, 2002 7:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Jun 30, 2002 9:54 pm    Post subject: Reply with quote

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. Smile

BTW Garrett, I wasn't trying to steal your thunder... Wink
But how many long time VDS users (like Tommy) would
have downloaded your example? I know I didn't.

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jul 01, 2002 2:07 am    Post subject: Reply with quote

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. Smile

-Garrett
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Jul 01, 2002 5:03 pm    Post subject: Reply with quote

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. Embarassed

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group