AKET

EditVariable method buggy

1 post in this topic

There appear to be bugs with the EditVariable method that are not documented anywhere. 

Firstly code below will not work and at same time Sysmac will not report this as an error where the variable to be edited is declared inside a subroutine. The program will compile fine but keypad will not appear when the sub is executed. However, if the variable is declared in the Global Variables table, the keypad will appear and the variable can be edited. I have also tried declaring the variable as Public out side of the subroutine and keypad still fails to appear.

Sub EditValue
    Dim Index As UShort

    EditVariable("Index")
End Sub

Second issue is that EditVariable will not work if the variable to be edited is an array using variable as the index into the array. For example EditVariable("myArray(Index)") will not work whereas EditVariable("myArray(1)") will work.

The above issue also appears when using a DataEdit object and trying to use an array with a variable as the index as the variable of the data edit object. Stupid thing about this is that MinimumValue and MaximumValue fields in the same DataEdit object will take an array with a variable as the index.

Has anyone found a way around these problems?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now