Simple File Cabinet

So you have written that new, must have program. Let us see it here.
Post Reply
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Simple File Cabinet

Post by cage »

This is a simple file cabinet program that allows you to setup categories and place information in those categories. Included is brief instructions on the menu items. I wanted a data base program that didn't require MySql to make it usable. Just a very simple data base program.
Attachments
FileCab5A.zip
(3.12 MiB) Downloaded 417 times
Last edited by cage on Wednesday 11th December 2019 5:25am, edited 2 times in total.
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Simple File Cabinet

Post by stevedee »

cage wrote: Monday 9th December 2019 1:30am This is a simple file cabinet program that allows you to setup categories and place information in those categories...
I've only had an hour or so to look at this, but hope to spend some more time later.

Initial impression: I like it!

Comments;
1. I'd prefer 'right-click' to bring up the option for adding a New Category rather than Delete a category. I think deleting should be more difficult/less immediate, so better in the dropdown menu.

2. I think you need to swap the last two lines in FMain.class Public Sub mnuNew_Click() so that the category list updates straight away, without having to manually refresh, like this:-
Public Sub mnuNew_Click()

  Dim value As String

  value = InputBox("Enter Name for File:", "Category Name", "Do not know")
  
  If value = "" Or value = "Do not know" Then
    Message("New Entry Aborted ")
    Return
  Endif
  
  Mkdir Application.path &/ value
  Form_Open()
  
End
3. There is quite a bit of duplication in Contents.class Select Case. Duplication is more bug prone, and can have a negative affect on software maintenance and test time.

I suggest some kind of "CreateCat" routine, maybe like:-
Public Sub CreateCat(strMsg As String)
  
     Kill Application.Path &/ Global.GCat &/ Global.GName
     hFile = Open Application.Path &/ Global.GCat &/ Global.GName For Create
     Message(strMsg)
     File.Save(Application.Path &/ Global.GCat &/ Global.GName, TextArea1.Text)
     Close #hFile
     Global.GNew = True
     Me.Close
     CatData.Show     
  
End
...actually the:-
     Me.Close
     CatData.Show 
...should just appear once, below End Select (...if this is not a problem for the Case "Print").

I hope this is useful.

EDIT

4. The Print Selected Text form is not very well behaved. I think you should use:-
PrintForm.ShowModal
...to ensure it comes up on top and cant be ignored until its been dealt with by the user.
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Simple File Cabinet

Post by cage »

Good call Stevedee I will implement those changes and see how well they work. I am always open to suggestions on how to improve my programs. Thank you very much.
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Simple File Cabinet

Post by cogier »

Hi cage. Here is my 2 pence worth, or in your case 'cents'.

I have made all the forms expandable added the logo to FMain form so it shows in the taskbar. The only other issue that I noticed was the use of the word 'Exit' I kept thinking that would exit the program. I think 'Close' might be better. Other than that it seems to work well. :arrow: BUT what did I see!! Was that references to VB6!! Ahh!! :shock:
FileCab4_7_CO.tar.7z
(800.07 KiB) Downloaded 417 times
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Simple File Cabinet

Post by cage »

LOL Charlie, yes I was a VB programmer since the first version came out. I have programed using VB through all the version until they came out with VB Net. Didn't like VB Net at all. When I went to Linux I started to use Gambas in which my VB skills could adapted. While I am not an expert in Gambas I am learning more and more all the time with help form people like you and stevedee. I have implemented everything that stevedee and you suggested in the latest version. So hope you like the program.
Last edited by cage on Wednesday 11th December 2019 5:26am, edited 1 time in total.
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Simple File Cabinet

Post by stevedee »

cage wrote: Tuesday 10th December 2019 8:00pm ...until they came out with VB Net. Didn't like VB Net at all...
Me too. When still working in industry, I enjoyed VB6, didn't like .Net, and really didn't like C++. I also discovered the delights of VBA for Excel, creating an OPC server/client system for an Irish cheese products company. Its good for many applications which produce a lot of data and where you can't be bothered to create a user interface (i.e. just write any data to a spreadsheet).
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Simple File Cabinet

Post by stevedee »

cage wrote: Tuesday 10th December 2019 8:00pm ...I have implemented everything that stevedee and you suggested in the latest version. So hope you like the program.
Great stuff cage, I think that is an improvement.

Just a few more points (sorry);

1. I think you may have forgotten to add the Delete Category option to the drop-down menu.

2. Whenever you do anything with files (e.g. open, create, kill...) you should add an error handler. So the minimum would be just to add Catch as you have done in many routines. Or maybe even use the Try...If Error method.

3. With Select Case, its a good idea to always use the Case Else condition (just in case none of the cases apply). So in the Contents.class I would replace the Case "exit" with Case Else.

4. Not sure what the Return is doing in this bit of code:-
Catch
  Message.Title = "Error"
  Message.Error(Error.Text)
  Return

End
...but I expect its just a remnant from an earlier edit.

5. In the Sub mnuDelete_Click() routine you have an unnecessary Return, which for me is ugly (...yes, I'm a bit of an old woman). This routine could easily be re-written so that Return is not necessary. Also, a '2 Case' chunk of code can always be replaced by an If...Then...Else block which in this case would make it easier to read.
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Simple File Cabinet

Post by cage »

stevedee I also programed in C. However lost interest as the newer versions came out. Anyways I made the changes you suggested except the if statements and found one problem caused by my updates which I fixed. Steve is there a way to delete the previous versions from the board as I don't want to clog up you disk space with older versions. The latest version is now in the first post above.
Last edited by cage on Wednesday 11th December 2019 5:28am, edited 1 time in total.
User avatar
Got2BeFree
Posts: 91
Joined: Saturday 26th November 2016 2:52am
Location: Lost

Re: Simple File Cabinet

Post by Got2BeFree »

To edit a post, go to that post and look at the top right corner. You will see a pencil. Click on it. From there you can manage attachments and content (just like making an original post). When done, click "Submit".

Putting the newest version in your first post IMO would probably be the best location since new readers would always see the newest version right away, and thread followers would know right where to look for the newest version.
sholzy

I'm wondering around lost in the past, not knowing where the present is.
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Simple File Cabinet

Post by cage »

Thanks Got2BeFree, I did it. Stevedee thank you for you help. I use to have a friend who would test out my programs and if there was a bug he would find it. Unfortunately he passed away some years ago from cancer. I miss him allot and he was a person the always pushed me into making my programs better.
Post Reply