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
I’ve had a trigger for Current Selection → Use as Remote Host for a long time, but it’s never worked. I always thought it was proxy object weirdness, but I had an idea tonight. You can also reproduce this by creating a trigger for something like =15+10 → Calculate. As you’ll see, nothing happens. I’m pretty sure it has to do with the action having displaysResult set to true.
Maybe this only works when the interface was active to begin with? Haven’t had time to dig into it.
The text was updated successfully, but these errors were encountered:
QSObject *returnValue = [actionObject performOnDirectObject:dObject indirectObject:iObject];
if (returnValue) {
QSController *controller = [(QSController *)[NSApp delegate] interfaceController];
// if the action returns something, wipe out the first pane
/* (The main object would get replaced anyway. This is only done to
remove objects selected by the comma trick before the action was run.) */
[controller clearObjectView:[controller dSelector]];
// put the result in the first pane and in the results list
[[controller dSelector] performSelectorOnMainThread:@selector(setObjectValue:) withObject:returnValue waitUntilDone:YES];
// bring the interface back to show the result
if ([actionObject displaysResult]) {
[controller actionActivate:nil];
}
}
return returnValue;
Basically, I mimicked a lot of what you find in QSInterfaceController's executeCommandThreaded method.
I don't like the above fix because it duplicates so much code. Especially since the code comes from a method I've had to fix at least twice. If we ever had to fix it further, we'd have to remember to do it both places. So, I plan to look for a better long-term fix that consoldates all of this functionality into a single place that gets shared by all the various entry points.
Who knows? Maybe I'll accidentally fix #283 in the process.
Related to this, I’ve noticed that if you previously had multiple items selected with the comma trick, then you run a trigger that asks for something in the third pane, the other objects in the first pane won’t be properly cleared.
I’ve had a trigger for Current Selection → Use as Remote Host for a long time, but it’s never worked. I always thought it was proxy object weirdness, but I had an idea tonight. You can also reproduce this by creating a trigger for something like =15+10 → Calculate. As you’ll see, nothing happens. I’m pretty sure it has to do with the action having
displaysResult
set to true.Maybe this only works when the interface was active to begin with? Haven’t had time to dig into it.
The text was updated successfully, but these errors were encountered: