Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 1 Jahr, 6 Monaten
Letzter Beitrag:
vor 1 Jahr, 6 Monaten
Beteiligte Autoren:
Yogi Yang, Fabrice Harari

[WM] - Alternative to Use() in iOS

Startbeitrag von Yogi Yang am 14.04.2016 06:40

Hello,

I am converting an app that was originally developed for Android to iOS.

In this wherever I had the need to show one window and close all other windows I have used the Use() function. And this works properly in my Android app.

But when I try to generate the XCode project WM list Use() function as not supported.

Any idea if there is an alternative to this in iOS.

Please help.

TIA

Yogi Yang

Antworten:

Hi

There is a solution that will let you use the same code... But you will have to add a collection of global procedures and a window to emulate the behavior of "use".
This is how it would work:
- Create a new window, and make it the first window of the project. It can serve as the splashscreen if you want, or simply be invisible.
- create a collection of global procedures. In it, create a USE procedure, and an OPENCHILD procedure (or openMobileWIndow, depending on what you are using in your code). These two procedures will now be called INSTEAD of the wlanguage function.
- in the OpenChild/OpenMobileWindow (or both) procedures, save the name of the window to open and all it's parameters in a structure/array or equivalent, then call the real opening function (local to the first window). This function will do the wl.OpenCHild with the appropriate parameters, based on the content ofthe array and leave the information there.
- in the USE global function, save the information in the array (the same way than before) than call the real using function in the first window. THis function will use the content of the array to CLOSE all opened window, then do an openchild of the new one

If you are also using the close function in your code (and not only the use), then you'll need to overwrite it too

Best regards

von Fabrice Harari - am 14.04.2016 11:59
Fabrice,

Thanks for explaining the whole process.

I will try to work out a way like you have explained.

Regards,

Yogi Yang

von Yogi Yang - am 15.04.2016 05:37
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.