Open window to specific plane

Startbeitrag von Art Bonds am 09.11.2016 14:03

I have a window with a form on it with multiple planes. The form accesses the same data file, and each plane has both generic information and specific information. The generic information is on plane 0, the specific on planes 1 and 2. I want to open the form to a specific plane.
For example, the form window is about the human body, and since humans are mostly the same that common information will be on plane 0, but the specific information for females are on plane 1 and males on plane 2.
This form window is called from another window that has a browse and buttons. The browse will show all humans, but if I double click on a female in the browse I would like to see the form window open to plane 1, not plane 0. Same with male, just to plane 2.
And there are buttons to add humans. If I click on the 'Add Female' button I would like the form window to open to plane 1, plane 2 for 'Add Male'.
Is there a command I can use to open a window to a specific plane, like OPENSISTER(HumanForm,plane..1)? Or will I have to OPENSISTER(HumanForm,1), passing the 1 to the form, and in the INIT of the window check for the passed in value and set HumanForm..Plane1 (this was my original thought but I thought I would check here on the forum in case there was a better way)?
Thanks in advance for any suggestions.


Hello Art,

you'll need to pass the info as parameter and process it yourself

Best regards

von Fabrice Harari - am 09.11.2016 14:11
That is what I thought too Fabrice, thanks for confirming.

von Art Bonds - am 09.11.2016 14:13
On second thought:

asking for a specific plane from outside the window seems to be a bad idea, as it means that you need to KNOW which plane does what when you are coding your calls...

I would prefer that you pass a parameter that is NOT plane related (a behavior/mode/function parameter), and depending on that functioning mode, the window itself would do what is necessary (change plane being ONE of the possible things).

Personally, for this kind of things, I use constants (ctFemaleCreate, in your example), to avoid any misanderstanding and make the code more readable.

best regards

von Fabrice Harari - am 09.11.2016 15:44
Zur Information: 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.