GameSalad

Howdy, Stranger!

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

Ensuring Loop Through Table finishes

bkhoward2001bkhoward2001 Posts: 86Member, PRO

I need a way to make sure that the loop through table has completely finished before triggering the next event... How are people doing this...? Is there a method to this? Don't want to go to next screen until I know that the loop has finished.

Comments

  • tatiangtatiang Posts: 11,335Member, Sous Chef, PRO, Senior Sous-Chef
    edited April 21

    If self.loopCounter = tableRowCount(tableName)
    Then
         [loop through table is finished]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • bkhoward2001bkhoward2001 Posts: 86Member, PRO

    I don't think it is as easy as that unfortunately... I have a table that has category and answer.... the loop will delete rows that don't have a particular category.... This will all depend on what category is selected.... How would I do this?

  • bkhoward2001bkhoward2001 Posts: 86Member, PRO

    Let me give a little more definition... it is looping through table until all rows that are NOT category X have been deleted... I want to be able to know when this is completed before going to next screen.... Hopefully that makes more sense... In other words if they pick category 'Animal' for instance, it is looping through deleted every row that is not category 'Animal'... I want to be able to know when it is finished...

  • tatiangtatiang Posts: 11,335Member, Sous Chef, PRO, Senior Sous-Chef
    edited April 23

    As an aside, I find it frustrating to answer a question and then be given additional details that change the question.

    I also don't really understand this:

    it is looping through deleted every row that is not category 'Animal'

    It sounds like you need a way to check whether a specific table cell value is present. I suppose you could do a tableSearch for that.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.