I’m still pretty green with xojo, so this is likely a silly question… but, I’m having an issue with the Timer.CallLater shared method and was wondering(hoping) if someone can show me the light!
Ok, so here is my code:
[code]
Select Case mode
Case UI.CombatDisplayMode.Attack
// do nothing
Which I thought was alright, but I now get the error “There is more than one item with this name and it’s not clear to which this refers.”, pointing to the two callLater calls. Removing the callWithArgs call, and everything runs fine.
Is it a problem with the hideMsg() function? It’s signature matches the value returned from msgCurrent.copy, so thought it fits the callWithArg delegate. And I can’t find anything further to explain in the docs
You do not have a variable called timer in the same scope by any chance?[/quote]
(hangs head in shame a little) doh…
(hangs head in shame a little bit more) doh, doh!
[quote=226973:@Paul Lefebvre]Your parameter needs to be of type Auto. You can convert it to the proper type inside the method:
Private Function hideMsg(data As Auto)
Dim realData As UI.dataCombatDisplayMsg = data
End Function
I’m not seeing an error with hideResult.[/quote]
Thanks Paul! That was it, (as well as my terriblepractice programming), changing the type to an auto and all is well. (Renamed the class property timer also, cheers Eli and Michel :)).