Skip to content
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

Certain proxy objects seem to do nothing #8

Closed
skurfer opened this issue Nov 19, 2009 · 12 comments
Closed

Certain proxy objects seem to do nothing #8

skurfer opened this issue Nov 19, 2009 · 12 comments
Labels

Comments

@skurfer
Copy link
Member

@skurfer skurfer commented Nov 19, 2009

Affected Software

I've seen this behavior in all versions of b57, including build 3840. I am running 10.6.2 and don't know if this affects 10.5.x.

This problem can be seen with at least two proxy objects:

  1. "Current Web Page" from the Safari plugin
  2. "OmniWeb Active Page" from the OmniWeb plugin

Expected Behavior

Assuming the relevant browser is running with a page open:

Scenario 1

  • Invoke Quicksilver
  • Select "OmniWeb Active Page"
  • Tab to the next pane
  • Select the "Paste" action

The URL of the frontmost page will be pasted into the current application.

Scenario 2

  • Invoke Quicksilver
  • Select "OmniWeb Active Page"
  • Tab to the next pane
  • Select the "Open URL With…" action
  • Tab to the 3rd pane
  • Select a browser

The frontmost page will be opened in the chosen browser.

Problem

In Scenario 1, the "Paste" action isn't even an option. In Scenario 2, nothing happens when you hit return. It's as if these objects are empty.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Nov 20, 2009

In an effort to provide more info, I removed QS, Application Support, Caches, and preferences and ran 3840 so I could check the Console. I didn't see any messages logged when I tried to use "Current Web Page".

@peterjp80
Copy link

@peterjp80 peterjp80 commented Dec 19, 2009

B57 (3840)
It seems the Current Application proxy isn't working either. To verify the Proxy wasn't working, I ran Current Application --> Quit Others while Firefox was the active application...everything quit except Finder. Then I tried the same command again with Finder not running (I ran PathFinder instead) and everything quit and the entire menu bar dissapeared. I'd really love to see this working, Proxy Objects are a great feature in QS.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Jan 23, 2010

Some additional info…

After getting the OmniWeb plug-in to build, I added some NSLog() calls to see what was happening. The proxy object is being called and is getting the right URL, but Quicksilver isn't handling it normally for some reason. A lot of the actions that would normally be present for URLs (like Paste) aren't available. I noticed that URLs generated from bookmarks are also missing actions, but URLs entered by hand in text-entry mode seem to behave normally. The plug-in sends the URLs to QS with URLObjectWithURL:, which should be pretty safe. I suppose the logic that analyses text while typing in order to decide if it's a URL or not goes down a different path, but I haven't located it in the code to see what's different about it.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 23, 2010

Building a modified Quicksilver has provided further insight into the problem. Long story short, it seems that in B54, the resolveProxyObject: method would get called as soon as the Proxy Object appeared in the first pane. I know this because “OmniWeb Active Page” would always launch OmniWeb if it wasn’t running, simply because I selected it (before tabbing over to the action pane and selecting/executing any action). I’m guessing it’s the call to

tell application “OmniWeb”…

in the plug-in that causes that.

In B58, the resolveProxyObject: method doesn’t seem to be getting called until after you tab over and run an action (such as Large Type) on it. Since the Proxy Object is essentially “empty” when you select it, Quicksilver can’t recognize it (as a URL in this case) and provide the appropriate actions for it.

I’m guessing that the actions you do see are the ones that apply to any type of object.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 23, 2010

Perhaps the problem was introduced with this commit?

http://github.com/quicksilver/Quicksilver/commit/de47ff09a6b05ebf87cd5a5186074d78b72dbfcd

@pkohut
Copy link

@pkohut pkohut commented Mar 23, 2010

I think your on the right track. Most of those changes around that time were to gear up for the mass overhaul of QS.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 30, 2010

Closer and closer.

I figured out how to run QS with some breakpoints. I noticed that the resolveProxyObject: method was getting called for some of the built-in proxy objects, like “Current Selection”. I also re-read the comments on the suspect commit above:

the provider of a proxy now gets its word to say when a proxy object is accessed by either the proxy source or the proxy handler

From trial and error, I think this means that the “proxy source” will not resolve the proxy object until an action is run on it, where a “proxy handler” will resolve it when it’s selected in the first pane. So maybe the Safari and OmniWeb modules need to be modified to use a proxy handler?

@skurfer
Copy link
Member Author

@skurfer skurfer commented Apr 7, 2010

It turns out that the correct actions are there (at least most of the time) because QS has a couple of ways to get a proxy object’s type without actually “resolving” it.

Partial explanation for Scenario 1: the “Paste” action was renamed to “Paste with Clipboard”, but there are other issues. That action is supposed to paste some representation of object in the first pane, but instead it’s pasting whatever was already in the pasteboard.

Since the process is

  1. Put the current thing in the pasteboard
  2. Paste

I’m guessing that step 1 gets no results, so the contents of the pasteboard are unmodified when you get to step 2. This would also explain Scenario 2 from the initial report.

@ghost
Copy link

@ghost ghost commented Mar 12, 2011

Take a look at this commit: 35a8614
With this change, I'm able to use Current Web Page -> Paste successfully.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 14, 2011

Pardon my Git ignorance, but how does that show up under quicksilver/Quicksilver, but when I browse commits for that repository, it’s not listed?

As for the issue itself, I’ll build a copy with your changes and test when I get a chance. Thanks.

@ghost
Copy link

@ghost ghost commented Mar 14, 2011

I have no idea. Git's too complicated for me to even tell if that's a bug or not. But it doesn't seem right.

@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Apr 1, 2011

I cannot test the initial poster's 'Current OmniWeb Page' proxy, as I don't have it installed. I can confirm that all other proxies are working for me with Neurolepsy's latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants