 |
LetItBe 0.3.0 Tutorial
Copyright 1998 Pascal Goguey. All rights reserved.
 |
0. You don't like reading docs?
Don't bother. Go directly to the tutorial
and play with the software. |
Before further reading: the present version of the package (0.3.0.1)
is almost the same as 0.3.0. The main difference is documentation. I didn't
publish the password of the little demo I have set up. And since the tutorial
was missing, I have added one. Well, if you are looking only for the password,
the login of the file I have setup is : username = "guest", password =
"hello".
Let it be is a database software. Due to its early development stage,
it is still missing important functionalities, but there was none running
on BeOS, and I needed one...
A first version has been released in July, arbitrarily named 0.1.0
which was basically a proof of concept, allowing the user to create his
own user interface at run-time.
According to the feedback I got from this first release, there was
clearly a need to improve the graphical user interface. This GUI
improvement, together with a messaging interface bring to this program
a certain level of user-friendness.
For those who wonder where the version 0.2.0 is gone, there has been
one, but it was not published because the object editor was a lot too slow.
 |
1. What it does.
LetItBe is an intuitive WYSIWIG single-window software (except dialogs
and popups).
Basically, it lets you edit layouts and write data in these layouts.
A third feature is a message-based data stuffing ability that will be presented
in chapter 1.3.
LetItBe saves the data as soon as they are produced. The save function
is almost useless, since it automatically saves the last record when you
want to enter a new record. The only function of the "save" is to store
the last record.
LetItBe is multi-user. The present version implements "fake" passwords.
Fake, because I still need to implement an encryption before storing the
passwords in the file.
Fig. 1. shows a block diagram of the 0.3.0 implementation. In
later releases, the file could run separately as a server, and the GUIs
could run separately as clients (for instance in a network environment).

This version has three interfaces. Two are visible, one is not. These interfaces
are:
-
The data access interface;
-
The layout editor interface;
-
The message interface.
Here is a more accurate description of the interfaces: |
 |
1.1. The layout editor tab.
It lets you create an interface layout and save it in the data file.
Both interface and data are saved in the same file. The present version
allows you to create only two kinds of objects, captions and text fields.
This editor's interface looks very much like the interface of drawing
softwares. The objects can be created, resized, deleted, moved, copied
with the mouse and / or standard shortcut keys.
The texts and labels alignments can also be set with the mouse by clicking
some hotspots.

The object editor has also a menu bar and a tool bar that I will
describe now in detail. Then, I'll describe the editor a little bit further..
1.1.1. The menu bar
The menu bar includes 5 submenus, Edit, Format, Arrange, Options,
View. Here are some details about these menus
-
The Edit menu: it has the following submenus:
-
Creation menu. You can create (only!!) two types of interface objects:
captions and text fields.
-
Then, there are items which are pretty standard, allowing to cut,
copy paste, and select all. Another item, repeat, allows to repeat the
last created object in its default shape.
-
The last item is the save function, allowing to store the current
layout, including the fonts, in the database file.
-
The format menu: basically, it allows to set the fonts to the objects.
This is also a very standard implementation. When no object is selected,
the format menu sets the default font. When an object is (or a group of
objects are) selected, the font change applies to the selection. For objects
with more than one font (I mean for the caption because it is the only
one with more than 1 font), the font change applies only to the selected
part of the object. In the caption case, label font can be set by selecting
the caption's label first (one click) and then setting the font. I will
not specify all the submenus in detail. They are very standard.
-
The options menu:
-
The first two menu items set and release the templates.
-
The last item of the options menu is also standard and sets or releases
the autogrid mode.
-
The view menu.
-
The first item allows to show / hide the drawing grid.
-
The second one allows to show / hide the hotspots. Well, just try it. It
is useful only at the first use of the program if you don't know what to
click. The red corners delimitate the resize handles. The yellow rectangles
are the alignment rectangles. Clicking the rectangle which is at the right
of your text moves it one step to the right. One step shall mean that if
the alignment was on the left, it will be center, and if it's in the center,
it will be on the right. Same for the left rectangles.
-
The last item (enable paste marker) shows a mark where the copy or cut
selection will be pasted. In fact, it is the center of weight of the objects
you will paste.
1.1.2. The tool bar
In this version, the toolbar is only dedicated to objects' alignment.
I think the 6 first buttons' bitmaps are quite clear, and anyqay, there
is a help string wjen the mouse passes on the buttons. The 7th button aligns
to the grid. See the first figure to have an idea.
1.1.3. More about the editor
As said previously, all the components that can be edited (ahem, I
mean, the 2 components that can be edited) can be managed with the mouse
according to a standard scenario (corner handles for resize, drag for move).
Alignment: The alignment of the strings can be set using the
mouse. The best way to understand where to click is to use "View->Show
Hotspots". The red rectangles on the corners indicate the areas that can
be clicked to resize the object. The yellow rectangles indicate the alignment
spots. Clicking on a yellow area will move the alignment one step towards
the clicked area. For instance, if the string is left aligned and you click
on the right rectangle, the alignment will move to the center. A subsequent
click sets the alignment to the right. Well, try it and you'll see what
I mean.
Templates: imagine that you set up a first caption with a label
font, a text font, and the related sizes, and that you want to generalize
its use to all your database. Set it as a template, and all the subsequent
Edit->New Object->Caption calls will clone the template caption. Note that
the template caption can be modified without being released. When a template
is set, its corners become red (default is black), and they become pink
if the object is not selected. |
 |
1.2 The Database Access tab:
The database tab access allows only to store, delete, and find data.
For the time being, only text can be entered, but for the file point of
view, nothing prevents to store anything as long as it is digital data.
For the caption, just double-click it and you'll be allowed to enter
data. For the text field, just select it. I'll work towards a more homogeneous
interface.
If you select "new record", all the fields will be empty, and you can
enter new data. At the same time, "new record" stores the previous data
if any.
Delete record removes the currently displayed record. |
 |
1.3. The message interface.
As briefly said previously, it is now possible to stuff the database
from an external program. In order to demonstrate it, I wrote a quick &
dirty app that sends messages to the database.
How to stuff the database is simple:
Suppose you have n fields in your database. You have to send a long
string containing all the fields, without any separator. For instance,
the quick & dirty interface I wrote has 5 fields, name, first name,
address, phone and fax. If you want to send a messsage to LetItBe, you
have to:
-
Create a BMessage with the "what" equal to 'SDat',
which stands for "store data".
-
Create a data pointer containing all your data. For instance, if you want
to store: name = "Goguey", First name = "Pascal", address = "just
here", tel = "22_a_Asnieres", fax = "Near_My_Computer", you'll have to
create the following string, called for instance DataString:
"GogueyPascalJust here22_a_AsnieresNear_My_Computer"
-
Add this string to your message with the label "data".
-
Then, you have to send to the file some info about where your fields should
begin and end. You have to create a pointer of int64, the lenfth of which
is the number of fields:
int64 * Map = new int64[NumberOfFields];
Now, fill this pointer with the length of your fields' contents. In
the above case, it would be: Map[0] = strlen("Goguey"), ...., Map[4] =
strlen("Near_My_Computer");
If you want to skip one field (leave it empty), set the pointer to
Map[i] = -1;
-
Add this map to your message with the label "map".
Then, you send it, and the file interface should take care of it.
-
Last thing, you have to tell the database where you want to store the data.O
stands for the beginning of the data space, i for an arbitrary index, but
less than the number of records already in the file, and -1 for the last
position in the file. This must be added with the label "where".
|
|
 |
2. The next versions:
-
The find function will be enhanced. The current find is only sequential,
and therefore inefficient.
-
New objects will be implemented in the future, especially separators, boxes,
etc...
-
As the roots of this program were a Japanese/French dictionary, a dictionary
file will be provided (after R4 for Japanese support). Some support for
existing dictionaries will be added.
-
Porting to Intel will be done as soon as I find a cheap PC.
-
Printing will be implemented in an upcoming version. But I have absolutely
no experience with printing and cannot say when.
|
|
|
|
 |
3. Bugs: Please send me
the bugs you find and if possible the conditions in which they occured.
As I have made many last-minute bug fixes in ANSI shitty code (exactly
like for version 0.1.0), I am afraid many last-minute bugs have been introduced...
known bugs:
- The editing of the text field is erratic, especially when setting
a default string.
- The find function does not work well.
- Many others that you are ing to report to me.
Please put "LetItBe_Bug" in the subject line of your mails for filtering
reasons. I'll try to keep a regular update on my web
page. Stay tuned!
This version will be "frozen" for a couple of weeks for code cleaning
and debugging reasons.
|
 |
4 Copyright & license.
This version is free for the time being, and may be freely copied /
distributed. I have read somewhere a suggestion of "Beerware" which sounds
very interesting. I don't know if international beer coupons exist, but
if it does, please send me one. 1 user license: 1 beer. 10 users license:
a six pack.
Although I would like to release a shareware or commercial version
in the future, I will keep a free version with at least the functionality
of this one. |
|
 |
5 Disclaimer.
No warranty of any kind. By using this software, the user agrees that
the author cannot be held responsible of any problem on his software and
hardware. |
Copyright ? 1998 Pascal Goguey. All rights reserved.
|