Re: [Bug 1014] New: size field doesn't get filled in when creating a string[] variable fromtab
Dominick Vanthienen <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <[email protected]> |
a resize before adding elements solves the problem however the array can be filled in without resizing On 12/10/2012 06:09 PM, nick vanthienen wrote: > > http://bugs.orocos.org/show_bug.cgi?id=1014 > > Summary: size field doesn't get filled in when creating a > string[] variable fromtab > Product: Toolchain > Version: 2.5.0 > Platform: All > OS/Version: All > Status: NEW > Severity: major > Priority: P3 > Component: Lua > AssignedTo: [email protected] > ReportedBy: [email protected] > CC: [email protected] > Estimated Hours: 0.0 > > > Hi, > > I have a table: tab={"youbot", "ceiling"} that I want to transform to a > string[] rtt variable with: > > > function tab2stringtab(tab) > local output = rtt.Variable("string[]") > for i, v in ipairs(tab) do print("input: "..v) end > output:fromtab(tab) > print(output[1]) > print(output.size) > return output > end > > what it returns: > > input: youbot > input: ceiling > ceiling > 0 > > =>there is something in the ouput, but the size is not correct > > nick > -- Orocos-Dev mailing list [email protected] http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev