PowerBASIC Users Meeting Point
gbNotes (Discussion) - Printable Version

+- PowerBASIC Users Meeting Point (http://pump.richheimer.de)
+-- Forum: User to User Discussions (http://pump.richheimer.de/forumdisplay.php?fid=3)
+--- Forum: PowerBASIC for Windows (http://pump.richheimer.de/forumdisplay.php?fid=4)
+--- Thread: gbNotes (Discussion) (/showthread.php?tid=64)



gbNotes (Discussion) - Gary Beene - 09-03-2025

I was going to wait about posting gbNotes until I added more features, but I've gotten distracted and probably won't touch it again for a while.  But since I use it daily I thought it ought to be good enough to share.

Link to Source Code Forum

The "database" is just a text file that uses "++++" as a delimiter between entries.

The first line of each entry is just a user name.  Any number of lines can added after that.

On the left is a search term editor, a list of the most search terms and a list of the most recent search matches.  Click on a match to see and edit the content.  Ctrl+D will insert a date line into the editor, below which you can enter new content.

Each day, it does a backup of the CRM.txt file into a "backup" folder.

You can also view/edit/search the entire CRM.txt file

There's not much more to it.  Simple, but good enough to let me track my contacts.

[Image: gbnotes.png]


RE: gbNotes (Discussion) - Stanley Durham - 09-03-2025

I do something like this, except each record is a text file. Whatever folder I open, all text files in that folder and sub-folders are a record. The file structure is the structure of the database. Tags in the text file allow any file to be one or more subjects, and subjects can be found anywhere by the tag.
But I have to have an app to control it to prevent corrupted tags and rename all tags at once, etc. …
I can view the whole stricture in a treeview. Clicking a tag in the tag list only shows the structure of files with that tag. Clicking a file opens it up in a textbox. To prevent accidental tag corruption, I strip the tags out when I view a file and append it when it’s saved.
I tried many things, but this is simple, and I don’t have to worry about import and export.
I can just copy it to my android phone, no conversion.


RE: gbNotes (Discussion) - Gary Beene - 09-03-2025

Howdy, Stanley!

As folks here know, I'm a big fan of text files and of minimal code!

When you say "copy it to my android phone", what is it you are copying and what do you use on your Android to view whatever is copied?


RE: gbNotes (Discussion) - Stanley Durham - 09-03-2025

The files are saved UTF8 in the app using ChrToUtf8$(). Haven’t had any problems with window line endings on Android. In the app, I do a Unix to Windows conversion just in case it came from the phone. Doesn’t change a Windows’ file.
I just copy the main folder over to the phone. On the phone, all I have is the folder structure and the files.
Works OK for my use because on the phone I just need an address, number or password. I already know what folder they’ll be in.

I went through a bunch of apps. The biggest problem was import and export if I needed to use it somewhere else or try another app. Dirt simple, no more problems. Using tags allows any subject and multiple subjects to be in any file in or below the main folder. Any folder can be a completely different database. A sub-folder can be a subset. Wherever I open the app is the database.
I’ll never use anything else.


RE: gbNotes (Discussion) - Stuart McLachlan - 09-04-2025

Downloaded source and tried to run .exe and it failed to load.

Tried to compile source and:

1. Requires José's includes
2. Had to add ./icons/ to all the resource filenames
3. Added #DEBUG and got
---------------------------
Error
---------------------------
Untrapped Error #9 (Subscript/Pointer out of range)
has occurred following execution of LOADCRMF
Press OK to continue, Cancel to terminate
---------------------------
OK  Cancel 
---------------------------

Pressing OK, got 
---------------------------
PowerBASIC
---------------------------
Data Issue:
---------------------------
OK 
---------------------------


RE: gbNotes (Discussion) - Gary Beene - 09-04-2025

Howdy, Stuart!

Thanks for the feedback!  I had placed all icons in "icons\" and failed to change the #Resurce statements to something like this...

Code:
#Resource Icon xlogo, "icons\n.ico"

I also just added some lines to resolve the error - caused by not including a default crm.txt in the distribution.

https://garybeene.com/files/gbnotes.zip was updated with the changes.

[Image: gbnotes2.png]


RE: gbNotes (Discussion) - Stuart McLachlan - 09-04-2025

(Yesterday, 05:06 AM)Gary Beene Wrote: Howdy, Stuart!

Thanks for the feedback!  I had placed all icons in "icons\" and failed to change the #Resurce statements to something like this...

Code:
#Resource Icon xlogo, "icons\n.ico"

I also just added some lines to resolve the error - caused by not including a default crm.txt in the distribution.

Yep, that fixed it Smile

I was going to suggest a timestamp, but looking at the source code Ctrl+D is already there Smile

Suggest update (quick and dirty version Smile )

'
Code:
      CASE %WM_COMMAND
        CASE %WM_HELP
            LOCAL ws AS WSTRING
            ws = "Ctrl+Del  Delete"
            ws &= $LF & "Ctrl+D  InsertDate"
            ws &= $LF & "Ctrl+E  ShowAll"
            ws &= $LF & "Ctrl+F  SearchDown"
            ws &= $LF & "Ctrl+I  InsertDelimiter"
            ws &= $LF & "Ctrl+R  SetFocusRE"
            ws &= $LF & "Ctrl+M  Mute"
            ws &= $LF & "Ctrl+N  NextREDown"
            ws &= $LF & "Ctrl+S  SaveCFN"
            ws &= $LF & "Ctrl+Shift+F  SearchUp"
            ws &= $LF & "Ctrl+Shift+s  SaveAll"
            ? ws,, "Hotkeys"
'