Forum Discussion
Understanding that this used to work before... note that Log.Message has more parameters than you are using. So.... what you are passing in as priority is actually the parameter for "Additional Info", attribs is actuallyl priority, and where you have your control is actually the attribs.
What happens if you change your code to this:
sub LogMessage(message, priority, attributes, control) Dim MyImage MyImage = control.Picture Log.Error(message, "", priority, attributes, MyImage) End Sub
Hi tristaanogre,
indeed my code already is like you suggested, I missed the 'additional Info' attribute in my example. I'm sorry.
Best regards
Christoph
- AlexKaras7 years agoChampion Level 3
Hi Christoph,
> MyLog.LogMessage("An error occured", pmHigher, "", MyControl)
> Log.Error(message, priority, attributes, MyImage)
Another note is that Attributes parameter for Log.Error is a structure and it is quite possible that the string that you pass as an actual argument cannot be converted to the required structure.
What if you change
MyLog.LogMessage("An error occured", pmHigher, "", MyControl)
to
MyLog.LogMessage("An error occured", pmHigher, Log.CreateNewAttributes(), MyControl)
?
Related Content
- 6 years ago
- 2 years ago
Recent Discussions
- 2 days ago