Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 12 DEC 2006 08:38:13AM John Godfrey wrote:

This looks to be a powerful addition to the toolset. One snag I have however is the slowness in redisplaying changed data.

Eg.

1st Row 1st Col : FRUIT Sub Code Oranges , Lemons, Pears. Displays correctly in the dropdown.

2nd Row FISH Sub Code Salmon , Haddock, Halibut.

When I click on Row2 Col2 FISH Displays Oranges etc. I click on col 3 Back on col 1 then 2 and the correct sub_code Salmon etc is displayed - eventually. I want this display to be instantaneous, as the code changes. Any ideas as to how I achieve this?

Code is as follows cribbed from the Help manual

Drop_Fill:

*

EditTable=@Window:".ITEMS"
AN_CODES=Xlate('AN_CODES',code,'','X')
Lines=an_Codes			
ColStyle=Send_Message(EditTable,"COLSTYLE",2)	
NewStyle=bitor(ColStyle,131072)
Do=Send_Message(EditTable, "COLSTYLE", 2, NewStyle)
Do=Send_Message(Edittable,"COLFORMAT",2,Lines)	

Return


At 13 DEC 2006 05:53AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

John,

What event are you running your code in? If it's POSCHANGED then I can see where you might have an issue.

Keep in mind that most OI events are posted to the engine so they tend to run after most of the "windows" processing has finished. In your case I guess what's happening is:

1) Cell position is changed. OI posts a message to OE to fire POSCHANGED

2) Dropdown is activated in the new cell and the list loaded and displayed

3) Posted POSCHANGED message is received and processed by the engine. The list is updated but will not be displayed until the next time the combo box is displayed on a new cell.

Make sense?

What you could do is intercept the poschanged notification via an synchronous WINMSG event and update the list there before the dropdown has displayed.

The Sprezzatura Group

World leaders in all things RevSoft


At 13 DEC 2006 07:28AM John Godfrey wrote:

Thanks Sprezz.

Yes this is being called from a POSCHANGED event and the problem seems compounded by an intermediate subroutine calling EDITCELL. Will chop out the intermediate sub until I find the culprit.

J


At 30 DEC 2006 11:41AM John Godfrey wrote:

Tried the WINMSG solution but no real change. The code works when I insert a debug in the code! seems to 'give time' for the dropdown to be populated. Take the debug out and it fails. I have forced it to work by calling a blank message for 0.01 secs. A more elegant solution would be nice. I have tried to write to a control on the screen or update the statusline but with no effect. Anyone know of a more elegant solution that I could use to emulate the action of the debug or the MSG subroutine?


At 30 DEC 2006 12:49PM Richard Hunt wrote:

This might be kinda lame for an answer… You could try the "DELAY" subroutine.

DELAY(SECONDS)


At 31 DEC 2006 05:55AM John Godfrey wrote:

Richard you have the answer. Not with the delay() sub or even Yield() which I had also tried to no effect. You gave the correct answer in your answer to the Edit Table and Enter Key conundrum.

Do=SET_PROPERTY('SYSTEM','FOCUS',@WINDOW:'.TABLE_PAY').

This works perfectly here to kick the system forward and emulate what the debug key and Call msg() function were doing, whatever that was.

Absolutely brilliant. Thanks very much.


At 31 DEC 2006 06:30AM John Godfrey wrote:

For the sake of completeness and anyone else who gets stuck with this.

I set up the column to have a dropdown facility at the CREATE Form event.

Now at the Click or WinMsg event in the edittable(following Sprezz's steer) the code is simply:

* Where Lines is found via an Xlate using the key from Column 1

Colstyle=Send_Message(Edittable,"COLFORMAT",2,Lines)

Do=Set_Property('SYSTEM','FOCUS',edittable)

Voila!


At 31 DEC 2006 06:37AM John Godfrey wrote:

For the sake of completeness and anyone else who hits this problem.

I set the edittable column to be enabled at the Form CREATE Event

Now at the CLICK or WINMSG Event the code is simply

EditTable=@Window:".ITEMS"

Row=Get_Property(EditTable,'ROWDATA')

Code=Row

Lines=Xlate('AN_CODES',code,46,'X')

Colstyle=Send_Message(Edittable,"COLFORMAT",2,Lines)

Do=Set_Property('SYSTEM','FOCUS',edittable)

Voila!

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/49e87851eefbc9e385257242004ae903.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1