Search results

  1. D.Cook

    AVM Memory leak problem

    I have a persistent batch procedure that seems to grow in memory over time, and am having a hard time determining the cause. Generally I've always thought the AVM handled memory pretty well, and after reviewing the code I cannot find any glaring problems: Most logic is encapsulated in...
  2. D.Cook

    Get database field data-type at compile time?

    Thanks Stefan, was hoping to do this automatically without manual steps, but that is an idea I hadn't thought of.
  3. D.Cook

    Get database field data-type at compile time?

    Ok this is a long shot, but any ideas on how to determine the data-type of a database field (or any variable) at compile time? For example: ADD FIELD "myfield" OF "mytable" AS integer &IF data-type(mytable.myfield) EQ "integer" &THEN intVar = mytable.myfield. &ELSE chrVar =...
  4. D.Cook

    -cpinternal parameter being ignored in Windows

    OK must be crazy: I just discovered that the database is UTF-8. >proutil rstr -C convchar analyze ISO8859-1 OpenEdge Release 10.2B as of Mon Dec 14 17:02:01 EST 2009 Database is encoded using UTF-8 for character data types. (3939) So running with -cpinternal of UTF-8 works fine. But the error...
  5. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    If you also use PROCESS EVENTS during the loop (eg every few seconds or every million records), the window will be movable and respond to other events. But it will only respond as often as PROCESS EVENTS is called. Cringer - will do.
  6. D.Cook

    -cpinternal parameter being ignored in Windows

    I hope I'm not going crazy, but when I try to do an index build on Windows my -cpinternal parameter is being ignored! I'm sure I've come across this in the past, but had assumed that I had too many parameters and the last few were truncated. But today I've tried a very simple thing and it's...
  7. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    Thanks, I have ended up using the DisableProcessWindowsGhosting method, as it gives the desired behaviour. The window does not 'frost' and the display continues to update. Have logged a case with Progress, but this result will do the job. To define the procedure: PROCEDURE...
  8. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    I have just tested with no restriction on PROCESS EVENTS (ie it is executed every time in the loop, many times a second), and when another window gains focus, this one is marked Not Responding after only a few seconds. But if the window keeps focus it will usually be ok. So it looks like even...
  9. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    Actually the more I think about it, maybe this is an issue that should be fixed with the AVM. Because it happens not only in long loops, but when running a program that needs compiling (ie in dev environment). Also if a process takes a long time to open a new window (eg compiling or some app...
  10. D.Cook

    Appearing as "Not Responding" more often in Windows 7

    Windows 7 (as opposed to XP) has a different mechanism that decides how a window is not responding. When a window is deemed not responding, the words "Not Responding" are added to the titlebar, but most annoyingly, any further window paints (at least, DISPLAY or MESSAGE statements) are ignored...
  11. D.Cook

    How to Convert Integer to Character?

    DISPLAY "" @ intfield. /*or*/ intfield:SCREEN-VALUE = "". When assigned, the field will default to 0. Edit: that is, you cannot store a blank (" ") value in an integer variable, only 0 or ?. Edit: changed INPUT-VALUE to SCREEN-VALUE as posted by timk519 -- INPUT-VALUE is readable only.
  12. D.Cook

    Add shortcut for GO event

    Ahh it just hit me! on CTRL-RETURN anywhere apply "GO" to self.
  13. D.Cook

    Add shortcut for GO event

    I'm trying to figure out a generic way to add a shortcut to the GO event (in addition to F2). Specifically I'd like to use CTRL-RETURN as an easy way to submit any form in our application. My thoughts were to get a reference to the currently selected (if any) field widget (eg fill-in). So far I...
  14. D.Cook

    Manually throw an exception?

    I see, so "UNDO, THROW e" will throw an exception, but also run the undo logic for the current block. Considering that normally an error will also initiate an undo of the block, using the UNDO statement seems pretty logical and safe to me. Especially considering our programming practice is to...
  15. D.Cook

    Manually throw an exception?

    OK it seems like a standard function, but I can't actually find a way to throw an exception! In the documentation it is an option for DO ON ERROR UNDO, THROW ... but what if I want to throw an exception based on a condition? Am I missing something?
  16. D.Cook

    Converting integer field to character field

    Hmm I think I see your point about DB dependencies. Perhaps instead of LIKE, using a global preprocessor directive might be a better option (in theory). Eg DEFINE VAR myvar AS {&myvar_type}. /*or maybe just*/ {defmyvar.i} But our application is dependent on the DB in just about any way I can...
  17. D.Cook

    Converting integer field to character field

    Thanks for the input guys. Yep we will be doing a dump and load, there will be other database changes so it's easier that way. Thankfully we're generally pretty good at using 'like' in variable definitions, although sadly there's still hundreds of code changes anyway.. Larry thanks for the...
  18. D.Cook

    Converting integer field to character field

    We are going through the process of converting an ID field to allow character values in it. So basically converting it from an integer field to a character field. Firstly, has anyone been through this before and have any tips or advice about potential less obvious problems? And secondly, Is...
  19. D.Cook

    Delete Folder With Progress

    Or just to be safe ;) lv-Directory = os-getenv("USERPROFILE"). Edit: sorry I should be more helpful, you cam access the ABL reference from the Procedure Editor by clicking Help > OpenEdge Master Help. Or look for ABL reference here: http://communities.progress.com/pcom/docs/DOC-103525
  20. D.Cook

    Is there any nice way to eliminate Tab in a Text

    I haven't tested an editor widget, but I do know that you can replace tabs in a character variable quite easily. The tab is character 9, or you can use the shortcut "~t". strValue = replace(strValue, chr(9), " "). same as: strValue = replace(strValue, "~t", " ").
Back
Top