Errormessage since v6.90 with Polygon

Stellaferox

Active Member
Licensed User
Hi,

Since version 6.90 I get an errormessage with the function (F)Polygon. Previous versions gave no problem.
It seems as though it cannot see the ArrayLists that fill the polygon. Exampleprogs attached. What happened?
Can someone help?
thnx,
Marc
 

Attachments

  • Galton Extended.sbp
    9.2 KB · Views: 233
  • DrawThickLine.sbp
    1.2 KB · Views: 233

agraham

Expert
Licensed User
Longtime User
In version c6.90 Polygon appears to only accept Arrays and structures of type String or Number/Double and not ArrayLists. I don't know if this is a deliberate design decision as a result of adding typed variables or an oversight but I am afraid you will need to use arrays instead of ArrayLists.


EDIT: - The constraint only exists in the IDE, compiled it is fine so I guess it's a bug.
 

Stellaferox

Active Member
Licensed User
Hi Agraham,

Not sure if that is the problem because attached program (which calculates the fastest path down a track) designed with 6.90 from the start doesnot have this issue though it works with a polygon as well filled also by ArrayLists.
Marc
 

Attachments

  • $$$VectorRace.sbp
    13 KB · Views: 265

agraham

Expert
Licensed User
Longtime User
it works with a polygon as well filled also by ArrayLists.
I can't see any calls to either of the Polygon methods in that code :confused:. However I have looked at the Basic4ppc IDE code for Polygon with Reflector and it does appear to have the limitation of only using arrays.
 

Stellaferox

Active Member
Licensed User
You're right. I forgot that I stripped the code and used multiple line segments. OK, I will try the array-approach. Funny though that is hasn't been noticed until now.
thanx for your time.
Marc
 

chanppc

Member
Licensed User
You're not the only one, I did a program update last night & face similar issue at the declaration before drawing line, seems like I need test out the array approach as well.

Dim Dashes(1,2) As Int32
 

Stellaferox

Active Member
Licensed User
Just an update. Changing the Arraylists to Arrays works fine!
Did I miss the notification at the date of release?
Marc
 

chanppc

Member
Licensed User
On my case, I need to declare the type at global. This could be due to the stronger type checking in 6.9 I think.

Dim Type (Dash, Space) Dashes(0) As Int32 <<- previously without the "As Int32" but working
...
Dim Dashes(1,2) As Int32
 
Top