Set Alias (SetAlias)
15 Mai 2012 um 2:39 pm #21554dineshMitglied
I am facing a problem related to alias. I have an Alias Table declared in Screen Properties. and I want to access those aliases in my basic script on calling of a function. So I have written a function:
‚function starts here
Public Function LoadFunctionScreen()
Dim i As Byte
For i = 1 To 6
SetAlias(‚Line‘ & i, ‚Display‘ & i )
In this function ‚Line‘ is an Alias for a variable ‚Display‘
But i am getting an error while running this code ‚ Expecting an already dimensioned array‘ and it points me to the 4th line of the function.
‚Small thing I forgot to mention is that, Can I access Alias in MAIN BASIC SCRIPT, instead of object’s(or screen’s) basic script?‘
Thanks in advanced!
16 Mai 2012 um 9:50 am #21555acampagnaMitglied
your last note is the first thing I want to ask you: so your function is declared into a Script Resource Object and not directly into a Screen or Object script.
The answer is YES, you can reach the Aliases table from a Script resource but you have to reference the desired screen before to call a ’screen method‘ by the script.
This because the ‚SetAlias‘ function is proper of the ‚SynopticCmdTarget‘ script interface and you cannot use it as a general function.
For example you can use this syntax:
Dim myscreen As SynopticCmdTarget
Set myscreen = GetSynopticInterface(‚MyScreenName‘)
Set myscreen = Nothing
NOTE: The screen you are referring inside the script MUST be already opened or loaded in RAM. If not, you will receive the error ‚Object Is Nothing‘ when you refer the screen object into the script.
16 Mai 2012 um 1:42 pm #21556dineshMitglied
Thank you very much Antonio.
Yes, you are right. My function is declare in SCRIPT RESOURSE CODE, not in OBJECT or SCREEN SCRIPT CODE.
I think that’s my answer. The same thing I was trying to do. But It seems ‚GetSynopticInterface()‘ is not supported to WinCE. Also i noticed that it works good on my Computer in simulation mode (ALT+F12), but as i download this program in my device it gives me some kind od error.
Do you suggest me to do same thing but on WinCE platform. I would not mind in case if i have to declare the function in OBJECT or SCREEN script code directly but without using EVENTS since events makes it work slower.
15 März 2019 um 11:26 am #31542QuiaquosmoTeilnehmer
This will be set with the some information to getting from the chapter of the nuclear chapters to come first as more important. Functions are for the declared by the access of the alias to be confirm from the australianwritings while to unregister of the reduction while catching.
Du musst angemeldet sein, um auf dieses Thema antworten zu können.