Here is the code I am using in the label function. Some of the values are numbers and some are strings. It works:
private function getLabel (area:AreasVO):String
{
return "Area Name: " + area.areaName + " " + area.areaWidth + " X " + area.areaLength + " X " + area.areaHeight;
}
It produces: Living Room 14 x 12 x 9
In the message function, I want to mix some computations and strings…can’t figure it out. The AreasVO has all the measurements as Type:Number So I can do something like this
private function getMessage (area:AreasVO):Number
{
return area.areaWidth x areaLength;
}
That will give me the area of the ceiling or floor…
What I want is to have this returned:
Totals for Living Room: Area of Ceiling = 144, LF of Walls = 64, SF of Walls = 642
When I try something like this:
private function getMessage (area:AreasVO):Number
{
return "Totals for Living Room: Area of Ceiling = " + area.areaWidth x areaLength;
}
I just get error upon error…Numbers as Strings or a bunch of others…How do I do this?
Enclose the bits of math you want to happen within parenthesis like this:
Or
[In your AreasVO]
then in the original file