}
- (id)initWithDevice:(IOHIDDeviceRef)dev {
- if ((self = [super init])) {
+ if ((self = [super initWithName:nil did:nil base:nil])) {
self.device = dev;
self.productName = (__bridge NSString *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductKey));
vendorId = [(__bridge NSNumber *)IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDVendorIDKey)) intValue];
}
- (NJInput *)findInputByCookie:(IOHIDElementCookie)cookie {
- for (NJInput *child in _children)
+ for (NJInput *child in self.children)
if (child.cookie == cookie)
return child;
return nil;