Share My Creation BJ Notes

BJ Notes is a small program to keep notes and snippets of code about a topic.
Create Categories which are particular subjects of the overall topic.
Add Items and Data for each Category.
Search for particular words in the Items or Data areas.
Delete particular Items or whole Categories.
Editing Items and Data.
Select All, Copy and Paste are available in the Data text area.

The help.zip file should be uncompressed and placed where the data folder is.

Tested on Mac OS X Lion, Windows XP and Windows 7.

EDIT: Version 1.5
Increased Data Text Area Font Size In all Modules To 15px;
Private qualifier added To Subs In the Class Modules
Category Module - Edit function To Edit the Name of a Category
Items Module - Show current Items List For the Selected Category
In Search Module - The Category Is now displayed In RED colour when a found Item Is clicked.
BJNotes.ico File To be used For Shortcuts.

NOTE: Messages Library required when compiling code. See reply #5 below for directions.

BJ Notes Version 2 - See notes below for changes and additions
NOTE - The same Database is used.
 

Attachments

  • BJNotes1-5.zip
    18.6 KB · Views: 381
  • help.zip
    205.3 KB · Views: 521
  • BJNotesIcon.zip
    509 bytes · Views: 376
  • BJNotes2-0.zip
    20 KB · Views: 306
  • BJNotes2-50.zip
    21.4 KB · Views: 324
  • BJNotes2-60.zip
    23.5 KB · Views: 444
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
SS-2013-12-19_08.52.59.png
 

David Carr

New Member
Licensed User
Longtime User
When I try to compile I get :
Error description: Unknown type: msgboxes
Are you missing a library reference?

How do I fix that?
Sorry I'm new to b4j.
 

stevel05

Expert
Licensed User
Longtime User
You need to download the MsgBox library from here copy the jar and xml to your additional liibrary folder. If you can't see it in your Library tab in the IDE, right click and select refresh, then select it.
 

Theera

Well-Known Member
Licensed User
Longtime User
Hi BPak,
Thank you for sharing,It's useful for my works.
 

BPak

Active Member
Licensed User
Longtime User
It uses Text files and was meant to save source code or tips etc.
The code or tips are stored in Data field which is a SQLite Blob field.
Have not tried to put an image or PDF file into the dbase.
Maybe the blob field will hold an image in Byte format?
A TextArea Control is used to display the Data which would not be suited to image.

B4X:
Sub CreateOurTables
    Dim m As Map
   
    ' Table for Categories
    m.Initialize 'clear the map
    m.Put("CId", DBUtils.DB_INTEGER)
    m.Put("Categories", DBUtils.DB_TEXT)
    DBUtils.CreateTable(SQL1, "Categories", m, "CId")

    ' Table for Items
    m.Initialize 'clear the map
    m.Put("IId", DBUtils.DB_INTEGER)
    m.Put("CId", DBUtils.DB_INTEGER)
    m.Put("Items", DBUtils.DB_TEXT)
    m.Put("Data", DBUtils.DB_BLOB)
    DBUtils.CreateTable(SQL1, "Items", m, "IId")
End Sub

Try roKnowz application in the Share Your Creations. He uses a WebView which may be more suited to displaying images.
 
Last edited:

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi All,

roKnowZ is able to display images stored in a local folder or website (use below as an example in the content description):
B4X:
<img src="http://www.rwblinn.de/bookgo.png" alt="Info">
<img src="file:///#PATH#/info.png" alt="Info">
Note: #PATH# is a placeholder and will be replaced by the appdir folder when displying the content in the webview.

It is NOT possible to embed images as roKnowZ uses TEXT fields and not BLOB fields.
 

stevel05

Expert
Licensed User
Longtime User
Hi BPak,

I've just started to use this to collect code I wan't to use infrequently so have to look up each time. I have a couple of initial observations:

It would be useful to be able to create a category while creating an item so you don't have to leave that screen when adding multiple items.

Once you've added an item, it doesn't appear in the list straight away, I had to select the category again to get it to appear.

I use a two monitor system, if I drag the window to a second monitor, new windows and msgboxes are created where the original window was.

Thanks for sharing, it will be extremely useful.

Steve
 

BPak

Active Member
Licensed User
Longtime User
Thank you Steve. I will look at those issues.

Not sure about how the second monitor is an issue with the exe.?

I use the Notes for exactly the same reason - to keep code snippets on issues infrequently used.
 

stevel05

Expert
Licensed User
Longtime User
Not sure about how the second monitor is an issue with the exe.?

It's annoying when a new window opens on a different screen and you have to break concentration to find it. You would expect the new window to open over the place that the app currently is.

You can place the screen just before it opens by reference to the MainForm layout. The MsgBox doesn't seem quite that simple.
 

BPak

Active Member
Licensed User
Longtime User
You can place the screen just before it opens by reference to the MainForm layout

Could you give me example code for this?

The MsgBox doesn't seem quite that simple.

I could change it to a Form and give the Window it comes from as its parent?

Have the other two requests ok.

How do you think it would be to use the ComboBox in Edit mode to place in a new Category in the Items Window.

The prog would do the checking for existing Category and update a New Category from the Edit Field of the combobox in the Items window?
 

Attachments

  • CBox.PNG
    CBox.PNG
    9.7 KB · Views: 324
Last edited:

stevel05

Expert
Licensed User
Longtime User
Hi Bpak,

To center a new form in the existing window you could use something like:

B4X:
    Form2.WindowLeft = MainForm.WindowLeft + (MainForm.WindowWidth - Form2.Width) / 2
    Form2.WindowTop = MainForm.WindowTop + (MainForm.WindowHeight - Form2.Height) / 2
    Form2.Show

if you change MsgBox to a form, it would b the same code.

Yes editmode combo box should work, it then just needs to update the list when you return to the main window.

Thanks

Steve
 

BPak

Active Member
Licensed User
Longtime User
Steve, I have worked out a formula using the info you supplied.

Would you try this test app on your Two Screens and let me know if it works ok?
 

Attachments

  • WindowLocs.zip
    2 KB · Views: 287

stevel05

Expert
Licensed User
Longtime User
Hi BPak, yes that's it.

Thanks

Steve
 

BPak

Active Member
Licensed User
Longtime User
Try this on the two Monitors Steve. (Update in top post)

BJ Notes - version 2.0

Changes (19-03-2014):

In the Items Window -
1. The Show Current Items List is updated when a new Item is added.
2. New Categories can now be added by typing in the new Category in the Combo Box Value field.
The program checks for existance of the New Category before adding it to the Category Database.
The Category List is updated in the Categories Combo Box and also in the Main Window.

In the Search Window -
1. the Window is now resizable - with some restriction to the amount of size change.

All Windows are now Positioned relative to the Main Window.
All Msgboxes are now Positioned relative to the Window they are displayed from.
 

stevel05

Expert
Licensed User
Longtime User
The windows are all good, but the message boxes are still always on the main monitor, they won't accept negative values which is necessary for them to be displayed on the second monitor of my system. I'm not sure there's anything you can do about that at the moment though. I've asked Andrew if it's possible.

And it hasn't loaded my data.

Steve
 
Last edited:

BPak

Active Member
Licensed User
Longtime User
Loads data ok for me.

Create a new folder.
Copy old 1-5 contents into it.
Delete the BJNotes.jar file
Put the new BJNotes.jar file in.
Double click BJNotes.jar and it runs and loads the data.

Wait on Andrews response before addressing Message boxes.

Have found small flaw in prog (New Cat entry Exists) so will upload it again this afternoon.
 

Attachments

  • FolderContent.PNG
    FolderContent.PNG
    2.4 KB · Views: 285
Top