Calling a method from a button click

I have a button which is defined like this:

<Button Clicked="saveSettings" >
    <Clicked>
        <GoBack />
        <Rotate Target="SettingsBlue" Degrees="-90" Duration="0.3" Easing="QuadraticOut" />
    </Clicked>
    <Rectangle ux:Binding="Appearance"  Opacity="0" />
    <Image ux:Name="SettingsBlue" File="img/cogBlue.png" Width="50" StretchMode="Uniform" />
</Button>

And it is calling this method:

void saveSettings(object sender, ClickedArgs args) {
    File.WriteAllText(Directory.GetUserDirectory(UserDirectory.Data), "/Zigne.conf");
}

And I’m getting this error message:

Call to 'MainView.saveSettings(object,Fuse.Gestures.ClickedArgs)' has some invalid arguments () - C:\Users*Snip*\Fuse\Zigne.cache\GeneratedCode\MainView.g.uno(1416:29):E

And I’m not sure how to correct it as I’ve followed this guide: https://www.fusetools.com/developers/guides/tutorial

Could someone please help me in the right direction?

Thanks! :slight_smile:

Fixed it!
Turned out I had a typo in a button using the same method further down on the page. Would’ve prefered that the Build Result had mentioned which line that error occurred on.

Good note, we’ll see if we can do something about that. A few major changes coming next week anyway. :wink: