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
Creating trigger with only an action kills trigger editing UI #89
Comments
Confirmed |
I was able to repo this in b58 as well, but I have been trying to reproduce this issue in b59 and it does not seem to happen anymore. When I click "save" on a new Hotkey trigger with only an Action, there is no new trigger in the trigger pref pane and if I click Add again i get the Command Builder window and I don't get 2 empty triggers in the qstriggersprefpane window. One Issue i do see, is that if i click straight into the Action QSSearchView object, when i begin typing i get the same results as if you click in the "Select an Item" QSCollectingSearchView object. That doesn't seem to make sense for the Action box because those are actually items which you want to perform an action on, not actions themselves. Is there any reason the Action box should not have behavior like the "Target" box? By which I mean that the "Target" box does not see to be modifiable unless you have a valid Item and Action selected. Maybe it would be better if you could not act on the "Action" box until you have an item selected in the "Select and Item" box. What do you think? |
You're right, this shouldn't be the case. We'll look at trying to fix this. So does the original bug you reported work fine for you now? |
yeah, with your and rob's help i was able to get my first build of QS up and running in the debugger. thanks again! i've been trying to look a little deeper into the issue described here and i think is see what i happening. When the QSCommandBuilder window is opened the searchObjectChanged function in QSCommandBuilder is called (i think due to a notification being issued when setObjectValue is called when the QSCollectingSearchObjectView is created as part of the window). That calls the searchObjectChanged function in the super class which is QSInterfaceController. In QSInterfaceController's searchObjectChanged function, it checks to see why it's getting the notification. It should be because of a change in one of the three parts of the comman: dSelector (direct target), aSelector (action), or indirect target (iSelector). To do that it checks to see if the notification's object (instance of QSCollectingSearchObjectView) is equal either dSelector, aSelector, or iSelector. In this case the object contained by the notification is nil because the window is being created and nothing has been populated yet. Because the window is just being opened and hasn't been populated with anything, that actually makes the nil object equal to dSelector, so it enters the if case that is intended to match only if we have a valid direct target to act on. in that if check the aSelector text box is prematurely enabled. that's the cause of the strange behavior inside this window. I'm pretty sure it's the cause of the original problem described by this issue even though it's not happening exactly the same with this new version. i believe this could be fixed with a simple check in QSInterfaceController:searchObjectChanged (line 363) to verify that the object inside the notification is not nil |
I think you're on the right track with this. What I've seen though is that searchObjectChanged only searches when the Maybe by going into the .xib and seeing if there's a command for something e.g. (made up terms) You could then do a check: What's perhaps more worrying is that if you tab to the 2nd pane (with Nice work on debugging this, I hope you can get it sorted because you're On 17 April 2011 12:45, flyin1600 <
|
i think you're right that the intention is for the searchObjectChanged method should only be called when there is a change to the object, but i put a bunch of logs in and a breakpoint in QSInterfaceController:updateActionsNow to only be tripped if it is called for the QSCommandBuilder
i put the breakpoint at the NSLog statement, then looked at the stack trace for what is happening.
when the QSCommandBuilder receives the notification for dSelector, searchObjectChanged it called, which calls updateActions, which enables the aSelector box. i'm still looking into it. i'll check out your suggestion for ignoring the tab/click action, but if we could eliminate the enable of the action box altogether with wouldn't have to ignore the tab/click. if i can get either fix to work i'll let you know. |
ok so i was wrong about the reason that the aSelector box is coming up as enabled. i added some code to the searchObjectChanged function in QSInterfaceController so it does not call updateActions unless dSelector is not (null) and the aSelector box is still appearing as enabled when the CommandBuilder window is opened some reason. there is only one place in the whole project where i see aSelector being set to enabled which is in updateActions. back to the drawing board... |
I think it's worth doing the check now JUST for the command builder .nib e.g. if you open the normal command window. Make sure pane 1 is empty, tab The only other place I've seen things being called about actions is in Good luck in figuring this out ;) On 18 April 2011 05:22, flyin1600 <
|
wow i thought i was starting with something easy! i really appreciate your support with this. good point about the commenting, i'll keep that in mind as i go. |
it took me a little while to fully understand your comment from yesterday. i was thinking about this problem at work today and it just popped into my head that you were trying to tell me the problem wasn't isolated to creating a trigger (i'm still new). i found the function that handles the tab event. it's handles the tab event in both the main command window (eg: QSBezelInterfaceController) and the trigger creation window i've been looking at, CommandBuilder. It's the function called insertTab in QSSearchObjectView.m:1402 right now i'm trying to follow your suggestion and look at the action of switching to the CommandBuilder's action pane with or without a direct object selected. if i get this fixed by modifying the CommandBuilder nib and associated code, i'm guessing all of the different interfaces for QS would have to implement a similar fix to stop that behavior from happening in their command window. I am far from familiar enough with this code base to try making a change that has such a big impact on QS as a whole, that's why i picked a bug that seemed isolated to creating a lowly trigger. when i get something working in the CommandBuilder i'll let you know then maybe we'll have a better idea for a bigger fix. |
so here's what i've been able to dig up...prefaced by the fact that i'm really not as familiar with the OSX app concepts as i am the IOS app concepts... the insertTab function i referenced above calls selectNextKeyView on the aSelector (instance of QSSearchObjectView)'s window reference. It took me a while to figure out where all of those things were coming from because i only had the IOS developer documentation installed...i realized i was probably missing all of the OSX stuff so i reinstalled XCode and whoa... that window is the base NSWindow for the CommandBuilder, in the insertTab method, is a line
this is where my Cocoa knowledge gets a little hazy because i had no idea what this key concept was. i think after doing a little reading, we can make the aSelector QSObjectSearchview subscribe to a notification called NSWindowDidBecomeKeyNotification, the documenation say this is called by the becomeKeyWindow method of the NSWindow. does this line up with what you were thinking? we add a subscription to this notification and check whether the direct object is empty? if it is empty, if it's empty change the active item back to the direct object pane? |
nope nevermind |
ok, what do you think...? i couldn't find a way to figure out at the level of the nib or aSelector if they became active/selected. Maybe this change to the insertTab function accomplishes the intention of your change though QSSearchObjectView.m:1402
if the tab button is pressed, but you have not selected anything to be the object of your command or action, it does not pass the tab keypress on, so you are effectively "trapped" in the dSelector until you pick something to perform an action on. then once an action appears in the aSelector window you can tab over to it. this fixes both the BezelInterface window and the CommandBuilder window |
Sounds good! Does this fix if you 'click' in the 2nd pane though? That might be another On 19 April 2011 13:10, flyin1600 <
|
I didn't get a chance to check before I ran out the for for work but I'm guessing no. I'll take a look at it tonight. Thanks. |
Cool cool. Your first QS bug fix is certainly going to be better than mine On 19 April 2011 22:14, flyin1600 <
|
So I spent all night trying to get the action panel not to be active if you click on it. I'm baffled. I really think you should be able to call setEnabled:NO on the aSelector. It is a QSObjectSearchView which inherits from QSObjectView which inherits from NSControl. NSControl's documentation says that setEnabled:NO should make the NSContol not mouse click-able. Because they are added to the nib via a custom view they don't have te Inspector attributes of an NSContol, but even setting it programatically doesn't work. I put a version of setEnabled in the QSSearchObjectView which logs th call and calls [super setEnabled:passedInValue] and never saw a call to the function with YES but the action pane is still clickable... Confused... |
I also tred to steal the mouseDown message in the QSObjectSearchView and stop it from being passed up the inheritance chain with no success. The action pane would end up selected anyway. |
Hmmm.... you've been debugging this pretty well I see! I'm no expert on user interfaces or anything with .nibs to be honest. Perhaps a solution would be to just move the focus back to the 1st pane if On 21 April 2011 00:09, flyin1600 <
|
well...i spent a few more days trying to figure out how to stop the action panel from being clickable and i'm stumped. most recently i tried to use the same code that the indirect object panel uses to make itself disabled but it actually removes itself from the view entirely and that causes the main window to have major problems opening. i was looking for some kind of "didBecomeActive" method like you suggested but i haven't been able to find one. i have a way to make text not show up in the action pane if you have nothing in the direct object pane. i added an if-check to the insertText method of the NSText piece of the control that check to see if the currently QSSearchObjectView is the aSelector and if there is no text in the direct object pane, if both of those are true it doesn't allow the text, if not then you pass. QSSearchObjectView.m:1474
while definitely not the optimal solution...i think the combination of the above change to disallow tabbing from the direct object pane, and disallowing writing in the action pane when the direct object is empty (in case someone clicks on the action pane) accomplishes the fix. what do you think? |
It sounds good, and it's covering most options. I know what it's like when One last suggestion; have you tried looking at mouseDown It seems like @bencochran knows the most about interfaces etc. (as he's the On 24 April 2011 01:08, flyin1600 <
|
Whilst looking at another bug, I saw the 'mouseDown' method as well and thought about doing a
test, and you're right - it doesn't work. QS registers there's no object in the 1st pane, but using 'return' still lets the receiver be clicked. Very strange! Maybe someone with more NSView knowledge should have a look at this? I think we need some dev who's IB savvy on board! |
Just a thought. Before we go down the root of thinking 'the first pane is empty so lets not leave it' how about use this way of thinking: at 21:10 he mentions this idea. Basically, I think doing a check for:
|
i can't reproduce this with the latest build. i think this was fixed for issue #229. also @pjrobertson, Alcor actually implemented something like that in QSB - actions being searchable at least, i'm not sure if every action works in both noun-verb and verb-noun orientations. there are a couple of other features he mentions at around the same time in the video which were implemented in QSB as well, like inline Google and Spotlight results, which are things which would be really cool to have in Quicksilver, but would require huge architectural changes. maybe it'd be a good idea to create a wiki page where we could discuss ideas for major modifications to Quicksilver. it's such a great video. scoped catalogs might be worth doing as well (Alcor mentions that alongside the idea you talk about above). |
I've had an 'experimental' branch since I made that post. It fixes this bug (I still get the problem) and also changes QS so that, when you tab with nothing in the first pane it assumes you mean the 'currently selected thing' and you can then do something with that. Similar to ⌘�⎋ |
I've just gone ahead and tried to fix this, but as neurolepsy said, this was indeed fixed by #229. I can't reproduce it. If we want to enable triggers for just actions that could be possible, but I suggest we open another ticket. |
version: Quicksilver b58
host: MacOS X 10.6.3
machine: MacBook Pro 2007
repro:
For a noob like myself, this was KILLER, I had no idea what was going on!
Thanks, -- jd
The text was updated successfully, but these errors were encountered: