About a Module called mSQLite

I just discovers that the Auto-Complete feature (Xojo 2017r2.1 / El Capitan) does not works on a Module I called mSQLite for obvious reasons.

Worst, mSQLite.+tab displays the list of SQLiteDataBase Members…

The compile is OK.

This is in a brand new project and the only “bug” (or strange behavior) is… the DB variable set in App.Open Event is Nil when I want to use it (in a window) while it is valid in App.Open.

That is the reason why I added code (for checking purposes) in that Window Open Event… discovering that strange thing.

Nota: I am developing this project using Xojo 2015r1 and test the Behavior running Xojo 2017r2.1 (to be sure the Behavior exists in current).

Someone have a clue on what happens ?

BTW: yes, I can change the Module name to something else, but I have a ton of variables in that module that I call with the Module name (and that is how I call them …).
Now, if I have to change the module name… (I was thinking at mSQL, but it may fall into the same trap, so mData can be a candidate…)

Edit:
I forgot to mention that my Plugins folder is empty.

I also checked, a module named mSQL: it does not have this “feature”.

That is usually caused by dim’ing a local variable in App.Open and instantiating that. Remove any Dim xyz as SqliteDatabase in App.Open and either
a) you’ll get an error

  • or -
    b) it will just work (because the local variable had the same name as the global one and the local one was being set and used in App.Open, leaving the global one still Nil).

As for your autocomplete problem, I cannot reproduce it.

Are you sure you don’t have a line dim mSqlite as SqliteDatabase in App.Open?

Hi Tim,

everything is possible. One thing I do not say (probably) is that this project have very few code. In fact the App.Open Event is the location where most of the code resides (initialisation of the specialized Folders and Files [think Service Files or App Data]).

Of course, I will check, but… The only local variables (local to App.Open) are the files/folder names. The FolderItem are properties located in the mSQLite module and calles as mSQLite.PropertyName (with FI for FoolderItem, DB for SQLiteDataBase, etc.).

I have some .txt files (used to populates some PopupMenu / ComboBox).

Think that project is a mock-up: it gaves to the Client an idea of the interface and the process flow.

I initialized two .sqlite files and wrote only in one of them (I added a Return in line 1 of the method that wrote in the second .sqlite file because I have to make changes in the TABLE → I add some more fields / changes the name of some Controls.

The client was “A 3.14” (happy): not a single critic to what I show him this morning. “Only” one addition (Clients always have additions…).

Tim:

I loaded the project in Xojo 2017r2.1 and it shows that behavior.

No, but this can be. I am capable of doing that as a provision to a Property and I may forgot to type it after mSqlite…
I will check right now:

I searched for [Dim ] in the App.Open Event and I do not found Dim mSQLite As SQLiteDataBase. Maybe elsewhere…
Another search with Dim mSQLite returns only Commented lines (a pack of reminder Property lines with explanations; what they are / how to use them).

Any idea ?

OK: there was something wrong earlier. I just typed mSQLite. +Tab and now I get the list of available properties, what I expect.

I do not do that in App.Open Event, but in a Method in the mSQLite Module (just in case I have to call that Method more than once).