Hello,
Whenever we used uikit.mm
local tableView = TableView.new("Plain")
is enough to implement any idea.
Lua Wax good but I can not find any table based solution that runs on Gideros.
We must implement an data source UITableViewController,"UITableViewDataSource","UITableViewDelegate"
I checked Wax samples on repo. They are old. They are not running on gideros platform.
Do you have any fresh solution, code sample to use on wax gideros platform?
Thanks,
Comments
Make sure you are running it on a device or in the iOS Simulator using the Gideros Player App with the wax plugin installed.
I have just tested it and it works fine for me so if it doesn't run on yours I would check your Gideros Player App has the wax plugin installed in it correctly .
Regards,
Giles
Likes: omer
Does anyone have any ideas on why that would happen?
I tried doing:
I've also noticed performance is really bad when you're scrolling the table up and down. My FPS drops from 60 to 8-12 and my background music cuts in and out.
Basically, it seems that anything under the table view is given really low priority. I have background music and an emitter on the stage. If I make the tableview transparent then I can see the emitter stopping and hear the music stop whenever I start dragging the table. As soon as I stop dragging they move again.
@bowerandy, any ideas?
I pass in an EventDispatcher to the tableview on init, then when a table row is selected I fire off an event with the rowId. Then you listen for that event in your scene and change scenes as necessary.
http://www.giderosmobile.com/forum/discussion/comment/13793#Comment_13793
There's also another example video below; the code is part of the Hot wax demo program that you downloaded from GitHub:
Aside from that, I'm not really sure what might be causing your performance problems. You should be aware that calls into and out of wax are quite slow, especially the marshalling of the parameters between the two spaces. I'm not sure exactly but you wouldn't want to be doing too many of these calls inside an ENTER_FRAME handler at 60fps, for example. The above video shows that you can make a reasonable number of Wax calls and maintain a decent framerate though.
If you have a callback from your table controller into Lua that is being called each time the table is scrolled, you could try disabling that to see if it the frequency of that particular callback that is causing the issue.
Bear in mind that the Hot Wax stuff isn't really intended as a way of being able to code and entire Objective-C style app in Lua. It would most likely be too slow for that.
best regards
The performance of the UITableViewController itself is perfectly fine and scrolling is great, but it doesn't seem to interact well with other parts of Gideros that are in the view behind it (or on the stage). As mentioned, music and moving parts in the view behind the table screech to a halt.
I don't have any callbacks on scroll, that part is all just handled by Obj-C. The only callbacks I have are on row selection to dismiss the table. I also don't have anything wax related in an ENTER_FRAME handler. It is really just a basic UITableViewController on a fairly basic scene.
I've looked at the BhUIViewFrame code, and mine isn't all that different. I'll try code it up more closely to what you've got and see if it makes any difference.
The frame rate drops from 60FPS to something below 20FPS. There are also no callbacks into the code so I guess it is just that the scrolling is being handled at a very high priority (presumably in Apple's quest for maximum UI smoothness). I just found this:
http://www.phonearena.com/news/Here-is-why-Android-is-laggy-and-why-its-going-to-remain-like-that-in-the-near-future_id24434.
In particular: "the core reason why Android is laggy is the way it treats UI rendering. While on iOS UI rendering happens in a separate thread with **real-time** priority, on Android this happens in the main thread with normal priority" (my emphasis).
I doubt there's much we can do about it at our end.
best regards