### Inline Java String[]

This is an example of filling a string array from a BA event.
If Java
String[] myChoices = (String[]) ba.raiseEvent(this, "getchoices");
End If
'Example setting the values directly
`Sub getchoices As String()
Dim s() As String = Array As String("656958", "753057")
Return s
End Sub`
'Example setting the values by reading from a map
`Sub getchoices As String()
Dim st As String
For i = 1 To Main.SettingsMap.Get("WOEIDS")
st = st & Main.SettingsMap.Get("WOEID" & i) & ","
Next
Return Regex.Split(",", st)
End Sub`
The map is build like:
WOEIDS=2
WOEID2=753057,Arrecife (Spain)
WOEID1=656958,Hamburg (Germany)

Changed: , Category: Inline Java, File: T6C201M1480.htm, ID: 1480