infinite


CodeNameOne InfiniteProgress Issue


I am having issues with rendering next screen if Infinite Progress is used and if this piece of code is uncommented then I am able to show the next screen where it displays a list.
final Form poList = (Form) super.createContainer(getResourceFilePath(), "POList");
ConnectionRequest request = new ConnectionRequest()
{
Hashtable response = null;
protected void readResponse(InputStream input)
{
//Read and parse the response
}
protected void postResponse()
{
if (response != null)
{
try
{
//Get a sorted List from the response and use it to fill the list
poList.show();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
};
request.setUrl(poListUrl);
request.setPost(false);
request.addRequestHeader("Authorization","Bearer "+accessToken);
request.setContentType("text/xml");
/*
If these three lines are commented then the next form is shown properly
*/
InfiniteProgress ip = new InfiniteProgress();
Dialog dlg = ip.showInifiniteBlocking();
request.setDisposeOnCompletion(dlg);
NetworkManager.getInstance().addToQueue(request);
You have a race condition between disposing the infinite progress and the showing of the next form.
Move the dialog showing code before
ConnectionRequest request = new ConnectionRequest()
Then
dlg.dispose();
//Get a sorted List from the response and use it to fill the list
poList.show();

Related Links

Elastix: is there a way to setup a conference with infinite duration?
breaking down an expression into partial fractions
CodeNameOne InfiniteProgress Issue
Calculate Sum of Infinite Numbers Series [closed]
500 Internal Server Error with passing wrong parameter in action of struts 2.0
The number of DFA accept same language is countably infinite

Categories

HOME
flask
protocol-buffers
schema.org
redmine
concurrency
transactions
message-queue
apk
moodle-api
flurry
turbojpeg
video-streaming
u-boot
azure-graph-api
cuba-platform
user-defined-types
coroutine
backtracking
introspection
window-managers
list-comprehension
hevc
basex
bobo-browse.net
copy-protection
guice
netbios
series
sca
quickcheck
devtools
testlink
windows-store
distributed-caching
jqgrid-asp.net
cloudwatch
webvtt
http-basic-authentication
wikimapia
mechanicalturk
zend-server
d3v4
maatwebsite-excel
ndk-build
bilinear-interpolation
decoder
p6spy
gcloud-node
dojo-build
yii2-model
adjacency-list
distributed-cache
django-redis
perceptron
msgpack
css-paged-media
unhandled
compositetype
microsoft-expression-web
thoughtworks-go
ildasm
global-scope
coding-efficiency
network-printers
jchartfx
iosched
lru
insertion
statechart
jquery-lazyload
linkbutton
jquery-dialog
idispatch
spark-view-engine
struts2-json-plugin
story
audiotoolbox
viewpagerindicator
multidrop-bus
differentiation
boost-foreach
representation
page-curl
digiflow
git-log
active-record-query
android-input-method
facebook-fbml
ppc
bucket
sqlsitemapprovider
html-generation

Resources

Encrypt Message