Close all previously opened functions
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Close all previously opened functions
Let functions be called earlier: f1(), f2(),... , fn(). Is it possible to close all of them from somefunction FunAllClose()?
Re: Close all previously opened functions
hi,
i do not understand why you want a Function FunAllClose()
the normal Way is to restore it
just after use.
i do not understand why you want a Function FunAllClose()

the normal Way is to restore it

Code: Select all
bBlock := SetKey( K_INS, {|| ChangeCursor() } )
CLS
@ 10,10 SAY "Wert1:" GET cVar1
READ
SetKey( K_INS, bBlock ) // restore old Value
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Close all previously opened functions
It is possible to select different menu items. Each menu item has a function. Sometimes when you call the next function the previous one should be closed. This can be done in the usual way. But they don't always do it. Therefore, I would like to do it forcibly programmatically.
Re: Close all previously opened functions
I guess, "close" is the wrong word. You mean something like "terminate". In Clipper, there was/is a function to do that. If you want to terminate running functions from Xbase++, you have to set a value or function return code which is recognized inside the functions. Or: Kill your app and restart it. 

Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Close all previously opened functions
so you can oMenu:disableItem(nIndex).Eugene Lutsenko wrote:It is possible to select different menu items.
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Close all previously opened functions
Yes, when I wrote also thought that "close" is not quite the right word. Of course it means "stop function". And previously called for the execution of the function. And stop the work of the previously called function is not this function, which should be closed, and the other. Tom, you're right. Just sometimes because of this you have to restart the whole system. It's ugly.Tom wrote:I guess, "close" is the wrong word. You mean something like "terminate". In Clipper, there was/is a function to do that. If you want to terminate running functions from Xbase++, you have to set a value or function return code which is recognized inside the functions. Or: Kill your app and restart it.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Close all previously opened functions
How to do it?Auge_Ohr wrote:so you can oMenu:disableItem(nIndex).Eugene Lutsenko wrote:It is possible to select different menu items.
Re: Close all previously opened functions
i'm not a Express++ User but i saw thisEugene Lutsenko wrote:How to do it?
Code: Select all
DCMENUITEM 'Test' PARENT oMenu WHEN {|| Not_Allow_When_Working() }
greetings by OHR
Jimmy
Jimmy
Re: Close all previously opened functions
The only way to close a function is to return from the function.Sometimes when you call the next function the previous one should be closed. This can be done in the usual way. But they don't always do it. Therefore, I would like to do it forcibly programmatically.
This can only be done within the function, however your function can always monitor a public variable within it's loop structure.
That public variable can be used to set a value to inform the function to terminate.
This can be complicated unless you are running your functions in different threads other than the main menu thread.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: Close all previously opened functions
Hey, Roger!
Good to hear from you!
I mean only functions called by the user from the main menu. The rest of the features I looks as expected of them.
Good to hear from you!
I mean only functions called by the user from the main menu. The rest of the features I looks as expected of them.