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

DBKit.textField

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
Else
  Var controlTabIndex As Integer = 100000
  For Each c As WebUIControl In layout.Controls
    If c IsA DBKit.Control Then
      DBKit.Control(c).Bind(Self)
      '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
  Next
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


firstDBKitWebControlInTabOrder

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?