mrmekon / rubrail-rs

Rubrail is a Rust library for interfacing with the Mac Touch Bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example failed

gilescope opened this issue · comments

I ran the example app but things didn't go to plan alas.

pwd: rubrail-rs/target/rubrail_example.app

The 'bar' button appeared but when I pressed it this happened (Mojave):

2019-01-02 06:14:51.773 rubrail_example[89303:8819466] +[NSTouchBar presentSystemModalFunctionBar:systemTrayItemIdentifier:]: unrecognized selector sent to class 0x7fffa179e6c0
thread 'main' panicked at 'Uncaught exception <NSException: 0x7fc96745a8a0>', src/touchbar.rs:1203:32
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: std::panicking::begin_panic_fmt
7: <rubrail::touchbar::ObjcAppDelegate as objc_foundation::object::INSObject>::class::{{closure}}::objc_present
8: -[NSApplication(NSResponder) sendAction:to:from:]
9: -[NSControl sendAction:to:]
10: __26-[NSCell _sendActionFrom:]_block_invoke
11: -[NSCell _sendActionFrom:]
12: -[NSButtonCell _sendActionFrom:]
13: -[NSCell touchEndedAt:inView:]
14: -[NSButtonCell touchEndedAt:inView:]
15: -[NSControl _touchEnded:]
16: -[NSControl touchesEndedWithEvent:]
17: _NSSendTouchEventToViews
18: ___NSSendDirectTouchesEvent_block_invoke
19: -[NSTouchDevice _preventFlushingContextID:during:]
20: _NSSendDirectTouchesEvent
21: _NSSendEventToDequeuingObservers
22: -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
23: <(A, B, C, D) as objc::message::MessageArguments>::invoke
24: objc::message::platform::send_unverified::{{closure}}
25: objc_exception::try::{{closure}}
26: objc_exception::try_no_ret::try_objc_execute_closure
27: RustObjCExceptionTryCatch
28: objc_exception::try_no_ret
29: objc_exception::try
30: objc::exception::try
31: objc::message::platform::send_unverified
32: fruitbasket::osx::FruitApp::run
33: example::main
34: std::rt::lang_start::{{closure}}
35: std::panicking::try::do_call
36: __rust_maybe_catch_panic
37: std::rt::lang_start_internal
38: std::rt::lang_start
39: main

The private selectors were renamed in Mojave. That is fixed in the master branch now.