Jump to content

getting error when make package %hook (void) pass-through need help


Go to solution Solved by AnotherLurker,

23 posts in this topic

Recommended Posts

Posted

please guys can someone help me with this , i am getting error when i try to "make package " the ones in red   (void) pass-through did i wrote them correctly ?

 

 

%hook UBTripAddressesViewController

-(bool)_allowsAddressesViewController {
return TRUE;
}
%end
 
%hook UBTripAddressesView
-(bool)shouldDisplayDropoff {
return TRUE;
}
%end
 
%hook UBTrippAddressesView 
-(void)_updateDropoffContentEdgeInsets {
return PASS-THROUGH;
}
%end
 
%hook UBEarningsTrip 
-(id)dropoffAddress {
return PASS-THROUGH;
}
%end
 
%hook UBTrip 
-(id)dropoffLocation {
return PASS-THROUGH;
}
%end
 
%hook UBSecondaryDispatchView 
-(bool)showPickupAndDropoffAddress {
return TRUE;
}
%end
 
%hook UBSecondaryDispatchDefaultAcceptView
-(bool)showPickupAndDropoffAddress {
return TRUE;
}
%end
 
%hook UBOnTripMapViewController
-(bool)_allowsDropoffLocationToBeShown {
return PASS-THROUGH;
}
%end
 
%hook UBTripAddressesView
-(bool)shouldDisplayPickup {
return FALSE;
}
%end
 
%hook UBNavigationInfoViewController
-(void)_updateDisplayForDisplay {
return PASS-THROUGH;
}
%end
 
%hook UBNavigationInfoViewController
-(void)_updateDisplay {
return PASS-THROUGH;
}
%end
 
%hook UBTripAddressesViewController
-(void)_updateDisplayForDisplay {
return PASS-THROUGH;
}
%end
 
%hook UBTripAddressesViewController
-(void)_updateDisplay {
return PASS-THROUGH;
}
%end
 
 
 
 
 
Posted (edited)

You can't return void:

 

For every void you have pass-through, remove the return statement and leave it empty

 

 

I don't quite understand why you wanted to return nothing to the id because even in Flex it's shown as NULL when you modify id. Therefore the id functions are useless and you can delete them completely unless you want to return nil;

 

 

It's not

 

return PASS-THROUGH;
It's just

return;
Hell no Updated by castix
Posted (edited)

You can't return void:

 

For every void you have pass-through, remove the return statement and leave it empty

 

 

I don't quite understand why you wanted to return nothing to the id because even in Flex it's shown as NULL when you modify id. Therefore the id functions are useless and you can delete them completely unless you want to return nil;

 

Hell no

 

Leaving it empty or doing

return;

lead to the exact same thing

Updated by AnotherLurker
Posted

Leaving it empty or doing

 

return;
lead to the exact same thing

Sometimes Theos is bitching around because of wrong return types

Posted

It's not 

 

return PASS-THROUGH;
It's just

return;

I do not think he's trying to null them

Posted

It's not Theos, Theos just executes the Logos preprocessor which converts %hook code into actual C/C++ code that is then compiled by Clang.

 

a touché

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines