You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The Push and Help Button selectors must be unique
It seems that the selector function should act without knowledge of the calling parameter.
But parameters are parameterized in an FxPlug framework and creating per parameter selectors is basically objective C Voodoo. I need to be able to pass one selector to all buttons and decide what do to in the selector based on which parameter was clicked.
This nuance makes the button and help button completely useless in a dynamic and/or parameterized context. 100% useless. It's not possible to construct new selectors, and have them stick around after restarting the app. These dynamic button selectors would need to be reconstructed dynamically on each load/deserialization. This is unacceptably complex.
Describe the solution you'd like
Pass the Parameter ID to the PushButton/Help Selector.
- (void)myPushButtonSelector: (UInt32)parameterID
{
// parameterID 108 or 201, whichever is the id of the PushButton parameter that was clicked
if (parameterID == 108) {
//do 108 stuff
} else {
// do 201 stuff
}
}
...
[creationAPI_v5 addPushButtonWithName:@"param name" parameterID: 108 selector:@selector(myPushButtonSelector:) parameterFlags:flags];
[creationAPI_v5 addPushButtonWithName:@"param name" parameterID: 201 selector:@selector(myPushButtonSelector:) parameterFlags:flags];
If my knowledge of objective c is swell enough, FxPlug can dynamically check the passed selector (within creation API v5, addPushButtonWithName and addHelpButtonWithName) and on click raise the selector with or without the parameter ID based on if the function accepts it. The API itself doesn't need to change, just expanded slightly without any change to existing operations. 100% backward compatible.
Describe alternatives you've considered
It's possible to dynamically insert a dynamically created methods to the main primary Effect object, for each button parameter so as to hack passing along the parameter Id.... but we are started to get into serious objective C voodoo.
I'm considering making dynamic selectors with parameter ID in the name, which is then decomposed by implementation via passed parameter, of course, this must be reconstructed each time the effect is deserialized. This requires getting the parameter types from the API, which is not (yet) part of the FxPlug API.
Forcing each parameter to have a different selector is an unreasonable requirement for FxPlug frameworks.
Additional context
As a framework developer, I consider this a bug because of just how ugly things are without it. But I get that this is an "enhancement" for most people. ✌️. So this is filed under "enhancement."
The text was updated successfully, but these errors were encountered:
Apple Feedback Assistant ID: MISSING!
Is your feature request related to a problem? Please describe.
The Push and Help Button selectors must be unique
It seems that the selector function should act without knowledge of the calling parameter.
But parameters are parameterized in an FxPlug framework and creating per parameter selectors is basically objective C Voodoo. I need to be able to pass one selector to all buttons and decide what do to in the selector based on which parameter was clicked.
This nuance makes the button and help button completely useless in a dynamic and/or parameterized context. 100% useless. It's not possible to construct new selectors, and have them stick around after restarting the app. These dynamic button selectors would need to be reconstructed dynamically on each load/deserialization. This is unacceptably complex.
Describe the solution you'd like
Pass the Parameter ID to the PushButton/Help Selector.
Instead of
It would look like this:
If my knowledge of objective c is swell enough, FxPlug can dynamically check the passed selector (within creation API v5, addPushButtonWithName and addHelpButtonWithName) and on click raise the selector with or without the parameter ID based on if the function accepts it. The API itself doesn't need to change, just expanded slightly without any change to existing operations. 100% backward compatible.
Describe alternatives you've considered
It's possible to dynamically insert a dynamically created methods to the main primary Effect object, for each button parameter so as to hack passing along the parameter Id.... but we are started to get into serious objective C voodoo.
I'm considering making dynamic selectors with parameter ID in the name, which is then decomposed by implementation via passed parameter, of course, this must be reconstructed each time the effect is deserialized. This requires getting the parameter types from the API, which is not (yet) part of the FxPlug API.
Forcing each parameter to have a different selector is an unreasonable requirement for FxPlug frameworks.
Additional context
As a framework developer, I consider this a bug because of just how ugly things are without it. But I get that this is an "enhancement" for most people. ✌️. So this is filed under "enhancement."
The text was updated successfully, but these errors were encountered: