Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
How do you add rows into a list data controller? (1000 records)
  • Is there a way to add data to list data controller programmatically . I would like to add about 1000 rows it will take lot of time to add manually . 
  • 3 Comments sorted by
  • @Maheswari by writing code (AS3) or through the editor using an action?

  • Could you please give pointer on which file needs to be edited and where it needs to be edited . Do you have a example ? I am using FlashDevelop "Free version" Not sure which file need to be opened
  • @Maheswari The custom code base layer is found inside the bin folder of your project after you launch the game from the editor or export the code for the first time. If you are not comfortable writing code then try using a Loop action that triggers a Change List action to execute an insert into the list 1000 times at runtime. 

    I just realized that the "push" action type is missing from this action so you can't add entries to the end of the list currently but you can insert entries at the beginning of the list by setting the index to 0. So to get around this issue at the moment just add your objects in reverse order with the index at 0 and all entries should be in the correct order at the end of the loop. Each item inserted at index 0 gets pushed onto the top of the list. We will add the "push" action type in the next build to push items onto the end of the list.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion