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 


10 bugs

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
mmatica
Newbie


Joined: 03 Dec 2004
Posts: 12

PostPosted: Mon Feb 07, 2005 12:50 pm    Post subject: 10 bugs Reply with quote

Here are some bugs I have found in VDS5. Some of them are probably known.


1. The initial value in the CALENDAR dialog element is ignored;
the current date is considered.

2. For arithmetic integer function (@MOD, @ADD, ...)
the @OK flag is not set always to "" after an error

3. In @FILE, if the attributes contains H/S/N and D is absent,
one cannot use wildcards correctly

4. path\name of a .dsc file cannot contain "(" or ")"

5. A user function/command name must not be a starting substring
of a system fnc/cmd!
E.g., @fe(1) will return @FEXP(1) even if
#define function,fe
is declared!
The same for cmds, e.g.
#define command,titl

6. [INSERT(...)], [ADD(...)], [LINE(...)] do not work in DDE EXECUTE

7. In @FORMAT(expr, m.d) m is ignored

8. @INDEX acts differently for data lists and control lists.
For example, after a LIST INSERT, the index is increased for control
lists but remains unmodified for data lists.
The same for other LIST commands.

9. In TRACKBAR for style=VER, val=100-valini (after that is ok)

10. The event generated by TASKICON should be nameICON according
to the documentation but it is nameCLICK.


Best regards,
M.
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


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

PostPosted: Mon Feb 07, 2005 4:02 pm    Post subject: Re: 10 bugs Reply with quote

mmatica wrote:
1. The initial value in the CALENDAR dialog element is ignored;
the current date is considered.

The documentation is incorrect but the implementation is also, frankly, bizarre. This will be changed in VDS 6 so you can set it, or get the result, using an @DATETIME compatible floatng point value.

mmatica wrote:
2. For arithmetic integer function (@MOD, @ADD, ...)
the @OK flag is not set always to "" after an error

This is another documentation error. I have been finding quite a few similar. The value of OK is not changed and a fatal error "invalid value" will occur if the value supplied is not a number.

mmatica wrote:
3. In @FILE, if the attributes contains H/S/N and D is absent,
one cannot use wildcards correctly

The problem is that the documentation does not explain how it does work adequately. I don't know how to explain it either. Hopefully it will be explained clearer, but it would cause too many problems to change the behavior, because most people are used to the way it works at the moment.
mmatica wrote:
4. path\name of a .dsc file cannot contain "(" or ")"

I think this has been brought up before. It's an error in the way the DDE command strings have been set up in the registry without quotes round the filename strings.
mmatica wrote:
5. A user function/command name must not be a starting substring
of a system fnc/cmd!
E.g., @fe(1) will return @FEXP(1) even if
#define function,fe
is declared!
The same for cmds, e.g.
#define command,titl

Yes, it's a function of the way the interpreter works. It won't be a problem in VDS 6 which tokenizes the internal commands or functions so there can't be a name conflict.

mmatica wrote:
6. [INSERT(...)], [ADD(...)], [LINE(...)] do not work in DDE EXECUTE


Don't know about that, I don't suppose many people have even tried using it...

mmatica wrote:
7. In @FORMAT(expr, m.d) m is ignored


It certainly isn't ignored. It's being passed to the function that does the formatting, but perhaps this isn't working in the way you expect.

mmatica wrote:
8. @INDEX acts differently for data lists and control lists.
For example, after a LIST INSERT, the index is increased for control
lists but remains unmodified for data lists.
The same for other LIST commands.

I'm not sure what you mean by data and control lists. If you can clarify, I can try and ensure it is made clear in the help file. Unfortunately, it would not be possible to change the behavior without causing problems with older programs.

mmatica wrote:
9. In TRACKBAR for style=VER, val=100-valini (after that is ok)

Don't understand, sorry.

mmatica wrote:
10. The event generated by TASKICON should be nameICON according
to the documentation but it is nameCLICK.

Again, this is a documentation error. It has been nameCLICK ever since VDS has supported a task icon.

Many thanks for pointing out these problems. As I am currently going through the help file trying to reconcile it with the program, it has been most helpful.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
mmatica
Newbie


Joined: 03 Dec 2004
Posts: 12

PostPosted: Mon Feb 07, 2005 6:15 pm    Post subject: Reply with quote

Helo Jules,
my comments to your post are inside the following script:

Code:

rem  It seems that for @index the result is correct in VDS5.
rem  I have extrapolated from VDS4.x
rem  (where the second INFO in the script gives:  index2=1  indexlist1=2).
rem  However the initial values for @index are still different.
rem  The problem with TRACKBAR is illustrated in the script.
rem  For @FORMAT(expr,m.d) I could not find any situation where m is effectively considered!
rem  (see the script)


Title test
  DIALOG CREATE,New Dialog,-1,0,354,244
  DIALOG ADD,TRACKBAR,tb,45,34,43,151,20,,,VERTICAL
  DIALOG ADD,LIST,LIST1,32,129,180,144
  DIALOG SHOW

list loadtext,list1
"e0
"e1
"e2
list create,2
list loadtext,2
"e0
"e1
"e2
info initially: index2=@index(2)  indexlist1=@index(list1)
list seek,list1,1
list seek,2,1
list insert,list1,e1bis
list insert,2,e1bis
info index2=@index(2)  indexlist1=@index(list1)
 
:Evloop
  wait event
  goto @event()
:Close
  %a =@format(10.33,7.1)
  %b =@format(10.33,1.1)
  %c =@format(10.33,4.1)
  info a=%a b=%b c=%c   a=b:@equal(%a,%b)    b=c:@equal(%b,%c)
  info tb=@dlgtext(tb) [80 instead of 20]
  exit


Best regards,
M
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Feb 07, 2005 9:17 pm    Post subject: Reply with quote

Mmatica,

The list operations appear normal. A displayed list will return an index of -1 (negative one) if nothing is selected...

Jules,

The @format function does not appear to truncate the integer portion of a floating point number when passed a number in which the quanity of digits passed exceeds the format value.

The trackbar element, when defined as vertical, sets the bar at 20, referenced from the top, but passes the value, when queried, as 80 (apparently now referenced from the bottom). This element appears to operate correctly when created in the horizontal position.

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


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

PostPosted: Tue Feb 08, 2005 11:39 am    Post subject: Reply with quote

I'm looking at these now.

The thing to remember is that visible elements like list boxes and invisible string lists are two completely different things. They are implemented by completely separate code. List boxes are Windows controls and they are worked with by sending messages to Windows and getting results back. String lists are implemented within VDS itself. So there are likely to be differences. It isn't even guaranteed that Windows list boxes behave the same in all versions of Windows.

As Hooligan says, the initial setting is correct. -1 is the value a list element returns when no item is visibly selected. A string list does not support the concept of being visibly selected, so the initial value is 0, the first element.

The second one is weird. Although you state that VDS 5 is "correct" because the index returned is the same in both cases, it looks to me as if the value of the list box is wrong because although it is returning 1, the third item (item 2) is the one that appears selected. I've traced through this in the code, and the value 1 is what is being returned by Windows in response to the LB_GETCARETINDEX message, under Windows XP at least.

On the whole, I think it is better to leave things as they are, because if anyone has written code that depends on this behavior it will probably be broken if we change it.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


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

PostPosted: Tue Feb 08, 2005 12:20 pm    Post subject: Reply with quote

The @format function does not truncate the integer portion of a number if the total length exceeds the number stated. I have never come across a formatting function that did so. The specification of the underlying function that it calls, states that the first number is the minimum number of characters for the formatted value. If right justified, it would be padded out with spaces. The problem is that the function is called in a way that gives a left justified result, so the first digit is, effectively, meaningless. I could easily change this for VDS6.

The last item regarding the trackbar is clearly an error when setting the initial value.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


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

PostPosted: Mon Feb 21, 2005 1:37 pm    Post subject: Re: 10 bugs Reply with quote

mmatica wrote:

6. [INSERT(...)], [ADD(...)], [LINE(...)] do not work in DDE EXECUTE


Just tested this and it appears to work to my satisfaction. Therefore unless anyone can produce some code that demonstrably ought to work but doesn't, no changes will be made.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports 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