Rajdeep Singha
Rajdeep Singha

Reputation: 65

Function created in vala showing unexpected syntax error

enter image description here

This is how I create a new function so that when a button is clicked, the preferences view should open.

But when I compile it, this is the error displayed. enter image description here

https://github.com/Suzie97/epoch, link to the repository on github

What is the syntax error on my code?? Why is this error shown?

Upvotes: 0

Views: 62

Answers (1)

AlThomas
AlThomas

Reputation: 4289

There's nothing wrong with your code snippet, but you have place it in your construct method of your class. In your Epoch.MainWindow calss in src/MainWindow.vala you want to method out of the scope of construct and in to the scope of MainWindow.

Upvotes: 2

Related Questions