Giter Site home page Giter Site logo

Comments (13)

gentleadam avatar gentleadam commented on September 27, 2024 1

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.

gentleadam avatar gentleadam commented on September 27, 2024 1

Awesome! I thought I was going to submit a pull request. But all good.

from jottey.

gllms avatar gllms commented on September 27, 2024

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.

gentleadam avatar gentleadam commented on September 27, 2024

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.

gentleadam avatar gentleadam commented on September 27, 2024

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.

gllms avatar gllms commented on September 27, 2024

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

from jottey.

gllms avatar gllms commented on September 27, 2024

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.

gllms avatar gllms commented on September 27, 2024

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.

gentleadam avatar gentleadam commented on September 27, 2024

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.

gllms avatar gllms commented on September 27, 2024

Now we have.
My pc is back, btw.

from jottey.

gllms avatar gllms commented on September 27, 2024

We probably should assign each issue to a specific person to prevent confusion.

from jottey.

gllms avatar gllms commented on September 27, 2024

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.

gentleadam avatar gentleadam commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.