Welcome! Log In Create A New Profile

Advanced

Dynamic Hyper File Context

Posted by Al 
Al
Dynamic Hyper File Context
October 07, 2008 04:34AM
Hello All

I would like to be able to programatically set the Hyper File Context for a window on the fly.

At the moment it must be preset in the window editor.

If you could set it as required it would make it much easier to use windows in mutliple modes.
e.g. If I want to display list of customers in a table as an entry point to an editing screen then I would turn of the HF Context, but if I used that same table screen as a lookup window and I don't want the record pointers moved in my calling window I would turn on the HF Context.

Regards
Al
Stefan Bentvelsen
Re: Dynamic Hyper File Context
October 16, 2008 01:14PM
Hi Al,

I suppose you could use HSavePosition(), HrestorePosition and HFreePosition() for this, or didn't I understand your request right ?

Al
Re: Dynamic Hyper File Context
October 17, 2008 06:15AM
Hello Stefan

The big problem with HSavePosition is that it does not save the data in the record buffer, only the position of the record pointer.

eg Open an edit window and filetoscreen(), then the operator changes some values. If you temporarily store those change in the buffer and then open the same data file in another window and select another record, the data in the first window is lost unless you open the second window with a new context. The issue for me is that sometimes I want to open the second window in the same context and other times with a new context.

Regards
Al




Stefan Bentvelsen
Re: Dynamic Hyper File Context
October 22, 2008 08:54AM
Quote
Al
Hello Stefan

The big problem with HSavePosition is that it does not save the data in the record buffer, only the position of the record pointer.

eg Open an edit window and filetoscreen(), then the operator changes some values. If you temporarily store those change in the buffer and then open the same data file in another window and select another record, the data in the first window is lost unless you open the second window with a new context. The issue for me is that sometimes I want to open the second window in the same context and other times with a new context.

Regards
Al

Hi Al,

I think that HSavePosition(<Filename>,"",hSaveItems) will save the data in the record buffer ? I use it on a regular basis.

Quote from the help of HSavePosition:

<Options>: Optional integer constant

Enables you to configure the backup:

hSaveItems
Saves the values of the items in memory when HSavePosition is used. These values will be restored when calling HRestorePosition.


Stefan Bentvelsen
Re: Dynamic Hyper File Context
October 22, 2008 08:55AM
Sorry,

the filename got lost, the statement must be:

HSavePosition(MyFile,"",hSaveItems).
Al
Re: Dynamic Hyper File Context
October 22, 2008 12:33PM
Hello Stefan

Thanks for the update.
I checked back and that option came in with V10 and I obviously missed it or didn't realise the significance of it to save the record buffer.

It will certainly enable the full context to be saved in a dynamic fashion as I required.

Regards
Al
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: