On Mon, 8 Oct 2012 16:29:12 +0530 Amit S <a...@smargav.com> said: > Hi Rasterman, > > Following suggestion about using thread, I did some more research and found > the ecore-con APIs. > > If I replace the current curl operations with ecore-con APIs the call to > method is over and the progress bar is never shown, as it is hid the moment > evas_object_hide is called. > > 1. Progress bar show > 2. Ecore-con API call > 3. Progress bar hide... > > Is there any way to wait for the API call to complete and then hide the > progress bar ? > Please advice. > > Regards, > Amit S
hmm. it seems you need to "get" the concept of a mainloop. because you just run those functions in order it will do them all instantly - it doesnt WAIT for a function to complete. it sets stuff up. see the ecore_con documentation and examples. you set up a connection and event handlers to handle disconnect, data arriving etc. when the data arrives - change the progress bar state. when the download is complete you can hide/delete/whatever the progress bar from the callbacks. if you don't go back to the mainloop events cannot be processed. drawing, mouse button presses, changes of window size, network data coming in etc. are all events and without handing control back to the mainloop these won't be processed and the functions you do call will be executed in sequences immensely quickly. :) > On Mon, Oct 8, 2012 at 2:01 PM, Carsten Haitzler <ras...@rasterman.com>wrote: > > > On Sat, 6 Oct 2012 14:29:09 +0530 Amit S <a...@smargav.com> said: > > > > > Hi, > > > > > > I am trying to use an infinite pulsing progress bar and do some network > > > operations in the background. Any help will be appreciated. > > > I create a Popup and add ProgressBar in that Popup. The popup is not at > > > all displayed. However all the network operations are working fine as > > > control flows properly. > > > (I have not used any threads here) > > > > > > 1. Create Popup > > > 2. Create Progresbar and set pulse settings > > > 3. Add progress bar to popup "default" > > > 4. Show Popup > > > 5. Perform network operations > > > 6. Hide Popup. > > > > > > > > > *My Code is as follows: > > > > > > * Evas_Object* popup = elm_popup_add(windowt); > > > elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER); > > > > > > Evas_Object* progress = elm_progressbar_add(popup); > > > evas_object_size_hint_align_set(progress, EVAS_HINT_FILL, 0.0); > > > > > > elm_object_style_set(progress, "default"); > > > elm_progressbar_pulse_set(progress, EINA_TRUE); > > > elm_progressbar_pulse(progress, EINA_TRUE); > > > elm_object_text_set(progress, "Fetching..."); > > > elm_object_part_content_set(popup, "default", progress); > > > > > > elm_object_scale_set(popup, 1.0); > > > evas_object_size_hint_max_set (popup, 100, 100); > > > evas_object_size_hint_request_set (popup,100,100); > > > > > > evas_object_show(popup); > > > > > > * /* cURL Operations here..*/* > > > > this is your problem. curl is blocking everything. mainloop cant run and > > handle > > draws/events. why don't youy use ecore_con_url - this is integrated into > > the > > mainloop and does all http etc. url network stuff async for you via events. > > > > > evas_object_hide(popup); > > > > > > > > > Regards, > > > Amit S > > > *Mobile:* 9900489498 > > > *Skype:* amsurana > > > > > ------------------------------------------------------------------------------ > > > Don't let slow site performance ruin your business. Deploy New Relic APM > > > Deploy New Relic app performance management and know exactly > > > what is happening inside your Ruby, Python, PHP, Java, and .NET app > > > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > > > http://p.sf.net/sfu/newrelic-dev2dev > > > _______________________________________________ > > > enlightenment-users mailing list > > > enlightenment-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-users > > > > > > > > > -- > > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > enlightenment-users mailing list > enlightenment-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-users > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users