PDA

View Full Version : Does ExecuteAction(..GAC..) return before completing?



flynnwt
February 9th, 2005, 05:30 PM
In lua code, I am setting MP.GACScheme to point to 'Playing Now' and then using NetRemote.ExecuteAction() to get the path. I see the results in a looped button, but the lua code after the ExecuteAction() doesn't see the new results (I am trying to load the results into a table to eventually create a new playlist window).

Does anyone know if ExecuteAction() returns before the MP.GACxx_i variables are set?

Ben S
February 9th, 2005, 06:05 PM
Good question.

You are entirely correct that your request for GAC info returns before the GAC info is filled. The GAC will be filled by the protocol when it is possible.

You could use lua for OnVariableChange, but the timing may not be completely right.

Perhaps it would be best if you could register lua callbacks with plugins? So you could tell the GAC loader to call your lua function when complete.

flynnwt
February 10th, 2005, 09:04 AM
Yes, a callback would probably be best. Or, something like a GAC_Complete variable which could then be checked with OnVariableChange(). For now I will try a delay or checking a variable change on GACTotal.