You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

1h 42m 10s logged

Group Editing

I was going to start doing messages in this session, and realised that there was an important element that I was missing: group settings. This is important for one sort of sneaky reason: message history is dated. At the beginning of chat history, there is a small informational message that says when the chat was created, and then all messages must come afterwards. Without defining a set start time, there would be no way to validate the dates set when new messages are added. To go along with this, I also added the ability to set the name for spaces. I am also storing if the archive is a DM or Space in Archive objects so I know what fields to ignore when saving occurs.

Part 1: Date and Time Entry

Date and time entry is split into a box for each Month, Day, Year, Hour, Minute, Second. Each of these has a corresponding label to detail what each field is for. All of these are arranged in a Horizontal container so that they line up. I also experimented with data validation; I at first started to right my own validation classes, then realised that textual has a built in validator for numbers. There are a few potential bugs, the biggest is that days are not validated based on the selected month, so entering dates like February 31st is possible. Also, a year that is too late causes an error, it may be something to do with python’s datetime, but it isn’t a priority to experiment with at the moment.

Part 2: Name Entry

The type (DM or Space) is passed to the container; this is used to enable or disable editing the group. The was I have set this up, the name editing is below the save button name, but I really am trying to get features in and not waste my time on UI for the moment. It works, and for now that is what matters. And speaking of the Save button…

Part 3: The Save Button

The Save button is fairly simple; while editing, values are stored locally in the container. When the save button is pressed, these values are actually written to the correct archive.

Part 4: Silly Mistakes

I don’t know what I was thinking today; I made a bunch of silly mistakes. The worst was trying to pass an integer where a string was required. I was setting up the base for the date & time inputs, and as I was thinking about time, so I just tried to input numbers. I got back an error about translation; it took a bit to figure out what was causing the error.

0
1

Comments 0

No comments yet. Be the first!