How to use Browse ResetFromAsk?

As the title says, I want to understand, it has two sentences, *BYTE Request and * BYTE Response
But even if you just put a MESSAGE inside, it’s not activated.

Can you be more specific? What do you mean by “how to use”?
This is the method called by the browse class after completing an insert/update/delete operation to refresh the list control. It is called both after using edit-in-place or update form for the editing.

1 Like

Read the code inside LibSrc\win\AbBrowse.CLW, .INC, .EQU

It will help to have open a generated Browse to see the calls, and probably LibSrc AbWindow.clw.

Searching AbBrowse.CLW you’ll find…
BrowseClass.ResetFromAsk(Request,Response) is called by BrowseClass.Ask(Request)

BrowseClass.Ask(Request) is called by BrowseClass.TakeEvent() with Request based on if Accepted() was .ChangeControl or .DeleteControl or .InsertControl etc.

1 Like

Have always wondered why the method passes Request, Response by address rather than just values?

1 Like

It is a very annoying choice.
Here’s what I do.
All of my browse classes are set to use my own derived browse class.
In MyBrowseClass (not the real name :slight_smile: ) declare:

DoResetFromAsk procedure(byte pRequest, byte pResponse)

The the code for this method is:

MyBrowseClass.DoResetFromAsk    PROCEDURE(byte pRequest, byte pResponse)

This allows you to easily call ResetFromAsk from anywhere in the procedure and you can pass in the equates like ChangeRecord and RequestComplete.


My preferred re-write too. My guess is the address parameters are a relic from early unreleased ABC that never got changed.

1 Like

Tks for everyone!
But, error compiling on C9, seems to ignore new instructions. I have to reset everything.
I don’t know if it’s C9 + Win11…

What specifically are the errors?

So it can change the *variable value and affect the caller, i.e. an “In Out” parameter.

Away from PC so IIRC saw an IF change Request. I think it was for VCR which I doubt anyone uses, but is still supported. IIRC .Ask had a LOOP until some VCR thing.

It is Virtual so a Derived method could change those as *Out. Also DAB could have done the *Out for some future thing he thought may be useful.