6-9-24

Home Opinions Reviews Diary Creative writing Friends!

Hey all! Not too much to add for this diary entry. I am sad to see drama happening among mutuals on neocities recently, but also I don't care that much. I am mostly just happy because of how well things have been going with me personally!

In terms of work, I am loving the new job a lot so far! I'm gonna be getting even more hours soon, which will be great because I love money and having money to actually save instead of just paying my bills and nothing else, lol. And considering how much I enjoy the work, I'm sure even more time won't be too much for me to deal with, unlike with my previous job where just going in every day felt like a war that I was losing.

I also got that tricky function working in my zazipaint code that I was working on. Basically, I was using the base code from my text editor I wrote in python using the tkinter library to make a paint program similar, but not as complex (for now) as MSPaint, in the same way that my text editor performs much the same function as notepad. Through that, there was a function in the code alled new_file(), which does exactly what you would expect it to do. I figured, since the way that it worked was taking the contents of the top of the page to the bottom (1.0, "END"), and then erasing it, I could then take the contents of the canvas from those same relative positions and erase it, thus effectively clearing the screen. There's additional code with the new_file() function in my text editor to then reset the file's name and then get it primed and ready to then be saved out in a new name, file format, etc., but none of that is necessary with new_file() for the paint program, since all I really need is to clear the screen. Well, that problem turned out to be a headache, because I had only used tkinter to produce text, not images, and images functioned differently than text did. With text, you basically have each position of the respective lines being represented as 1, 2, 3....END, so if you were to say (1, "END"), you are effectively telling the program to look for the contents of lines 1 through to the very last line. With a canvas, the way it works is that you take each point on the canvas as an x and y cooridinate, and then you can draw to each coordinate to produce images. So I figured if I just told it to look for specific x and y coordinates and told it to delete those coordinats, it would work the same way. Turns out, that's not how it works, or rather, that's the WAY hard way of doing something that is actually really easy. When I couldn't get the hard way to work, I decided to just make a big white rectangle to cover the whole screen the way I did with the eraser to make it look like I was clearing the screen, but that wasn't working out at all. So, I did some more reading into how canvases work in tkinter, and realized that you can literally just tell the program to delete "all", which will then clear all the coorindates within the canvas, thus clearing the page. So easy, so simple, I am an idiot for trying to make it so complicated. Either way, now it works and I can get back to trying to get the functionality of saving to file formats that are actually readable by humans like jpg and png, which is easier said than done, but I am excited to face it! Its been a lot of fun getting back into programming, since I haven't done it really, besides this website, since my internship a while back!

That'll be all for now, there is more stuff I could talk about, but I don't want to call attention to the people who read this blog IRL, and a lot of it involves them, but I will say exciting developments in my personal life that I think are cool!

Much love from Lexi your bestie!!

Back Prev. Next