Comments (13)
The file isn't saved when no file is opened
😳 . It doesn't make sense indeed, you are unable to save your text you wrote before opening a file.
i've added an issue for it: #5
Not quite sure what you're saying here. I noticed every time I restart Jottey the text file is wiped. I'm guessing because it doesn't attempt to open the last file you saved so overwrites it with no text as per the opening text box.
I'm sorry, but my computer is gone for a few days for maintenance, so I'm not able to test it right now.
No worries, continue to add issues and I'll see if I can fix them. Like you mentioned in Reddit, likely nobody really has a use for this text editor, but I want a small project to learn from.
from jottey.
Awesome! I thought I was going to submit a pull request. But all good.
from jottey.
Yeah, that's some serious bug.
I see you've already been working on this: https://github.com/milkshakespoon/Jottey/commit/...
Is this working code?
from jottey.
Yeah, that's some serious bug.
I see you've already been working on this: https://github.com/milkshakespoon/Jottey/commit/...
Is this working code?
Trying to work on it... Although never used Windows forms before. It's kind of working, but not quite there. You might want to test it and see if you can make it better?
I am unable to work out where the file is saved by default when no file has been opened?
from jottey.
I think I've just fixed this. https://github.com/milkshakespoon/Jottey/commit/1e8e22697806ab5f00f2ee851ff940cd7c5bb73b
I'll let you have a test and then I can create a pull request if you're happy with the code. I'm learning as I'm going with this, so forgive me if my code is atrocious.
from jottey.
The file isn't saved when no file is opened
i've added an issue for it: #5
from jottey.
I'm sorry, but my computer is gone for a few days for maintenance, so I'm not able to test it right now.
from jottey.
Not quite sure what you're saying here. I noticed every time I restart Jottey the text file is wiped. I'm guessing because it doesn't attempt to open the last file you saved so overwrites it with no text as per the opening text box.
You already set the $global:InputFile
. So when it autosaves, it saves the contents of the (empty) textbox to the filename you provided. I didn't set the variable at first, and Jottey also doesn't remember the last opened file, so nothing happens, because Jottey checks if the $global:InputFile
is empty:
if ($global:InputFile -ne "") {
# If the filename not equals "", then...
Set-Content $global:InputFile $TextBox.Text
}
from jottey.
Not quite sure what you're saying here. I noticed every time I restart Jottey the text file is wiped. I'm guessing because it doesn't attempt to open the last file you saved so overwrites it with no text as per the opening text box.
You already set the
$global:InputFile
. So when it autosaves, it saves the contents of the (empty) textbox to the filename you provided. I didn't set the variable at first, and Jottey also doesn't remember the last opened file, so nothing happens, because Jottey checks if the$global:InputFile
is empty:if ($global:InputFile -ne "") { # If the filename not equals "", then... Set-Content $global:InputFile $TextBox.Text }
Ah yes! I understand that now. I did set the path you're right. I wanted to test what would happen. However, despite having the path set Jottey always wipes the file and displays a blank text box. I don't think we have any code handling this?
from jottey.
Now we have.
My pc is back, btw.
from jottey.
We probably should assign each issue to a specific person to prevent confusion.
from jottey.
I thought I was going to submit a pull request.
I'm sorry. I got a bit over-enthusiastic after getting my pc back.
from jottey.
Yeah we can assign these tasks if you like. Might be nice. No worries. I've created a new pull request now, awaiting your auth.
from jottey.
Related Issues (12)
- File Watcher doesn't work HOT 1
- Status bar panel does not update when using the select all from the edit menu HOT 1
- Show name of opened file in window title
- TextBoxType Function does not run when outside form
- Add screenshot HOT 2
- Change to WPF
- Column number sometimes negative
- File doesn't save when no file is opened HOT 2
- Add new screenshot HOT 1
- Add shortcuts HOT 1
- Add all basic editing functions to "Edit" menu HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jottey.