| View previous topic :: View next topic |
| Author |
Message |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Nov 25, 2003 8:45 am Post subject: problems with code in vds5 that works in vds 4.5 |
|
|
hi all,
any idea why this code works fine with vds 4.5 but with not vds 5, the items added to the list are in reverse order
| Code: |
list insert, list1, - Registration Name: %%registration_name
list insert, list1,
list insert, list1, - Program Key: @Blowfish(CryptStr,%%program_key,%%registration_name)
list insert, list1,
list insert, list1, - Password: %%password
list insert, list1,
list insert, list1, - Password Key: @Blowfish(CryptStr,%%canary_standard_password_key_seed,%%password)
list insert, list1,
|
also the following code allows me to send an email in vds 4.5 but nothing happens with vds 5
| Code: | | run mailto:@item(reg_list)?subject=%%registration_subject |
any ideas?!??
thanks in advance
serge _________________
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Tue Nov 25, 2003 12:04 pm Post subject: |
|
|
Hi,
Your first question: this is because the pointer in the list stays at the same place, so when you call 'insert' it will insert an item above those already inserted. So you should use something like:
| Code: |
list insert, 1, first item
list seek, 1, @succ(@index(1))
list insert, 1, second item
rem etc.
|
And your second problem: use 'shell' instead of 'run'.
Best regards
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Nov 25, 2003 1:14 pm Post subject: |
|
|
| Vic wrote: |
| Code: |
list insert, 1, first item
list seek, 1, @succ(@index(1))
list insert, 1, second item
rem etc.
|
|
Wouldn't a plain "list add,1,newitem" be easier??
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Nov 25, 2003 3:10 pm Post subject: |
|
|
thanks for all your answers and i gathered that the pointer wasn't moving...the help file for vds 5 says that the pointer does move...however in reality it doesn't...what is strange is that it worked fine for vds 4.5 but not for 5...i think that future versions of vds should go back to what vds 4.5 does ie. advance the pointer to the next item after inserting an item in a list...for consistency...
why does my RUN line work fine with vds 4.5 and not with 5?...has there been some changes that we don't know about between vds 4.5 and vds 5 as far as the RUN command is concerned...i looked at the vds 5 help file and found nothing to indicate a change between vds 4.5 and vds 5...again i would suggest a consistency in the use of the code...and if there has been some change, then please let us know in the help file
serge _________________
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Nov 25, 2003 3:14 pm Post subject: |
|
|
forgot...dr dread...the LIST ADD command will add items to the end of the list (unsorted list) and hence not what i need...i need to insert items at certain locations within a list
skit...there is indeed a LIST ADD command... ... i guess that if one does not use lists a lot then one will not be aware of the commands available with lists...actually, the same thing can be said about other things too eg. i don't know all the commands for using binary files because i never use them
serge _________________
|
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Nov 25, 2003 6:48 pm Post subject: |
|
|
With something as complex as VDS it's inevitable that general changes and improvements made will have occasional side effects that may not be noticed at the time. That's why major changes are only introduced with a major version change and a new name for the run-time DLL. Developers should realise that it may not be as simple as recompile and go. This kind of thing happens with most languages.
As for reverting the behaviour of VDS 5, that's not an option now. Most of the people upgrading from older versions now have probably done so and if they were affected by these changes they will already have worked around them. If you have a later version of the runtime working in a different way to the earlier one then you cause a major problem for developers who may have apps out in the field that would be broken if someone else's app replaced the version of the runtime their app was tested with with a newer version. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Tue Nov 25, 2003 7:23 pm Post subject: |
|
|
| Serge wrote: | forgot...dr dread...the LIST ADD command will add items to the end of the list (unsorted list) and hence not what i need...i need to insert items at certain locations within a list
|
That's what I meant, Dread
Regards,
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed Nov 26, 2003 8:44 am Post subject: |
|
|
| Serge wrote: | | forgot...dr dread...the LIST ADD command will add items to the end of the list (unsorted list) and hence not what i need...i need to insert items at certain locations within a list |
Aaah, OK. Just couldn't see from your question that you were injecting items into a list already holding contents.
If you were just building a new or adding at the end of an existing list, LIST ADD would've been easier.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Nov 26, 2003 8:47 am Post subject: |
|
|
no probs dr dread
thanks for your thoughts jules
serge _________________
|
|
| Back to top |
|
 |
|