|
2006-09-05
| ||
| 21:26 | • Ticket [1552653fff] add Tcl_RunMainLoop() status still Open with 4 other cha... artifact: ccc83b9b1e user: dgp | |
| 21:20 | • Ticket [1552653fff]: 4 changes artifact: 578ca727e0 user: dgp | |
| 20:44 | • Ticket [1552653fff]: 2 changes artifact: 45b08138ae user: dkf | |
| 13:19 | • New ticket [1552653fff]. artifact: b0d8147839 user: nobody | |
add Tcl_RunMainLoop()
Open1552653fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-09-05 13:19:42
Routine Tcl_SetMainLoop() sets a static variable that can only be
referenced if you use Tcl_Main().
If you don't want to use Tcl_Main(), there's no way to override
Tcl_SetMainLoop() so you can catch it if a package calls it (e.g. if Tk gets
loaded in a script with "package require Tk").
One option would be to add Tcl_GetMainLoop(), but even easier and what
would presumably always be used would be:
void Tcl_RunMainLoop()
{
if (mainLoopProc != NULL)
(*mainLoopProc)();
mainLoopProc = NULL;
}
Thanks,
[email protected]
dkf Ticket [1552653fff]: 2 changes
[History diff]2006-09-05 20:44:14
dgpplain2006-09-05 21:20:18
Logged In: YES user_id=80530 Thanks for the suggestion. If we go this way, it will have to be as part of at least a slight bit of re-working to address the threading deficiencies of what's there now. See 801429.
dgpplain2006-09-05 21:26:03
Logged In: YES user_id=80530 I've occasionally pondered (ab)using the [package] command to enable: package require eventloop Packages that need an event loop running to functions could include that, and any Tcl_SetMainLoop() call could [package provide] this "package" so it would be known that an eventloop is on the way. More to think about...
Log in (anonymous is fine) to add a comment.