currentAppleEvent
Instance Property
Returns the descriptor for currentAppleEvent if an Apple event is being handled on the current thread.
Mac Catalyst 15.0+macOS 10.3+
var currentAppleEvent: NSAppleEventDescriptor? { get }
Discussion
An Apple event is being handled on the current thread if a handler that was registered with setEventHandler(_:andSelector:forEventClass:andEventID:) is being messaged at this instant or setCurrentAppleEventAndReplyEventWithSuspensionID(_:) has just been invoked. Returns nil otherwise. The effects of mutating or retaining the returned descriptor are undefined, although it may be copied.
See Also
Suspending and resuming Apple events
func appleEvent(forSuspensionID: NSAppleEventManager.SuspensionID) -> NSAppleEventDescriptorGiven a nonzero suspensionID returned by an invocation of suspendCurrentAppleEvent(), returns the descriptor for the event whose handling was suspended.
var currentReplyAppleEvent: NSAppleEventDescriptor?Returns the corresponding reply event descriptor if an Apple event is being handled on the current thread.
func replyAppleEvent(forSuspensionID: NSAppleEventManager.SuspensionID) -> NSAppleEventDescriptorGiven a nonzero suspensionID returned by an invocation of suspendCurrentAppleEvent(), returns the corresponding reply event descriptor.
func resume(withSuspensionID: NSAppleEventManager.SuspensionID)Given a nonzero suspensionID returned by an invocation of suspendCurrentAppleEvent(), signal that handling of the suspended event may now continue.
func setCurrentAppleEventAndReplyEventWithSuspensionID(NSAppleEventManager.SuspensionID)Given a nonzero suspensionID returned by an invocation of suspendCurrentAppleEvent(), sets the values that will be returned by subsequent invocations of currentAppleEvent and currentReplyAppleEvent to be the event whose handling was suspended and its corresponding reply event, respectively.
func suspendCurrentAppleEvent() -> NSAppleEventManager.SuspensionID?Suspends the handling of the current event and returns an ID that must be used to resume the handling of the event if an Apple event is being handled on the current thread.
typealias NSAppleEventManager.SuspensionIDIdentifies an Apple event whose handling has been suspended. Can be used to resume handling of the Apple event.
Current page is currentAppleEvent
原文链接: currentAppleEvent https://www.huajiangbk.com/newsview1308732.html
| 上一篇: Apple Events | 下一篇: 6种“懒人花”,怎么折腾也不死,... |
推荐分享

- 1明日花キララ:明日花绮罗年度... 41910
- 2明日花キララ(明日花绮罗)经... 24146
- 3胡椒木盆景从上盆制作到养护,... 22880
- 4五月天婷婷开心六月丁香:音乐... 16175
- 5仙人球“水蜜桃”—又美又仙,... 13565
- 6十大致癌花卉排行榜,哪些花卉... 12321
- 7超简单,3个步骤带你学会毛线... 12225
- 8老师精选05—河北彩花(出道... 12010
- 9家庭养花知识大全 家庭养花有... 11355
- 10家庭养花风水知识 家庭养花“... 10815




