http://www.b4x.com/forum/basic4andr...ynchronous-asynchronous-just-plain-krazy.html
That helped a little for a specific scenario.. but I have another situation where I am making several repeated calls to Http Util2.
These several calls operate on the contents of a list one element at a time.
But two or three manipulations are done to each object. -- THATS Three seperate Calls to Three Separate HttpUtil2 methods per object in sequence
And again these must be done in order..
example I have a list of Wiggles, each Wiggle must be painted, stamped and renumbered with a special tag.
I have to process each Wiggle from my lstWiggles and send each one through THREE separate Calls to HttpUtils2..
Of course as it is presently structured the job_done isn't finished for the paint method callwhen its already trying to do the stamped and renumbered method calls to HttpUtils2..etc etc..
Please advise
thank you .. Heres my failed attempts in code as I have tried the Job done as well as a sub to house all the calls as they are called from the Activity_Create all to no avail Thank you
Specific example Addendum a getNextorder requested from the webService
returns to me an orderId back but the Web Service also creates an entry in a SQL table with the orderID it provided me .... unless I can perform my operations on this returned data in sequence the next call to the web service returns the SAME orderID and it of course writes a duplicate to the table with the same orderID...
HttpUtil1 did not behave like this
That helped a little for a specific scenario.. but I have another situation where I am making several repeated calls to Http Util2.
These several calls operate on the contents of a list one element at a time.
But two or three manipulations are done to each object. -- THATS Three seperate Calls to Three Separate HttpUtil2 methods per object in sequence
And again these must be done in order..
example I have a list of Wiggles, each Wiggle must be painted, stamped and renumbered with a special tag.
I have to process each Wiggle from my lstWiggles and send each one through THREE separate Calls to HttpUtils2..
Of course as it is presently structured the job_done isn't finished for the paint method callwhen its already trying to do the stamped and renumbered method calls to HttpUtils2..etc etc..
Please advise
thank you .. Heres my failed attempts in code as I have tried the Job done as well as a sub to house all the calls as they are called from the Activity_Create all to no avail Thank you
B4X:
' sub AssimililateOrders is called conditionally from Activity_create
'when I need to harvest orders based upon a scan from an handheld scanner---
' next loop when bLocationScanValidated = true
If bMapLocOrderListCreated = False Then
' Boolean Toggle True When iRemainderBins decremented to 0
AssimililateOrders 'GetNext Order & Assign Order to Cart --> into recall Activity_Create(False)
End If
Else
bMapLocOrderListCreated = True
Sub AssimililateOrders()
intCurrentBinNo = lstOrders.Size
' If intCurrentBinNo < MAX_BIN_COUNT Then
If lstOrders.Size > 0 Then
If iRemainderBins > 0 Then
DoEvents
GetNextOrder 'cycle this until MAX_BIN_COUNT
DoEvents
CalculateNextAvailablePosition
DoEvents
AssignOrderToCart
DoEvents
End If
End If
End Sub
B4X:
' section of job done in select case statement
#Region------------{ GetNextOrder }--------------------
Case "GetNextOrder"
iStream = Job.GetInputStream() 'PostGetNextOrder
GetNextOrderParser.Initialize
If iStream.BytesAvailable > 0 Then
GetNextOrderParser.Parse(iStream, "GetNextOrderParser") '
Else
Msgbox("Http GetNextOrderParser ERROR: " & CRLF & LastException.Message, "GetNextOrderParser")
End If
DoEvents
'DebugInfo
' CalculateNextAvailablePosition
' AssignOrderToCart
'
'Activity_Create(False) 'Multi Process GetNext Then AddToCart no activity_Create here
#End Region
Specific example Addendum a getNextorder requested from the webService
returns to me an orderId back but the Web Service also creates an entry in a SQL table with the orderID it provided me .... unless I can perform my operations on this returned data in sequence the next call to the web service returns the SAME orderID and it of course writes a duplicate to the table with the same orderID...
HttpUtil1 did not behave like this