Search results

  1. O

    Calling function from .NET WebBrowser

    I have never used this control but had a quick look - Progress 11.7.4 - and found the exact same problem. Tried the following as well but nothing: webView21:Show(). Checking on the changed events and they never fired: METHOD PRIVATE VOID webView21_LocationChanged( INPUT sender AS...
  2. O

    Table Data Records

    I am really not sure on this. It may be possible you want something like this: /* Firstly create a dynamic temp-table for all the required fields */ CREATE TEMP-TABLE hTemp. /* Add all the fields */ FOR FIRST _file NO-LOCK WHERE _file._file-name = "test" ,FIRST _index OF _file NO-LOCK...
  3. O

    Table Data Records

    The error means one of your handle variables has not been created or set: If I had to guess it looks to be fh as you are referencing it but cannot see where it is being assigned/created: hTemp:ADD-LIKE-FIELD(fh:NAME,fh). ... ASSIGN fh = bh:BUFFER-FIELD( _field._field-name )...
  4. O

    Table Data Records

    As Stefan has posted it is really not easy to make heads nor tails of your code. Are you trying to create a single JSON file of all the tables or separate JSON files for each table? If the former then a bit of thought is required because as Stefan posted JSON is not a line based format, you...
  5. O

    Table Data Records

    With a dynamic temp-table it is the variable handle you use: hTemp:WRITE-JSON(vTargetType, vFIle, lformatted).
  6. O

    Convert some simple .net code to progress code

    I came to the solution with a bit of trial and error. In most cases you can normally assign directly as in this example: DEFINE VARIABLE oStartInfo AS System.Diagnostics.ProcessStartInfo NO-UNDO. DEFINE VARIABLE oVerbs AS "System.String[]" NO-UNDO. oStartInfo = NEW...
  7. O

    Convert some simple .net code to progress code

    I have not worked with System.Windows.Forms.DragEventArgs so a rough translation only but hope it points you in the right direction: PROCEDURE Form1_DragDrop: // or if a class METHOD PUBLIC VOID Form1_DragDrop (INPUT sender AS System.Object, INPUT e AS System.Windows.Forms.DragEventArgs)...
  8. O

    Problems with converting a piece of .net code to progress - MemoryStream

    A bit of a long shot, but if you read each byte and add the characters together does the file name appear anywhere?: DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE j AS INTEGER NO-UNDO. DEFINE VARIABLE vCharacters AS CHARACTER NO-UNDO. j = FileGroupDescriptor:Length - 1. DO i = 0 TO j...
  9. O

    Problems with converting a piece of .net code to progress - MemoryStream

    Unfortunately I have not worked with memory streams or System.Bytes so cannot answer your questions of what everything is actually doing. The code posted was a best guess at what I thought the ABL code could be. Having a fresh look though I wonder if the two lines should be something similar...
  10. O

    Problems with converting a piece of .net code to progress - MemoryStream

    I think this could be a rough translation of the code: DEFINE VARIABLE FileGroupDescriptor AS "System.Byte[]" NO-UNDO. DEFINE VARIABLE theStream AS System.IO.MemoryStream NO-UNDO. DEFINE VARIABLE fileName AS System.Text.StringBuilder NO-UNDO. DEFINE VARIABLE i AS INTEGER NO-UNDO...
  11. O

    Question Paged outputs "next-page" event

    Depending on the report it may be possible to distinguish by checking line-counter, page-size or page-number: DEFINE STREAM p1. OUTPUT STREAM p1 TO PRINTER /* PAGE-SIZE 58 */ PAGED. ... IF LINE-COUNTER(p1) > PAGE-SIZE(p1) THEN DO: ... END. // or IF PAGE-NUMBER(p1) <> vPrevPage THEN DO...
  12. O

    Calling function from .NET WebBrowser

    As Cringer points out AppBuilder does not do OO so not possible directly. However, if this is correct and Chromium can be used for Winforms then it may be possible: https://thechriskent.com/2014/08/18/embedded-chromium-in-winforms So what you could try is embed an AppBuilder window onto a...
  13. O

    Question Display HTML File

    There is also the .NET Web Browser which was highlighted in this thread: https://www.progresstalk.com/threads/calling-function-from-net-webbrowser.200196 Also the Microsoft Webview, but from this thread seems a little tricky to implement...
  14. O

    Answered Sucession of if else if with some weird behavior

    The rough example you posted should reach condition4 as this does: DEFINE VARIABLE condition1 AS LOGICAL NO-UNDO. DEFINE VARIABLE condition2 AS LOGICAL NO-UNDO. DEFINE VARIABLE condition3 AS LOGICAL NO-UNDO. DEFINE VARIABLE condition4 AS LOGICAL INITIAL YES NO-UNDO. IF condition1 THEN...
  15. O

    Unable to find and edit the source code of GUI application

    Rob has outlined things perfectly and you should have been provided with a lot more information. This error usually always means the program has a shared variable defined in it something similar to: DEFINE SHARED VARIABLE company AS CHARACTER NO-UNDO. So this suggests the program is not run...
  16. O

    Unable to find and edit the source code of GUI application

    Is the full path of the ".i" in the ".w" file or is it just the name of the ".i" file? If the latter then the common reason for the error is that the path where the ".i" file resides is not in the PROPATH:- https://knowledgebase.progress.com/articles/Knowledge/P4891 To check the directories...
  17. O

    System.Text Namespace Crash

    It seems to suggest there is a problem with the .NET bridge link, and as Cringer outlines there may be a protrace or procore file that could list the reason. If instead of 'NEWING' you have something like this does it crash as well?: MESSAGE System.Text.RegularExpressions.Regex:IsMatch...
  18. O

    Question Output page numbers in text file

    It may be due to not having HEADER in the FORM definition or the displaying of the frame is in the wrong place. If you run this against the Sports2000 database you will see page numbers and hopefully it points you in the right direction: FORM HEADER SKIP(1) "openord-site...
  19. O

    Question What is the most efficient algorithm for reversing a character string

    Cringer's solution is a nice one. The best I could come up with is this: DEFINE VARIABLE vCount AS INTEGER NO-UNDO. DEFINE VARIABLE vResult AS CHARACTER NO-UNDO. DEFINE VARIABLE vText AS CHARACTER INITIAL "a2c-4e6-g8H" NO-UNDO. DO vCount = LENGTH(vText) TO 1 BY -1: vResult = vResult +...
  20. O

    OpenEdge GUI .NET - rowpostpaint

    I have not used a Datagridview so cannot really offer much help, but one thing that I wondered about is should Cells be a number? So try using the column number the field numero is in. So say it is column 3 the code is: message dgAcoes:Rows[e:RowIndex]:Cells[2]:Value:ToString() view-as alert-box.
Back
Top