-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing descriptorType
at NSAppleEventDescriptor
#590
Comments
The reason it's not present is that the type of that field is You can do the following in the meantime. Depending on your needs, you might have to pull in the use icrate::Foundation::NSAppleEventDescriptor;
use objc2::msg_send;
use core_services::DescType; // If using `core-services`
type DescType = u32; // If not using `core-services`
pub fn get_descriptor_type(desc: &NSAppleEventDescriptor) -> DescType {
unsafe { msg_send![desc, descriptorType] }
} |
@madsmtm thank you for your help. Could you please advice me, how do I call this method?
Info: https://developer.apple.com/documentation/foundation/nsappleeventdescriptor/1415227-init |
First, have a look at the Objective-C documentation instead: Now you can do roughly what I did above, except using pub fn descriptor_with_string(string: &NSString) -> Id<NSAppleEventDescriptor> {
unsafe { msg_send_id![NSAppleEventDescriptor::class(), descriptorWithString: string] }
} |
@madsmtm thank you! |
Hello!
I wanted to access
descriptorType
atNSAppleEventDescriptor
in order to understand the type of the descriptor, but couldn't find the corresponding field in the generatedicrate
package. Is there a way to access that field for me?The text was updated successfully, but these errors were encountered: