Are you sure you want to report the post shown below? This will send an email to the ATVO administrators.
Please include a short reason for reporting.
Users reporting for no reason may be locked out.
Post
Posted by Olivier T
on
Hey guys!
I've been reading through a bit of those threads and always found a solution to my problems so far, but for some reason, the proposed solution either doesn't work or I'm doing something wrong.
Basically, I want to make a widget that shows the fastest lap whenever a new fastest lap is set. The twist is that, even though there is a trigger, it operates during practice, qualy and race sessions, so I want to make sure that this widget only appears during the race.
I have whipped up the following code, but setting the trigger to execute it, or even setting a button to execute the code, at least to make the widget display, doesn't make the widget appear:
IEntitySessionResult result = (IEntitySessionResult) value;
var session = result.Session.Type.ToString(); var widget = item.Theme.Widgets.Find("Fastlap");