Search results

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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 +...
  11. 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.
  12. O

    OpenEdge GUI NET - "replace" for trigger

    In the okButton_Click method you are invoking an ABL event to a none ABL object which is not valid. I do not know how to do the same for a .NET object. The only thing I can instantly think of is set a keypress event and method for txtNumero and adjust the button method to send a return to the...
  13. O

    OpenEdge GUI NET - "replace" for trigger

    As Tom says, it is not easy to see from the code the actual problem. Just to be clear, is txtNumero an ABL fill-in or a .NET fill-in? If .NET then that could be the reason for the error. Try something along these lines: txtNumero:Focus(). System.Windows.Forms.SendKeys:Send("~{ENTER}"). This...
  14. O

    OpenEdge GUI for NET

    You can either set the method to be an extent or the best option is to make the method a VOID method instead: METHOD PUBLIC VOID CustomValue (OUTPUT oValor1 AS CHAR, OUTPUT oValor2 AS CHAR): oValor1 = "abc". oValor2 = "33". END METHOD. Then the calling code passes defined variables for the...
  15. O

    OpenEdge GUI for NET

    Yes, the sending of the input parameter is correct. No problem outputting a Temp Table, and there are a number of ways. The best option is to encapsulate the Temp Table into a single object and have access methods to work with the temp-table. This avoids passing the temp-table at all...
  16. O

    OpenEdge GUI for NET

    I normally call a dialog box using the examples I posted in my first post, and see that in teste2 you have done similar so that is okay. In teste1 you have the WAIT-FOR in the ShowModalDialog method and if you wanted values from that Dialog then this would be the workings: DEFINE VARIABLE...
  17. O

    OpenEdge GUI for NET

    I have never used DYNAMIC-NEW so do not know the reason. This article seems to confirm your problem: https://knowledgebase.progress.com/articles/Knowledge/P148058 As per the article, does DYNAMIC-INVOKE work instead: DYNAMIC-INVOKE(oForm, "CustomValue").
  18. O

    OpenEdge GUI for NET

    Previous post was incomplete. To obtain a parameter in the calling program two ideas: Pass the handle/object of the calling procedure/class either via the constructor or a method/property to the called class, and when accepted run the internal procedure/method from the called class: RUN...
  19. O

    OpenEdge GUI for NET

    One option is to invoke/record an OK acceptance and if accepted set the parameter then. Example 1: DEFINE VARIABLE oDialogResult AS System.Windows.Forms.DialogResult NO-UNDO. DEFINE VARIABLE oPrintDialog AS System.Windows.Forms.PrintDialog NO-UNDO. oPrintDialog = NEW...
  20. O

    "Simulate" Right-Mouse-Click Native | "Windows")

    I think I see the problem. Are you able to determine the fields/browses/etc. by walking the widget tree? If so, can you set the trigger doing something similar to?: DO WHILE hObject <> ?: IF hObject:TYPE = "BROWSE" THEN ON RIGHT-MOUSE-CLICK OF hObject PERSISTENT RUN whatever...
Back
Top