Force Capslock on Fill-In

RD_Man

Member
Hello All,

Is there a way to force all alpha characters to be capitalized in a standard fill-in as the user types?

Mike
 

RD_Man

Member
Sorry I did not mention this earlier. I have it covered in a trigger on the backend, I am simply looking for a visual as the user enters the data.

It will simply stop our users from thinking they need to uppercase the IDs. With 325 users it will just help make the data entry more efficient.
 

CarlingKirk

New Member
Here's how I did it:

Code:
def var w-input as char.                   
def var char as char format "x".         
                                           
update                                     
   w-input                                 
   editing:                                
      readkey.                             
      assign                               
          char = string(keylabel(lastkey)). 
      apply caps(char).                    
   end.
 

tamhas

ProgressTalk.com Sponsor
So do shared variables ... if you're lucky, but that doesn't mean we should be encouraging new users to use them.
 

CarlingKirk

New Member
I am a new user. I've only been coding with OpenEdge for about 6 months. (I've learned mostly by the code that my company has in place...)

And I'm here to learn! Enlighten me on how a modern experienced programmer would code it? :)
 

UncleNel

New Member
Here is a simple form for ui caps display handled using user defined triggers:

on ANY-PRINTABLE anywhere do:
if lastkey ge 97 and lastkey le 122 then
apply lastkey - 32.
else
apply lastkey.
return no-apply.
end.
 

tamhas

ProgressTalk.com Sponsor
Copying legacy code is a good way to propagate both deprecated practice and often just plain bad coding. UI triggers have been the way to handle this sort of control of the user interface since version 7.1.
 

tamhas

ProgressTalk.com Sponsor
Yeah, although I doubt that he wants to do it ANYWHERE, probably just in the one field. Myself, I would also tend to use CAPS() since it is i18n compliant.
 

tamhas

ProgressTalk.com Sponsor
Check here http://www.progress.com/progress_software/products/docs/bu_sep/openedge_10_availability_guide.pdf starting on page 19 for a list.

Editing blocks always were a kludge. We used them in V6 because there wasn't any other way to get the job done, but they are very touchy and easily break. Since the whole event driven paradigm was added in V7 it has been clear that the right thing to do is to use triggers and a wait-for. That doesn't mean that there isn't a lot of code still out there with editing blocks, choose and the like, and I know that it is tempting if one has a million lines full of such things to just copy it and keep doing the same thing. But, if management will let you, don't do it. All you are doing is propagating a problem, not fixing it. And, you aren't doing your skills as a programmer any favor either. Using and learning more modern ways to do things is a way to grow as a programmer and that will not only get you ready for the next job, but it could put you in position to be a leader instead of a dinosaur if your company decides to transform that legacy application into something more modern.
 

CarlingKirk

New Member
I really appreciate your response!

I'm probably the most progressive person in my new department, but as long as the code works, they don't ask questions. I'd really like to be modern with my code, but it's a little hard in this world where my programming friends scoff when I mention Progress.

I was just so excited that I knew how to do something, I got really let down when it was deemed as inappropriate! I'm shy enough as it is. :)

Cheers
 

tamhas

ProgressTalk.com Sponsor
Sorry to have rained on your parade ... but making mistakes is one of the best ways to learn. I know it can be exciting when one knows the answer instead of always being the one asking the question ... I keep learning new things myself so periodically I find myself in new territory in much the same position even though I have been programming for many, many ... well, let's just say a lot of years.

One of the things that you would find interesting and exciting about learning about modern ABL is that you would find that it was a lot harder for those friends to scoff. Oh, they might still try since 3GL programmers tend to have an attitude about 4GL or anything about which they are ignorant themselves. Funny how they will get all jazzed about some funny language that only has a tiny cadre of people working in it, but one that is visible to the press, but then scoff at a language with 25 years history of building enterprise class applications that really work and which are used by 5 million people world wide.

And who else has a language where one can create UI screens using all .NET components, but not write a single line of C# or VB, but keep everything in the high level business language? And one of the implications being that during design in OE Architect, one is simultaneously using the JVM, CLR, and the Progress AVM ... three different virtual machines working together! Stuff that up their upturned noses!

And all the OO stuff and Sonic integration and ProDataSets which make .NET DataSets look like toys, etc., etc. There's 20 years of language evolution beyond editing clauses. There is lots to be proud of.
 
Top