Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

structure of a program that loads things from the web
Started by ehsmeng Jun 13 2010 07:17 PM

- - - - -
1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ehsmeng

[GLOBAL: userInfoPane.html]
ehsmeng
  • Observer

  • 11 posts
  • Guests

Hi all,

I asked if there's a way to run http.request asynchronously, possibly wrapped in a coroutine but got no answer. I therefore guess you use enter frame-event to keep up with the GUI and something else for the other stuff.

Say that you want to implement the youtube app in iPhone (we've all used that one). You search for clips, and you render the set in a list. The part of the list which shows has its icons loaded.

How would you structure a program like this? The code in the event enter frame event loop takes care of where you've scrolled to and all that, but how do we tell another "thread" to do the work so the enter frame event is not blocked? A new coroutine per icon load? Some thread pool pattern?

Thanks,
Marcus
uid: 4441 topic_id: 1181 reply_id: 301181


[TOPIC: post.html]
#2

d3mac123

[GLOBAL: userInfoPane.html]
d3mac123
  • Contributor

  • 248 posts
  • Corona SDK

Marcus,

Asynchronous http request is not available yet in Corona (although they are in Lua). It is one of the features they plan to enable in the future releases (I am looking for it too).
Alex
uid: 4883 topic_id: 1181 reply_id: 3175



[topic_controls]
[/topic_controls]