DB Kit issues

Xojo 2023r4 on MAC

  1. When changing an existing textfield to dbkit.textfield the DBKit section does not display in inspector and the textfield does not populate.
    Dragging a project DBKit.textfield to the webpage works correctly.

  2. When placing a DBKit.textfield on a page panel, the field does not populate.

1a.- Long-standing bug, the Inspector information does not update. Workaround save your project, move/change something a little then use ‘Revert to Saved’, which will make the DBKit section show on the inspector.

1b. and 2.- I’m not sure what “field does not populate” means.

Thanks Alberto
“Revert to saved” worked

  1. the data from the database never gets applied to the dbkit.textfield (does not get bound to the database field)
    After doing some more research i have found any dbkit control added to an organizer i.e page panel, rectangle etc. fails to be added to the BoundControls.Add(cntrl) .

to recreate the issue take a working DBKit.Textfield and drag it onto a rectangle.

As a work around I found you can add me.Bind(Connector1) to the opening event of the control


in this case

I think I found the issue,
Not sure how to fix.

in DBKIT. BindControls
layout.Controls is a webpage and I guess the problem is it just iterates through the top level webpage controls and never checks controls embeded in another control.

If Table = "" Then
  Var e As New DatabaseException
  e.Message = "The Table property for an instance of DBKit.Connector cannot be nil."
  Raise e
  Var controlTabIndex As Integer = 100000
  For Each c As WebUIControl In layout.Controls
    If c IsA DBKit.Control Then
      'Now let's find out which DBKit control is first in the tab order
      If (c IsA DBKit.TextField Or c IsA DBKit.TextArea) Then
        If c.TabIndex < controlTabIndex Then
          controlTabIndex = c.TabIndex
          firstDBKitWebControlInTabOrder = c
        End If
      End If
    End If
end if

Maybe @Geoff_Perlman can make a note and add code to check DBKit controls within another parent in a WebPage. I haven’t played with DBKit, thank you for finding this.

I loaded DBKit for Desktop and it refresh correctly, so the trick is only for Web. I think I saw a bug report about this, if I can’t find it I will create a new one as Web should work the same as Desktop.

My work around only partially works, if all controls have a parent the
the variable below does not get set


Please file an issue on this and I’ll look into it.

1 Like

I’m having trouble reproducing this. I just added a page panel to the web version of the DBKit example then dragged one of the textfields on the page to it and ran the example. The values appear in the textfield. What am I missing?