Status Bar Text and Incomplete Answers

I have a specific question tied to a more general question.

A button runs a report. The HELP attribute on that button tells users what will happen when you hit the button (if they tabbed to it).

I want my ON CHOOSE OF trigger to do some validation, change the status bar message to "Running report...", and run it. The trouble is overriding the HELP attribute of the button.

In searching for answers here, there is a lot of talk about the STATUS statement. After trying many variations, I came upon this key piece of info in the reference.
The HELP attribute text overrides any status-area text issued by the STATUS statement.
OK, so that's why I am spending so much time trying "solutions" that will never work. Once again, ProgressTalk lets me down. We'll get back to that one.

Back to the problem. In a trigger. Need to change the status display while a report is running. HELP attribute is being a bully. Changing the HELP attribute doesn't get displayed. STATUS DEFAULT only displays when a message from the running report gets displayed at the end. That is too late.

I am tired of playing all morning with what should be a simple task. Can it be done? Or do I have to hatchet the existing code, remove the HELP attributes and add a bunch of STATUS statements? Am I better off tearing up the code worse and making a pseudo status area at the bottom of the frame and having total control of my own status message var? How could this be so difficult and how could this not have been addressed yet in some thread here (he cried to the heavens...)

-----

Concerning the general question, am I asking too much from this forum? Is it too much to ask that Senior ProgressTalkers add to their long and definitive answers some warning that omitting a key fact or a slight change in environment will cause the situation to completely change and cause you to grind your gears for an afternoon trying to get their solution to work?

Progress is powerful. There are a multitude of options to give you more control. Every situation cannot be guessed by those trying to help. Yadda yadda yadda.

There have been too many times that I've been let down by the omission of warnings of some of the pitfalls. Other times, the answers have been so situational as to be useless as any kind of general solution.

For example, I am working on a dynamic query and updatable browse mega-utility. I understand enough to realize there can be no template for such a browse that would meet all needs (although when I'm done with mine, I'll have a nice template for viewing and updating parameter tables, but I digress). The point is it still shouldn't be brain surgery. I can't tell you how many times I've gone down a road based on advice from a thread here and had to backtrack and start a new path.

I can only get to screen values of the browse updates to validate before saving them by referencing the Screen-Value of the ColumnHandle ??? OK, Progress... But that means I need to define the browse in such a way as to store the column handles. Which means that formatting the columns needs to be handled outside of the browse definition. BUT, if you do it in the browse-row-display trigger, you'll have errors if you need to set the browse to Read-Only while validating, so the only way to do it is to manually format the fields in your temp table. So, you can't use LIKE to define your temp table and must manually define all the fields. Progress may be powerful, but they could use a few more methods to make having complete control over a browse stop being a convoluted nightmare.

AT LAST TO THE EXAMPLE. In trying to loop through the browse rows (so I could get at the screen values through the column handles), I needed to select the first row and then iterate through them, working on the modified ones. MORE THAN ONCE, ProgressTalkers suggest using the SELECT-ROW method in similar situations. Nowhere in all the examples I was looking at was it mentioned that this method only starts on the rows IN THE VIEWPORT. Thank god I caught it in testing, but it worked when I had the first row in the browse in sight, but skipped all records above when I was scrolled down a page or more.

Of course, it's in the reference help for the method (once at the beginning), but the help also states:
Syntax

SELECT-ROW ( n )

n - An integer expression specifying the ordinal position of a row within the browse.
Gee, that part doesn't mention the KEY point of the position being IN THE VIEWPORT! Thanks Progress Help!

I didn't know whether to be more angry at ProgressTalk or Progress itself. Should their reference be clearer? Yes. Should they have a method (or at least an option in the current method) to select the first(!) row of a browse? Yes. If they want me to use the QueryHandle instead, they should have given me a way to access its Screen-Value.

Should ProgressTalk have already gone through this gauntlet? Yes. I mean, if ProgressTalk doesn't even have browses mastered, I'd be better served by praying for advice instead of looking it up.

I wonder if the knuckleheads using some variation of Select-Row(i) to iterate through their browses have realized their danger and simply not annotated their advice here, or do they luckily only use browses that don't scroll? Or maybe they have bugs in their code and swaths of browse rows are being ignored.

I am often wrong and am not too prideful to admit it. If this is all my misunderstanding, then I will apologize whole-heartedly. If not, where can I go for advice when my shop hasn't any relevant examples and it's too complicated for ProgressTalk to give a complete answer? Or am I doomed to reinvent the wheel all by myself every so often in dealing with the six-faced and three-hearted Progress when all I need is a good example to learn from?
 

GregTomkins

Active Member
I have at various times used the ProgressTalk equivalent for .NET, Java and Ext, and it is similar everywhere. You can't really expect an unpaid volunteer to spend more than a few seconds coughing up whichever answer comes to mind first, which is more often than not not applicable. The best you can hope for most of the time is a hint of which path to follow.

Your post is too long for me to really think about in any depth; another problem with volunteer answers. I will say that the Progress browse is a bit of a horror show, IMHO, when you get into the details of selecting rows and moving things around. The documentation is of little help (though in general, I think PSC documentation is good). And I never use the 'HELP' attribute. So I can't really help you either ;)
 

RealHeavyDude

Well-Known Member
Bashing volunteers in an open forum shows really some nice attitude to me.

Personally, If would be humilated by your statements I would just think, hey this guy, if at all, could look into the online help of the AppBuilder. Maybe he would come up with the glorious idea to type in status ... Ooops he would probably stumble over the STATUS stament. But then again, this person will probably bash me for my hint.

But as I am only a humble person with some Progress knowledge such complex and time consuming philosophic forays into vague topis of old-school programming, it just seems so strange to me :D

RealHeavyDude
 
Ah, the old "volunteers = kittens, so be nice to them" argument.

Look, it's a big board, but this forum is important. It only gets a couple of new posts per day, which is very manageable to moderate for quality (if that should become a priority).

Plus, the usual suspects of progress gurus here already give their time freely. Maybe they could use some admin nudging to spend a small portion of that time doing quality control sweeps on topics they didn't initially respond to. Keeping (or getting) the quality high is in everyone's best interests.

So, I suppose I'm looking for the leaders here to reassess their game plan for this forum and perhaps come at it with a renewed sense of purpose. Is that really so presumptuous?
 
Well, in the interest of making the world a better place, I am posting my workaround to the Help / Status issue.

The Help message on the "run report" button wasn't really critical, but I still wanted the "running report..." message if validation was OK.

So, I took the Help attribute off of the definition of the button. However, this had the effect of leaving the Help text of the previous field in the status bar while the button was highlighted. Not good.

So, I re-added the Help attribute, but left a space in there. Aha, I know what you're thinking! But if there is a Help attribute, the Status won't display!

Miracle of miracles, Progress displays the Help space as it should, but trims the space and treats it as blank when deciding whether or not the Status should be displayed over it. Go Progress! That was intuitive!

So, set Status Default to a space at the start, set it as the "running..." message before running the report, and set it back to a space when it returns. Here's some code to make it crystal clear:

Code:
DEFINE FRAME FRAME-A
   ...
   b-RunReport AT ROW 4.13 COL 36.71 HELP " " /* <- That's a space. */
   ...

Code:
/* ***************************  Main Block  *************************** */
  ...
  STATUS DEFAULT " " IN WINDOW {&WINDOW-NAME}.  /* <- That's a space (just in case). */
  ...

Code:
ON CHOOSE OF b-RunReport IN FRAME FRAME-A
DO:
  /*** Validation ***/
  ...
  /*** END Validation ***/
 
  STATUS DEFAULT "Running report..." IN WINDOW {&WINDOW-NAME}.
  SESSION:SET-WAIT-STATE("General"). /* hourglass */
  RUN report.p.
  SESSION:SET-WAIT-STATE("").
  STATUS DEFAULT " " IN WINDOW {&WINDOW-NAME}.  /* <- Back to a space. */
  ...
END. /* ON CHOOSE OF b-RunReport */
Quite a few hoops to jump through, courtesy of Progress. Maybe they'll go open source one day, and I'll fix it myself.

Hopefully, those smarter and more experienced than me will double check my conclusions and determine if this is the final "answer" to this question or if there is a simple solution I missed. Or maybe they won't. Good luck!
 

TomBascom

Curmudgeon
I haven't tested this exhaustively but I think all that is happening is that the help attribute is just a shorthand for changing the status line on ENTRY of the widget.

Your example seems to work for me with the STATUS changes in the choose trigger, without the " " in the main block and with a helpful message on the button. IOW I think you only needed to add STATUS DEFAULT in the choose trigger.
 
Did you ever have one of those days where you keep hitting an error and it goes away the moment you try to show it to someone else?

I am very positive I didn't hallucinate this entire morning's events. However, you are right in that only the Status Default lines are needed in the trigger. I currently cannot replicate any of the shenanigans I swear I witnessed this morning.

Occasionally, the environment, the DBA, or both play tricks on the programmers here. AppBuilder re-writing my code in some funky way with no notice. Roundtable getting versions crossed in strange ways. Legacy code that closes a different open window besides itself when you hit the "X" but not when you click "Exit".

Still, I must admit, I cannot even imagine what could have either caused or made me believe the weirdness I experienced. I think it's time to head home.

Since part one of my original post seems to have been the result of licking toads, and part two isn't getting any sympathy, I vote for deleting this whole topic and calling it a day.
 

sphipp

Member
It's always easier to understand a question if it is split into several smaller posts, each asking one thing, rather than one long post asking a lot of things.

Browses in Progress are good for displaying and choosing information but that's about it, in my opinion. If you want to do some work on a set of records then I'd use a query, do some stuff with it and then view the results in a browse.

But, since the first mention of this problem seems to have been a complaint and you haven't actually mentioned what the exact problem is then I can't see the problem.

If I have a coding problem then I search ProgressTalk to see if anyone esle has encountered something similar. Any code examples, and there are many, should be taken with a pinch of salt as they are generally examples of solving the specific issues raised. Yes, I have had examples that have led me up the garden path and others that are downright wrong, but that's all part and parcel of online research. Even those examples that don't seem to help do actually help by identifying what doesn't work.

So, before complaining that people aren't helping you, try actually asking a question first.
 
Look, you don't know me and you're not going to know me. If you don't like how I "come off" and don't have the patience to carefully read a long post, I can't really help that.

I had a weird situation yesterday, but I've been meaning to post my displeasure with using ProgressTalk as a research tool for some time. My browse example is still valid.

Who could deny that the quality of information here could be improved? Who could deny that admin could step it up a notch? What is there to argue here?

And when you encountered the "downright wrong", what did you do about it? Did you leave the time-wasting pile for someone else to ruin their shoes in? What does admin want us to do about it as a community? Do they want us to report it as wrong, and they'll have someone set the record straight or outright delete it when they get the chance? Reply with a link to the thread with the real answer? Is there any effort toward quality control at all?

Here's a fun exercise. Try looking up how to do things here that you know are tricky. Try looking up how to access the screen values of cells in a browse that's being updated. Or how to loop through browse records. I've had many other disappointments here over the years, but I can't recall them now. Pick some other issue that personally gave you trouble and see how well ProgressTalk comes through. Ask yourself how helpful or harmful the information would be, especially to the less experienced. If one thread is right, how many are wrong? How much misinformation has been spread or time has been wasted?

The human race has been significantly improved with the advent of waste disposal. What is this - medieval London? "Dennis, there's some lovely filth down here..." Should we take a crack as a community at getting things cleaned up, or just put up a bigger "mind the crap" sign?
 

TomBascom

Curmudgeon
If you're going to continue the rant/discussion regarding the quality of the forum you might also want to create a new thread for the purpose. Perhaps in the "comments" forum? Otherwise future users searching for information about the status bar will have a hard time sorting the two topics -- which would hardly be an example of providing the sort of quality forum that you are advocating.
 
I already have some plans for starting some discussions to specifically help the beginning to mid-level programmer, so don't waste your snark on me.

And I've already asked forum admin to delete this thread as being un-useful.

Maybe I need to report my own post to get them to notice it.

That's kind of the point here. Is anyone driving the bus?
 

TomBascom

Curmudgeon
Well, no, this is basically a low maintenance forum where people collaborate as they see fit without a whole lot of structure or overhead. I seriously doubt that our host even breaks even on the endeavor.
 
I also host such a forum. Although, mine is for discussion and not really used for looking up "answers".

Still, if I didn't prune the hedges, nobody would.

Otherwise, you can change low maintenance to no maintenance. And there is a big difference between the two.
 

GregTomkins

Active Member
When you're a volunteer, it's a pisser to be criticized when you're not getting paid in the first place.

However, this guy does have a point in that the community support for PSC is not very good. This is a fact of any Internet forum, that is, your chances of getting a useful answer to a particular question hover around 5%, but at least with "the other products", there is an enormous amount of useful reference information out there for the taking. Not so Progress.

Just make up a random question about C# or Java or Spring or MySQL or whatever and type it into Google's search box. Then do the same thing for Progress. Kinda depressing. That's one reason why I'd like to move away from Progress.
 

TomBascom

Curmudgeon
I dunno, I occasionally search for stuff in other domains and while I may indeed get very longs lists of possibly relevant material 5% would be a very good hit ratio. Most of what you get is pure dreck. To say nothing of the sites that are just copying each others content over and over and over.

Progress is also hurt by the unfortunate fact that it also happens to be a very common word in the English language.

So I guess I think that the small number of focused Progress sites is, in many ways, an advantage.
 

RealHeavyDude

Well-Known Member
I think this has something to do with the fact that Progress is technology company which has a sales organisation but not a sufficient consulting organization behind it to support it's own technology in the field. I am not talking about their tech support - I think it's pretty good. But every now and then when I had just questions or needed some advise, the only place I got replies was in forums like this. Therefore, I think their are really doing a good job, considering ...

Because, having done Progress in countries with small or no Progress subsidiaries, my attempts to get a hand on a Progress consultant for particular topics, internationalization is just one of 'em, almost always ended nowhere.

I can't speak about the U.S., but from what I see in Europe, Progress is abandoning it's consulting capabilities ...

Therefore: Long live ProgressTalk and all the great guys contributing their wisdom, or sometimes, just like humble guys like me, trying to help others.

Best regards, RealHeavyDude.
 
Top