-
Notifications
You must be signed in to change notification settings - Fork 14
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
Port 'File Monitor' demo to Vala #175
base: main
Are you sure you want to change the base?
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 |
Added Vala code for File Monitor
Issues:
File.replace_contents_async
does 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_contents
instead seems to work correctly.async
method.Screengrab of the error attached:
Note: The Javascript demo works normally and it uses the
replace_contents_async
switch case
gives 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 :)