[SOLVED] XmlDocument - unknown identifier error
Posted
#1
(In Topic #1325)
Trainee
Sorry for the newbie question.
Started a project that reads xml files into a TreeView:
Code
Use "gb.xml"
Public Sub Form_Open()
LoadProjectView(TreeView1, "path-to-xml-file")
End
Private Sub LoadProjectView(ProjectView As TreeView, ProjectFile As String)
ProjectDoc = New XmlDocument ' <-- Error here: Unknown identifier: XmlDocument
ProjectDoc.Open(ProjectFile)
End
What am I missing?
TIA
Posted
Guru

The "Use" keyword is intended only for making gbs3 script files and cannot be used in a normal project to load a component.
Posted
Regular

Code (gambas)
- "Use <component>"
Research how the project configuration works or "Component.Load"
Posted
Regular

Posted
Trainee
BruceSteers said
You must add gb.xml to the project components using the project properties page in the IDE (Ctrl-I)
The "Use" keyword is intended only for making gbs3 script files and cannot be used in a normal project to load a component.
Thanks for answering. Next dumb question: Which component should I use for XmlDocument? There's no "gb.xml" on the list.
Posted
Trainee
ForeverNoob said
BruceSteers said
You must add gb.xml to the project components using the project properties page in the IDE (Ctrl-I)
The "Use" keyword is intended only for making gbs3 script files and cannot be used in a normal project to load a component.
Thanks for answering. Next dumb question: Which component should I use for XmlDocument? There's no "gb.xml" on the list.
Found it. Had to install gambas-gb-xml from repos. Thanks for help.
Posted
Guru

And after a recent discussion on the M/L it turns our the "Use" keyword actually CAN be used in a normal project and acts just like Component.Load()
It's apparently been that way for 10 years but nobody updated the wiki lol
1 guest and 0 members have just viewed this.


