Save unusual Xojo Data Types in SQLite ?

Hi all,

at around 2:00 (earlier today) in the nigh, I woke-up and… powered on the MacBook, Fired Xojo and decided to store “Window related service data” into a Table… into a .sqlite file.

I recall nearly nothing from that, but… I stored diverse Data Types:

a. A RealBasic.Point (to restore the window Bounds)
b. Four Color Data Types (for the ListBox Add / Even / Missing and Folder Row background Colors),
c. The contents of a Comments field.

The Window’s Bounds were stored as String in the Database, and I “rebuild” the values with four lines / NthFields in a local RealBasic.Point, then I passed the value to my Property / or directly to the window (or both…)

The Color Data: I store them directly in the global properties (they were stored as String / retrieved as String)

The Comments field: String.

About RealBasic.Point: what strategy would you use ?

For the record, I fill Rect_Bounds (and Colors / Comment too) like this:

Rect_Bounds               = Service_RS.Field("Bounds").StringValue // Rect (4 integers)

[code] // Compute and store the Window Bounds
Dim myBounds As New Realbasic.Rect

myBounds.Left = Val(NthField(Rect_Bounds,",",1)) // x
myBounds.Top = Val(NthField(Rect_Bounds,",",2)) // y
myBounds.Width = Val(NthField(Rect_Bounds,",",3)) // w
myBounds.Height = Val(NthField(Rect_Bounds,",",4)) // h

// Store the values
prefServ_Bounds = myBounds // Now I am asking myself… Why this line !

// Apply the previously saved window location (x,y) and size (w,h)
Self.Bounds = myBounds // I also forgot to write this…

The code compile/runs fine in the IDE. It is called from this particular Open Handler, but it is not “linked” to something (Self.Bounds = myBounds is missing…)

My question is: since there are far more Data Types in Xojo than what is available in SQLite, how do you code this kind of stuff ?

Note to self: when I code at night like that, be sure to call the “Read” method, else the added feature will not work.
Note #2: Be sure to check if the just added method (feature) is really coded and called and works as expected !

I forgot to call two new features (but I realized in time) and the Window Bounds… I completely forgot !!!

I just finished to code correctly / check the saved Bounds.
(Saved data were done several weeks ago…)

use the following “transportable items” library within the project here :