[Bug 1014] New: size field doesn't get filled in when creating a string[] variable fromtab

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: orocos-dev [..] ...
ReportedBy: dominick [dot] vanthienen [..] ...
CC: orocos-dev [..] ...
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

[Bug 1014] size field doesn't get filled in when creating a stri

http://bugs.orocos.org/show_bug.cgi?id=1014

Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |markus [dot] klotzbuecher [..] ...
| |leuven.be
Resolution| |WORKSFORME

[Bug 1014] New: size field doesn't get filled in when creating a

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: orocos-dev [..] ...
> ReportedBy: dominick [dot] vanthienen [..] ...
> CC: orocos-dev [..] ...
> 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
>