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 


problems with code in vds5 that works in vds 4.5

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Nov 25, 2003 8:45 am    Post subject: problems with code in vds5 that works in vds 4.5 Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Vic D'Elfant
Past Contributor
Past Contributor


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

PostPosted: Tue Nov 25, 2003 12:04 pm    Post subject: Reply with quote

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 Very Happy
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Nov 25, 2003 1:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Nov 25, 2003 1:19 pm    Post subject: Reply with quote

There already is a "list add" command? Confused
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Nov 25, 2003 3:10 pm    Post subject: Reply with quote

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 Smile

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Nov 25, 2003 3:14 pm    Post subject: Reply with quote

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... Very Happy ... 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
View user's profile Send private message Visit poster's website MSN Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Nov 25, 2003 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Vic D'Elfant
Past Contributor
Past Contributor


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

PostPosted: Tue Nov 25, 2003 7:23 pm    Post subject: Reply with quote

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 Wink

Regards,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Nov 26, 2003 8:44 am    Post subject: Reply with quote

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


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Nov 26, 2003 8:47 am    Post subject: Reply with quote

no probs dr dread Very Happy

thanks for your thoughts jules Very Happy

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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