What's that? Did I hear someone wanted find & replace implemented?

Edit: The update has been accepted to the archives!

Well even if not, I implemented it anyways! Update v1.1.0 is out, and here's what it includes:
-find&replace feature
--text boxes can be used just as easily as the editor, includes special characters, deletion, etc and [enter] characters are displayed here as the xbar symbol.

-compression on/off option
--if you know Str6 won't be tampered with, there's no need to have compression on
--if Str6 was tampered with, and compression is off and the program has trouble starting, then the next time the program is run, it will turn compression back on and try to load the last save.

-auto-saving is set to a permanent interval of every 20 edits
—this can still be manually changed by editing the 3rd element of LBNER

Fancy find&replace screenie:
That interface looks awesome! Is there a reason that "replace" is "Rplace" in the "Func" menu? I assume it is to save horizontal space, but it looks a little weird Wink

I don't know if you saw my IRC message, but (using the data -> .8xs script I wrote) I added auto downloading to Txt2Note in my PR.

All you really have to do is enter the escape sequences for the bytes of each character that is in the "dictionary" that isn't in the lookupTable look up table already (I added some of the tokens myself). You can find the bytes on TIBD.
_iPhoenix_ wrote:
That interface looks awesome! Is there a reason that "replace" is "Rplace" in the "Func" menu? I assume it is to save horizontal space, but it looks a little weird Wink

Yes, it is because I could not fit the entire word in that horizontal space. What might you suggest instead?

_iPhoenix_ wrote:
I don't know if you saw my IRC message, but (using the data -> .8xs script I wrote) I added auto downloading to Txt2Note in my PR.

All you really have to do is enter the escape sequences for the bytes of each character that is in the "dictionary" that isn't in the lookupTable look up table already (I added some of the tokens myself). You can find the bytes on TIBD.

Ok, awesome! I accepted the PR but the site isn't quite operational yet. I will try to get it working here soon.
Remember, if you find a bug, be sure to report it here! I am compiling a list and will likely miss some if you don't tell me.

+I've recently fixed the find & replace routine. If your replacement string contains stuff that's in your find string, it no longer goes on an infinite loop. For example, want to put the letter "A" at the beginning of each new line in your note? You would need to replace "x̄" (x̄ pops up in the text box when you hit enter) with "x̄A".

+I've also fixed a bug where the cursor doesn't show up in the right spot in the text box after using special characters.

EDIT:
+fixed a bug where program would crash because it incorrectly dealt with the line break character (x̄) in the text box

+fixed a bug where token and token width dictionaries weren't initialized at proper spot

Other bug fixes and optimizations are coming soon in v1.1.1.
Another update, v1.1.2 is out.

This update fixes several bugs and has some minor graphical improvements.

+The "OK" button in find&replace is green now when you are on it. However if either of your two text boxes are empty, the button will be red. Clicking it while red will simply take you back to the editor.

+Optimized find&replace routine

+Improved deletion rendering in text boxes

+Fixed bug where cursor wasn't updated in text box because of text scrolling

+Fixed bug in editor where cursor wouldn't update after pasting the clipboard

+Fixed bug where string2note calculation algorithm couldn't handle two line breaks next to each other.

In addition, you should know that .txt to Note is still on its way, I just need some more time.
BasicNote has reached over 500 downloads! Thank you all for checking it out and be sure to leave a review if you like.
Sorry to report a bug, but I have a bug (I feel like this should already be fixed, but here it is):



The scroll bar overlaps the menu when the last line of a scrollable piece of text is deleted.

Extra side note: when the first line of a file is empty, The name is an x̄ (not sure what I'de do about that though).

Regardless, this is a great program, and I look forward to many future versions.
LogicalJoe wrote:
The scroll bar overlaps the menu when the last line of a scrollable piece of text is deleted.

Wow, that is such an incredibly important issue... /s
Lol but yeah, that should be a really simple fix. As it is a rather complex program as a whole I'm not surprised I messed up on little things here and there.

LogicalJoe wrote:
Extra side note: when the first line of a file is empty, The name is an x̄ (not sure what I'de do about that though).

The program is designed to scan for the first actual text in the file. It displays the first line that has text as the title of the note. If it doesn't find any text, but there are the paragraph breaks as you're saying, the title defaults to x̄.

LogicalJoe wrote:
Regardless, this is a great program, and I look forward to many future versions.

Thank you! I don't know if I'll actually be making "many future versions" as I'm quite done with this project already. But I'll let you know.
I found 3 related crashes (that's right, these are more than just graphical issues).

1-Ghost Text Syndrome
2-Random crash
3-Text duplication (almost the same as Ghost Text Syndrome, just the text is displayed)

Every one of these requires that you first make the first line of text exceed the line length (cause it to rap)

1 - Delete a few characters off of the end of line 1 (note that it does not correct the rap), then move the cursor to the start of the 2nd line and delete what appears to be the new line, this will cause ghost text to appear in place of the first line, editing the ghost text (or pressing right enough) will cause a crash.

2 - Move the cursor to the beginning of the 2nd line and press [del] (delete what looks like the newline character.)

3 - Delete the 2nd line entirely (you can delete text on the first line as well) and insert text on the first line.


Please note that I was for the most part just spamming the keyboard and if any readable text is there, it is meaningless.

Fix these bugs and I'll do my best to find more of them. Smile
Good finds.
I can't explain there any better then the APNG's can… But I'll give it a try.

1 - having a line of text (with a space in it) and typing a catalog character will cause a crash.

2 - having an unbroken line of text and typing a catalog character causes the catalog menu cursor to do some funny things and can be used to cause more graphical issues (including a crash).


The more I use BasicNote the more intricate bugs get, I had a few others, but I was unable to reproduce them.

Should I keep reporting these bugs? Sad
LogicalJoe wrote:
Should I keep reporting these bugs? Sad

Well, it is helpful to have a list of bugs and know some of the specifics, so thank you for that!

I'll consider trying to fix these bugs, but only if I get $100 per fixed bug.
I'll give you $100 equivalent to Nuclear Reactor Sim CE currency, if you'd like... Razz
After about 2 and half years, I think it's finally time I update this program again soon. There's plenty of bugs to fix, as LogicalJoe has pointed out, and especially specific ones too which could be real annoying. Plus there's plenty of other bugs I probably don't even know about, but I mean it is a complicated program. Not to toot my own horn too much but I'm looking back on it now and I'm still quite impressed with what my past self has accomplished.

Anyway, there's also some speed optimizations I have in mind, in particular I think I can get the program to miss fewer keystrokes if I move around some of the more important conditional blocks.

Most exciting though is that I have a few features I want to try and see if I can implement! I won't say what I have in mind as to not get any hopes up but feel free to guess.

I've got some free time, so I think I'll be tinkering around with this as well as my fruit ninja project here soon and we'll see what I can accomplish.

Edit: I also need to see if I can get txt2Note properly working, theres actually a good bit to be done there like making it efficient and user friendly, as well as implementing it into the main program with like a load txt file button or something. But the optimizations and bug fixes and other features I'll be messing with first.
I've been working on the program a good bit lately, there's still plenty of changes to come and more bugs than I can count but I thought I'd give a little update here.
    -I reorganized the order of the conditional blocks in the editor by importance; this means that text entry is now considerably faster (I might do a comparison here soon). Text entry is now the first condition checked after a key is hit.

    -mr womp womp has helped make a bunch of great optimizations which decrease the size of the program

    -Auto-saving is now enabled by default when first launching the program

    -The "Rplace" text is now changed to "Find..."

    -Improved variable cleanup so less things are left behind

    -Compression lists BNS0 through BNS8 will no longer even be setup unless compression is enabled, and spare lists will be immediately deleted if the decompression algorithm determines they are empty.

    -I moved the "delete all notes" function to the options page

    -Deleting a note now requires a confirmation before deleting

    -The BNOTE list and compressed note lists are now always archived, even during the program, unless you are saving to them.


Believe it or not, that's only a few of the changes, there are a lot more very specific things I've been doing which aren't worth writing here.

Anyway, this new version should be a pretty great update, I still have a lot of changes I am making but be on the lookout!
I've fixed the bug where an [xbar] (the line break character) shows up in or as the title of a note, and I've also added a small feature where if a note only contains line breaks or spaces then the title will show up as a gray "New Note" text.

I am trying to figure out a simple routine or code fragment though, that will return the first occurrence of any character in a string besides two characters, such as the [xbar] character and the space character. It needs to be fast, so if anyone has a solution let me know! This helps speed up the display of note titles, as note titles need to skip over any leading spaces or line breaks.

Edit: I used this code that Trenly suggested on TIBasicDev:
Code:
seq(inString("[xbar] ",sub(Str4,H,1)),H,1,length(Str4
1+sum(not(cumSum(Ans=0

It's not any faster than a For( loop or anything, but it is smaller.
Didn't see this until now, but nice work, Michael2_3B! While I don't like this project as much as Fruit Ninja, it's still looking very good, and I look forward to see what you do with it in the coming weeks and months.
Welp, the program is in somewhat severe disarray right now, but it'll all be worth it in the end.

Here's the changes I've made/been working on since the last post:
    -The notes list now reorganizes itself by most recently updated.
    -2nd mode is now used to page up / page down in both the menu and the editor.
    -I am working on pinned notes now, it doesn't actually really work internally yet but I got it to display nicely and properly on the menu.
    -Some other features I'm planning on adding soon are locking, searching for and displaying notes that contain xyz, and potentially a duplication button.
I've made good progress in the last few days, I reworked how things work internally a little bit in order to support pinned notes, and as a result was also able to optimize the code as well so it's smaller.

As stated in my last post, the notes now reorganize themselves based on when they were last updated, meaning a note that was just edited will make it move to the top of the menu display. Pinned notes and unpinned notes are kept separated of course though, meaning if you edit an unpinned note it will go to the top of the display of unpinned notes, and if you edit a pinned note it will go to the top of the display of pinned notes. Not a difficult concept really, I'm probably making it a bit wordy.

Anyway, this also means that if you unpin a note, it won't necessarily go to the top of the unpinned notes, but rather in order of what notes were last edited.

Here's a fun little animated screenshot:

(I've also made it so you can use the + and - buttons to pin/unpin notes as well)

Anyway, I hope you guys like the progress, and there's still much to come.
New updates!

Clock Display
I've added a clock display in the top right corner. You can turn it on or off in the options menu, and you can also of course change the time and format in the regular OS menu outside the program (I don't think I can be bothered to create my own clock changing menu within BasicNote). It doesn't seem to slow down the program too much thankfully.

Date & Time And Other Metadata
I've added a "Date Last Modified" metadata to each note. It's not used for anything internally but it can be seen on the func menu for whatever note you are hovering over. This display is not final- I think I'm going to try and add a sort notes feature along with other added metadata (such as date created, alphabetical, size, and then ascending/descending also associated with these). From there, I think I'll also add an info page or something to see this metadata.

Duplication
I added a duplication button. This will duplicate the note you are hovering over, including the lock if it has one.

Locking
As seen in the screenshot, locking/unlocking and removing locks is now operational, although it can't truly be called locking as I have not implemented password protection or any encryption stuff yet. But I hope you guys like the look!



Another small feature I should mention is that the subprograms can now only be run by the main menu program, BNOTECE. That is, unless you can read TI-Basic. But really there's no reason to try and run the subprograms on their own.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 4 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement