Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > GUI Development
  New Posts New Posts RSS Feed - Event Decoder in Code Editor
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedEvent Decoder in Code Editor

 Post Reply Post Reply
Author
Message
homerlh View Drop Down
Beta Tester
Beta Tester


Joined: November 11 2004
Location: United States
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote homerlh Quote  Post ReplyReply Direct Link To This Post Topic: Event Decoder in Code Editor
    Posted: May 26 2005 at 6:16am
Greetings,

Here's my latest question about our GUI Order Entry system.

One of the subroutine/screens reads a control item from a file and displays upto 16 pictures - depending on how many are in the item.

The pictures only show the user what to select. What is important is the additional information with the list of pictures - which is part numbers and such. The code editor created a wonderful subroutine with 16 almost identical pieces of code such as

APP.FORM.SYSTEM1.DBLCLICK:

APP.FORM.SYSTEM2.DBLCLICK:

and so forth - up to 16. It also put all 16 in the event decoder.

The code for all 16 events is the same, I pick which system number it is - redisplay the picture in position 1 and erase all the other pictures. I did this about twice, then saw the inefficiencies and changed both the event decoder and the code to have just one event.

I called it SYSTEMX. I had a SYSTEMX.DBLCLICK and in the event decoder where it checks the GUICTL for SYSTEM1 and then SYSTEM2 and then SYSTEM3, I had it check GUICTL[1,6] for "SYSTEM". I then picked up the number and made that my system number. The code works great - it's much more effient - at least I think so.

The problem is that I'm afraid to use the automatic code editor to update much of this program. I refuse to have it fix the event decoder since it always writes a new event decoder.

It also keeps telling me that my SYSTEMX.DBLCLICK is unneded code.

My question is: Can I do anything to fake out the code editor so that it will not destroy my work when it overlays the event decoder?

I think I know what the answer is, but there's a lot of brilliance floating around on this forum and I thought I might try to partake of some of it.

Thanks.

Larry Hazel
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: June 03 2005 at 5:01am
Hi Larry -

First, to keep the code generator from thinking your SYSTEMX.DBLCLICK event is unneeded remove the <--- ... ---> tags from the beginning and end of the code segment. Now for the real question: sorry - you cannot get the event decoder to maintain your custom changes. But what you could do is retain the 16 individual event handlers, and simply use GOTO SYSTEMX.DBLCLICK as the code in each one. It adds an extra branch in the execution path, but allows you to continue to use the code generator to update the decoder whenever necessary.

Thanks,

Pete
Back to Top
homerlh View Drop Down
Beta Tester
Beta Tester


Joined: November 11 2004
Location: United States
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote homerlh Quote  Post ReplyReply Direct Link To This Post Posted: June 06 2005 at 9:33am
Pete,

I knew you were going to say that, but I was hoping for some sort of miracle. 8>)

That's a bitter pill for someone who grew up with very tiny computers - who learned to program in Pick on an Adds Mentor where the user space was measured in Kilo Bytes. 8>(

Oh, and I mean tiny in terms of storage and such. I do not mean tiny as regards to physical size.

Larry
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.