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 28 MAR 2000 07:34:47PM David Howell wrote:

I have an edit table that whose "TEXT" value is set programmitacally.

Upon clicking on another control, the "LOSTFOCUS" script asks the user to save, or not, the changes in the list. It should then, save or not, and pass focus to the next-clicked control. But it doesn't. The following code segment is being employed. I have tried various end of script return values (0 & 1) and the Send_Event, to no avail.

Any suggestions?

Mucho thanks in advance,

C O D E S E G M E N T ——–]

/* code checks for changes here, then… */

msgDef='

msgDef=Save changes?"

msgDef=BNY"

msgDef=?"

if Msg(@window,msgDef) then

open 'CONTROL' to tfile then
	list=.TYPESLIST_TBL-]LIST
	write list on tfile, listKey then
		status=Message_Box(@window,'List Saved!','Alert', MSG_ICON_INFO$)
	end else
		status=Message_Box(@window,'Unable to write list!!!!','Alert', MSG_ICON_EXCLAM$)
	end
end else
	status=Message_Box(@window,'CONTROL NOT opened!!!!!!','Alert', MSG_ICON_EXCLAM$)
end
status=Send_Event(FOCUSID,"GOTFOCUS")

end


At 29 MAR 2000 04:10AM Oystein Reigem wrote:

David,

Could it be something similar to what Cameron explains to me about in the latter part of this posting?

- Oystein -


At 29 MAR 2000 12:06PM [email protected] wrote:

David,

I have just created a non-bound window with 3 controls. Editline, Table and Editline

In the Lostfocus event of the table I did ..

Declare Function Get_Property

Declare Function Msg

$Insert Ctrl_Property_Equates

data=Get_Property(CtrlEntId,List$)

If data,1] # "test" then

  rtn=Msg(@Window,"this is a test")
  open "","DATATABLE" to Handle Then
      write "boo" on handle, "BOO" else null
  end

end

RETURN 0

On the lost focus of the table I got the message, the data was written and the focus went to the next control.

althought I have stripped out extra messages there is no difference. Are you using a 'bound' table? Are you sure you don't have a quickevent? What is in the GOTFOCUS event for the next control?

[email protected] onmouseover=window.status=imagine … a company that supports it products with pride instead of extortion;return(true)"

David Tod Sigafoos ~ SigSolutions

cell: 503-341-2983


At 29 MAR 2000 01:07PM David Howell wrote:

David & Oystein,

Thanks for your very quick response.

Oystein, I don't think that the link you offered provides a solution, but I will look at in more detail later.

David, to answer your questions… None of the controls are bound, as the updating to the file holding the lists is handled in the LOSTFOCUS script. The other controls on the simple form are push button controls with a GOTFOCUS SCRIPT similar to the following…

.PREV-]TEXT=.CURRENT-]TEXT

.CURRENT-]TEXT=E'

list=xlate('CONTROL','EVENTTYPES',1,'X')

swap @vm with @fm in list

.TYPESLIST_TBL-]LIST=list

.TYPESLIST_TXT-]TEST=Event Types"

RETURN 0

Basically, what I'm trying to do is have a single form that allows the user to maintain various types of lists that are used as popups selections in other forms. When the user clicks on a push button for a particular "type" of list, that list gets displayed in the TYPESLIST_TBL edit table. If then, the user changes the list, I just want to prompt them to save or not and proceed appropriately.

I'll give your suggested code a look see the next chance I get and let you know what happens.

FYI, this application is a migration from AREV, where this type of processing was very easy to accomplish with using POST.PROMPT code.

Thanks again to you both.

David Howell,

[email protected]


At 29 MAR 2000 04:20PM Oystein Reigem wrote:

David H,

That old posting I referred to - I realize I got it wrong. Your code really looks ok. Trying the same here I really cannot get it to fail. The only possible error I can see is

.TYPESLIST_TXT-]TEST=Event Types"

I assume that should be

.TYPESLIST_TXT-]TEXT=Event Types"

Return 0 or 1 in the LOSTFOCUS should both work ok.

The Send_Message…"FOCUS" is unnecessary, but harmless, I think.

Perhaps you just should rebuild the controls and events and start with them as simple as possible. No msg and no table reading and writing. Or perhaps start with what you got and move your way backwards by commenting out more and more stuff.

- Oystein -


At 29 MAR 2000 07:56PM David Howell wrote:

DSig & Oystein,

Following Oystein's suggestion to "work backwards", I have found that all works well with the messages are commented out. How would the messaging processing interrupt the event flow?????

Thanks againg for your help.

David


At 29 MAR 2000 10:21PM [email protected] wrote:

David,

The question still stands .. why does my form work even calling msg?

Just for grins .. create a form like i described and see if it works

[email protected] onmouseover=window.status=imagine … a company that supports their product from pride not extortion;return(true)"

David Tod Sigafoos ~ SigSolutions

[email protected] Cell:503-341-2983


At 30 MAR 2000 03:36AM Oystein Reigem wrote:

David H,

I don't know. But in one of the other postings in the thread I referred to - - Andrew McAuley (remember him?) says there can be such problems. But I don't think he came back with further information. And the cause of the problem discussed in that thread was of course something different, as Don Bakke explained.

Have you got any other event handlers for the edit table? Any promoted events? (I don't know if it's relevant.)

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b2047db2e5a6edbf852568b000818722.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1