Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WX-Products: Suggestions & Feature Requests
Beiträge im Thema:
6
Erster Beitrag:
vor 9 Jahren, 8 Monaten
Letzter Beitrag:
vor 9 Jahren, 8 Monaten
Beteiligte Autoren:
Stefan Bentvelsen, Al

Dynamic Hyper File Context

Startbeitrag von Al am 07.10.2008 02:34

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

Antworten:

Hi Al,

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



von Stefan Bentvelsen - am 16.10.2008 11:14
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






von Al - am 17.10.2008 04:15
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(,"",hSaveItems) will save the data in the record buffer ? I use it on a regular basis.

Quote from the help of HSavePosition:

: 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.




von Stefan Bentvelsen - am 22.10.2008 06:54
Sorry,

the filename got lost, the statement must be:

HSavePosition(MyFile,"",hSaveItems).

von Stefan Bentvelsen - am 22.10.2008 06:55
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

von Al - am 22.10.2008 10:33
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.