Skip to content

Incorrect handling of tags with same name as methods of node class #18

Description

@BranoFabry

I am using Lua 5.3 in a daw Reaper.

This xml will not be parsed:

<name>text</name>

I see the problem might be here

function node:addChild(child)
   if self[child:name()] ~= nil then
       if type(self[child:name()].name) == "function" then			
            local tempTable = {}
            table.insert(tempTable, self[child:name()])
            self[child:name()] = tempTable
       end
       table.insert(self[child:name()], child)
   else			
       self[child:name()] = child
   end
   table.insert(self.___children, child)

end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions