-
Notifications
You must be signed in to change notification settings - Fork 16
Port 'File Monitor' demo to Vala #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add Vala code for File Monitor
I tested the async method and it worked fine, and the error doesn't sound related to the async/not async method. Could you share the piece of code where the async method fails, please? |
This is the code: and a screengrab of what the text editor says: 2024-06-13.11-53-34.1.mp4There is no warning/error in the console, and the operation is completed successfully. |
Use property for TextBuffer Add default case to switch (Fixes compiler warnings) Use file.replace_contents_async instead of replace_contents
|
Move the handler to a separate |
@Diego-Ivan Works with your approach, added the commit! I am also not sure about why |
|
What's the status here? |
Diego-Ivan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Added Vala code for File Monitor
Issues:
File.replace_contents_asyncdoes not work well and inserts non-readable text inside the workbench.txt file, it also shows an additional error stating that I don't have permission to open the the file.File.replace_contentsinstead seems to work correctly.asyncmethod.Screengrab of the error attached:
Note: The Javascript demo works normally and it uses the
replace_contents_asyncswitch casegives a warning that causes the checks to fail, Js and Python demos both useswitch case.Let me know if there are any other issues with the code :)