Difference between revisions of "Gambas/flaws/bugs"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Gambas‎ | flaws
Jump to navigation Jump to search
(Created page with "==XmlElement attribute enumeration== This code: <gambas>Public Sub BugTest() Dim Node As New XmlElement Dim xmlAttr As Variant Dim xAttrs As Variant ' set up some att...")
 
(note about incorrect type)
 
Line 19: Line 19:
  
 
[[File:2015-06-04 17-31-05 screenshot of Gambas error 1.png]]
 
[[File:2015-06-04 17-31-05 screenshot of Gambas error 1.png]]
 +
 +
It should also be noted that in the line just before the bug occurs, the Gambas IDE reports that "xAttrs" is an XmlElement -- but according to the [http://gambaswiki.org/wiki/comp/gb.xml/xmlnode/attributes documentation for XmlElement.Attributes], it should be ".XmlElementAttributes".

Latest revision as of 21:39, 4 June 2015

XmlElement attribute enumeration

This code: <gambas>Public Sub BugTest()

 Dim Node As New XmlElement
 Dim xmlAttr As Variant
 Dim xAttrs As Variant
 ' set up some attributes
 Node.SetAttribute("attr1", "a value")
 Node.SetAttribute("attr2", "another value")
 xAttrs = Node.Attributes
 For Each xmlAttr In xAttrs
   ' the FOR EACH gives an error: "The program has returned the value: 1"
 Next

End</gambas>

...produces this error:

2015-06-04 17-31-05 screenshot of Gambas error 1.png

It should also be noted that in the line just before the bug occurs, the Gambas IDE reports that "xAttrs" is an XmlElement -- but according to the documentation for XmlElement.Attributes, it should be ".XmlElementAttributes".