App:is_self
methodApp:is_self() -> booleanTrue if the handle refers to the current app (works even on dead handles).
handle6 methods, 2 fields
An opaque app identity. Comparable with ==, usable as a table key, and stable across the app's lifetime. spawn returns the child's handle immediately; a package_ref child starts running only once its package is delivered. If the delivery or the spawn fails, the child never runs: the handle reports not alive, and app_terminated fires and on_end runs for it, the same terminal signals as for a running app's exit.
datumhue.events.on (in its callback), datumhue.app.spawn, datumhue.app.self, datumhue.app.parent, datumhue.app.bootstrap, PermissionRequest.app, SignInRequest.appdatumhue.theme.current, datumhue.theme.pin, datumhue.theme.unpin, datumhue.wm.terminate_app, datumhue.wm.set_app_minimized, datumhue.wm.set_app_bounds, datumhue.wm.set_app_focused, datumhue.wm.set_app_weight and 4 more| Field | Type | Access | Description |
|---|---|---|---|
name | string? | read-only | The name the app was spawned with. Nil once the app is no longer running. |
package_ref | PackageRef? | read-only | Read-only. The catalog package this app is running, at the version it was started from; nil until the app has started (between app.spawn() and app_spawned), for inline-code and local-source apps, and once the app has ended. |
App:is_self() -> booleanTrue if the handle refers to the current app (works even on dead handles).
App:is_alive() -> booleanTrue if the app referenced by the handle is still running.
App:is_parent() -> booleanTrue if the handle is the direct parent of the current app.
App:is_ancestor() -> booleanTrue if the handle is any proper ancestor of the current app.
App:on_end(callback?: fun(e: app.EndEvent))Set, replace, or clear (pass nil) the callback that runs once when the app ends, for every end app_terminated reports, an app that never started included. Set on an app that has already ended, it runs on the next frame with that end. Any app holding the handle may set it; while set, it keeps a service app that set it running. An app's own end runs none it sets on itself, so such a callback is never kept: datumhue.on_terminate runs as an app ends.
In the guide: Launch other apps Troubleshooting
App:can_manage() -> booleanTrue if the current app may manage the referenced app (ancestry or self).