Skip to content

Commit

Permalink
Fixed bugs on some GetInt/GetSmallInt proxy actions; fixed read_json …
Browse files Browse the repository at this point in the history
…and read_rss context being inverted
  • Loading branch information
Antaniserse committed Nov 18, 2016
1 parent db5553c commit c127d82
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 94 deletions.
4 changes: 2 additions & 2 deletions VAExtensions/ContextHandlers/ContextFactory.vb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<EnumInfo("Read an XML File", "read_xml")>
ReadXml
<EnumInfo("Read a RSS feed", "read_rss")>
ReadJSON
<EnumInfo("Read a JSON feed", "read_json")>
ReadRSS
<EnumInfo("Read a JSON feed", "read_json")>
ReadJSON
<EnumInfo("Loads a CSV file in memory", "load_csv")>
LoadCSV
<EnumInfo("Read a value from a previously loaded CSV file", "read_csv")>
Expand Down
2 changes: 1 addition & 1 deletion VAExtensions/ContextHandlers/ContextHandlerCountdown.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
For i = 0 To 9
key = String.Format("{0}{1}", App.KEY_TIMER, i)
If VAProxy.GetInt(key) IsNot Nothing Then
countDownList.Add(key, VAProxy.GetInt(key).Value)
countDownList.Add(key, VAProxy.GetInt(key))
End If
Next

Expand Down
2 changes: 1 addition & 1 deletion VAExtensions/ContextHandlers/ContextHandlerRandom.vb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Return False
Else
Dim numberList As New List(Of Int32)
For n As Int16 = VAProxy.GetInt(App.KEY_RANGEMIN).Value To VAProxy.GetInt(App.KEY_RANGEMAX).Value
For n As Int16 = VAProxy.GetInt(App.KEY_RANGEMIN) To VAProxy.GetInt(App.KEY_RANGEMAX)
numberList.Add(n)
Next
numbers = numberList.OrderBy(Function(s) Guid.NewGuid()).ToArray
Expand Down
6 changes: 3 additions & 3 deletions VAExtensions/ContextHandlers/ContextHandlerReadRSS.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
VAProxy.SetText(App.KEY_RESULT, String.Format("Unknown file name. Text variable '{0}' not set.", App.KEY_FILE))
Return False
End If
If VAProxy.GetSmallInt(App.KEY_INDEX) Is Nothing OrElse VAProxy.GetSmallInt(App.KEY_INDEX).Value < 1 Then
If VAProxy.GetSmallInt(App.KEY_INDEX) Is Nothing OrElse VAProxy.GetSmallInt(App.KEY_INDEX) < 1 Then
elementCount = 1
Else
elementCount = VAProxy.GetSmallInt(App.KEY_INDEX).Value
elementCount = VAProxy.GetSmallInt(App.KEY_INDEX)
End If
If VAProxy.GetText(App.KEY_REGEX) IsNot Nothing Then
regexPattern = VAProxy.GetText(App.KEY_REGEX)
Expand Down Expand Up @@ -71,7 +71,7 @@
If i > elementCount Then Exit For
Next
VAProxy.SetText(App.KEY_RESULT, App.LimitResponse(result, regexPattern))
VAProxy.SetSmallInt(App.KEY_INDEX) = elementCount + 1S
VAProxy.SetSmallInt(App.KEY_INDEX, elementCount + 1S)
Else
VAProxy.SetSmallInt(App.KEY_ERROR, ERR_ARGUMENTS)
VAProxy.SetText(App.KEY_RESULT, String.Format("Element not found: '{0}'", VAProxy.GetText(App.KEY_ARGUMENTS)))
Expand Down
4 changes: 2 additions & 2 deletions VAExtensions/ContextHandlers/ContextHandlerReadXML.vb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
Else
elementPath = {}
End If
If VAProxy.GetSmallInt(App.KEY_INDEX) Is Nothing OrElse VAProxy.GetSmallInt(App.KEY_INDEX).Value < 1 Then
If VAProxy.GetSmallInt(App.KEY_INDEX) Is Nothing OrElse VAProxy.GetSmallInt(App.KEY_INDEX) < 1 Then
elementCount = 1
Else
elementCount = VAProxy.GetSmallInt(App.KEY_INDEX).Value
elementCount = VAProxy.GetSmallInt(App.KEY_INDEX)
End If

Try
Expand Down
83 changes: 0 additions & 83 deletions VAExtensions/Profiles/_test-Profile.html

This file was deleted.

3 changes: 1 addition & 2 deletions VAExtensions/VAExtensions.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<DocumentationFile>VAExtensions.xml</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>
</DefineConstants>
<DefineConstants>SHOW_DEBUG_UI=true</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down

0 comments on commit c127d82

Please sign in to comment.