Recent content by rusguy

  1. R

    Prime number generation

    The simpliest method would be using division DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE imax AS INTEGER INIT 100 NO-UNDO. DEFINE VARIABLE imin AS INTEGER INIT 1 NO-UNDO. DEFINE VARIABLE j AS INTEGER NO-UNDO. DEFINE VARIABLE isPrime AS LOGICAL NO-UNDO. REPEAT: UPDATE imin imax. DO i =...
  2. R

    Ascii

    are you looking for a function called "asc"?
  3. R

    BACKSPACE event ON LARGE editor

    value-changed should work for this
  4. R

    How to search all character columns of all tables in a database for a keyword ?.

    Don’t you think it will take forever to execute? In the case you still want to do it, then something like this would work for each _field no-lock where _data-type = "character", each _file of _field no-lock: disp _field._field-name _file._file-name. run...
  5. R

    use URL (cgi-bin) in a program

    you can use sockets to get data from a web page, or more simplier way is to use a 3rd party command line tool to do it. Something like curl would do the job.
  6. R

    BACKSPACE event ON LARGE editor

    This is a bug and the workaround doesn’t look all that nice and simple. Basically you need to save the contents of your editor on EVERY possible event and control what really is displayed in the editor. The code I posted earlier shows you how to control just the baskspace event. You would also...
  7. R

    BACKSPACE event ON LARGE editor

    You should definitely split it up - this is not very user friendly to allow users to type something in without allowing deleting their misspelled mistakes.
  8. R

    BACKSPACE event ON LARGE editor

    This is the quick and dirty code that could work as a workaround define variable c as character no-undo view-as editor inner-lines 5 inner-chars 40 LARGE. form c with frame a. def var cval as character no-undo. on "backspace" of c in frame a do: def var i as int no-undo. i =...
  9. R

    BACKSPACE event ON LARGE editor

    windows, "large" attribute doesnt apply to the *nix gui.
  10. R

    BACKSPACE event ON LARGE editor

    it seems like it only fails to work with "large" editor. This code fails (tested on v9.1d and v10.2b): define variable c as character no-undo view-as editor inner-lines 5 inner-chars 40 LARGE. form c with frame a. on "backspace" of c in frame a do: message "BS!". return no-apply. end...
  11. R

    Equivalent of a SQL subquery in 4GL ?

    something like this: for each SupportCall where AssignedTo = 'fred' no-lock: run yourLogic(buffer SupportCall). end. for each SupportCallHistory where SupportCallHistory.User = 'fred' no-lock break by SupportCall.Id: if first-of(SupportCall.Id) then for each SupportCall where...
  12. R

    Equivalent of a SQL subquery in 4GL ?

    I think it would be best to use 2 queries at the same time, something like this for each SupportCall where AssignedTo = 'fred' no-lock: run yourLogic(buffer SupportCall). end. for each SupportCallHistory where SupportCallHistory.User = 'fred' no-lock, each SupportCall where SupportCall.Id...
  13. R

    How to add xml stylesheet to xml by using the Sax-writer?

    turn off strict option: hSax:strict = false
  14. R

    How to add xml stylesheet to xml by using the Sax-writer?

    Look at write-processing-instructions method of sax-writer. In your case it would be something like: hSax:write-processing-instruction("xml-stylesheet", "type=""text/xsl"" href=""xslExample_fulltable.xsl""").
  15. R

    Form vs No Form

    It is expected functionality. If you want it to pause define the form inside of the for each block. def var sonbr as char. for each so_mstr where so_domain = "xyz" no-lock: form sonbr with frame a. disp so_nbr @ sonbr with frame a. end. Otherwise, Progress looks at it as a regular frame and...
Top