DBKit YouTube Tutorial Problem

Dear All,

I have been working through this YouTube tutorial from Geoff on DBKit. DBKit has changed in organization considerably since the video was released. However, one can still work through it, at least to a point.

I have run into a problem of app behavior that I can’t quite figure out.

If this behavior is a bug, I will submit it as an ‘issue’. However, it is more likely that I am making a mistake.

To start, here is a screenshot of the XOJO project

Uh, No, that is our farm logo. Here is the project window. Probably.

This is just before 13:17 in the video.

I hit run, and all works great. I enter a ‘G’ in the search field:

Then I enter an ‘r’ to get just Grace, and this happens:

I click Cancel on the popup window, and I get this:

I have found the first time ‘ConfirmUnsavedChanges’ shows up in the stack:

I don’t want to submit this as a bug if I am just making a stupid mistake. What do you all think?

My project file is here:

Any help with be greatly appreciated. If it is a bug in DBKit, I will submit it.

Regards,

Tom

Dear All,

I solved the problem, though my solution may create problems down the line.

In the DBKit.Connector.LoadSelectedRow method I added a call parameter DisableRowChangeCheck As Boolean=True, then changed the method by adding at the beginning

//Added a Boolean parameter to the method call to Disable RowChange Check
//Default is True. This clears up a problem when loading a listbox from a search field


If DisableRowChangeCheck Then AllowCheckForRowChange=False

Then in the DBKit.SearchResultsListBox.AddRowsFromRowSet, I changed the LoadSelectedRow call from

If RowCount > 0 Then
  SelectedRowIndex = 0
  Connector.LoadSelectedRow
End If

to

If RowCount > 0 Then
  SelectedRowIndex = 0
  Connector.LoadSelectedRow(False)
End If

This seems to have solved the problem.

Tom

Except now when a user changes their listBox row selection there is no check to see if changes were made in the entry fields :frowning_face:

Dear All,

So I have found no solution, so I am going to put in a bug report. I still feel I might have made a mistake. Oh well.

Make sure that you provide the database that you are using or put a note if is the one that Xojo provides on their examples.

Thanks. I have let them know it is the Eddie’s Electronics SQLite db as used by Geoff in the YouTube tutorial.

1 Like

In case any cares, the issue report is here: https://tracker.xojo.com/xojoinc/xojo/-/issues/75395

I think you mean this one: #75395

Alberto,

Yes. Fixed. Thanks tons!

1 Like

I am trying to follow this tutorial as well and cannot get pass this code:

SearchResults.AddRowsFromRowSet(rs)

I get this error:

WinStories.SearchForStories, line 9
Type “DBKit.QueryRowsListBox” has no member named “AddRowsFromRowSet”
SearchResults.AddRowsFromRowSet(rs)

There seem to be changes to the code since the video was made, is there a chance there will be a new updated video to follow?

I cannot get the New Button to work in my DB Kit project. It is a DBKit.NewButton and is on the same Window with a listbox. All other buttons do work as expected. Is there anything I should do to make it work?