-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic data in GroupedTableScreen #94
Comments
Simply add def on_load
@games_list = []
BW::HTTP.get("http://remoteserver.com/api.json") do |response|
@games_list = massage_data(response)
update_table_data
end
@hometable ||= [
{
title: "List of games",
cells: @games_list
},{
title: "Settings",
cells:[
{
title: "Account", action: :account_settings
},{
title: "Notification", action: :notification_settings
}
]
}
]
end |
That worked, thanks @Swatto! |
Are you actually getting your |
Yes. I'm getting it from a server. On Mon, May 27, 2013 at 11:59 AM, Jamon Holmgren notifications@github.com
|
Dynamically programming your app from a server. Sounds vaguely dangerous. :) |
I show a loading icon when there is a request in progress. I'm also planning to cache it. Can you explain how it could be dangerous? |
We allow setting any cell attribute in |
Got it. I'm massaging data that comes from the server with few filters. So I guess it should be safe. |
That's a good idea. What kind of app are you working on, if I might ask? |
I'm trying to build a reader to read algorithm problems in Topcoder, for me to read problems, scribble possible solutions(paint), see best submitted solutions. Variable names in above snippets are not real :) |
Nice! |
I'm new to Rubymotion, so this question might be naïve.
I'm using GroupedTableScreen, and I have the table items to be pulled from remote server.
Unfortunately, this doesn't work because BW:HTTP is async. How do I update the cell data in GroupedTable?
The text was updated successfully, but these errors were encountered: