Jump to content

gbh100

uniGUI Subscriber
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

gbh100's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Is this ready for production systems? Is there a status grid showing the changes in UNIGUI 1.99 vs the 2.0 roadmap or even vs 1.95
  2. yes all good
  3. Thanks. AjaxEvent.zip
  4. I am trying to tokenize a credit card in Square using the code below. I can't get the AjaxEvent to fire. Any suggestions? procedure TMainForm.UniFormCreate(Sender: TObject); begin UniHTMLFrame1.HTML.Text := '<script src="https://sandbox.web.squarecdn.com/v1/square.js"></script>' + '<div id="card-container"></div>' + '<button id="card-button">Pay</button>' + '<script>' + ' async function initializeSquare() {' + ' const payments = Square.payments("YOUR_APPLICATION_ID", "YOUR_LOCATION_ID");' + ' const card = await payments.card();' + ' await card.attach("#card-container");' + ' document.getElementById("card-button").addEventListener("click", async () => {' + ' const result = await card.tokenize();' + ' if (result.status === "OK") {' + ' if (typeof window.external !== "undefined" && typeof window.external.triggerEvent === "function") {' + ' window.external.triggerEvent("SquareToken", { token: result.token });' + ' } else {' + ' console.error("UniGUI triggerEvent is not available.");' + ' }' + ' } else {' + ' console.error("Tokenization failed:", result.errors);' + ' }' + ' });' + ' }' + ' initializeSquare();' + '</script>'; end; procedure TMainForm.UniHTMLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var Token: string; begin if EventName = 'SquareToken' then begin Token := Params.Values['token']; ShowMessage('Token received: ' + Token); end else ShowMessage('Unknown event: ' + EventName); end;
  5. Thanks, that worked. How do I do this for only one DBGrid in the project? In order for me to do this without all of these questions is it just learning Javascript or is there a better path to the necessary knowledge?
  6. Is there an example I can use on how to add this to CSS file. Please forgive my ignorance as I'm new to unigui
  7. I have a simple project where we want to use larger fonts in a grid. Simply changing the font creates characters being cut off. Shouldn't uniGUI be able to handle a simple formatting change like this on its own? uniDBGrid.zip
  8. I had this same issue. I located the record in the underlying dataset and it was selected in the grid, however the selection was not showing unless it was in the top rows. How do you make the grid show the current record.
  9. gbh100

    dbGrid refresh

    Here is the code: procedure TfrmEditTeam.grdBattersDblClick(Sender: TObject); begin frmPlayerEdit(True, qryBatters_ID.AsInteger).ShowModal; qryBatters_.Refresh; end; As you can see there is not much to see here. The frmPlayerEdit is an editing form with its own instance of the table being edited. The table is refreshed after the change and does get the updated information as the VCL version works. I have tried closing and opening the table and that has the same results. When I double click another or even the same row to initiate another edit I see the underlying grid update before the new edit window is drawn. It seems that the mechanism notifying the web client of a change is not aware of any changes to notify the client about.
  10. gbh100

    dbGrid refresh

    The edit is not actually done on the grid, but rather a modal window is used to perform the edit. After the modal window edit is completed I use a dataset.refresh to try and get the updated information. It works fine in the Win32 application. The dataset is actually a query and I also tried closing the query and re-querying which also works fine in the Win32 app but not in the Web version. Is there a way to force the web screen to update? I'm sure the underlying dataset has the new information in both cases but the web screen is unaware of the changes.
  11. gbh100

    dbGrid refresh

    I have an application where I open a window to edit information contained in a grid. After the line has been edited in the other window I refresh the table in the host grid and the changes are shown. this works fine in the Windows App but when I run it in a browser (IE9) the change doesn't show until I go to edit the same line again. Is there something I have to do to refresh the web version of the grid? Is this a bug or just my being lame?
×
×
  • Create New...