'Last command' proxy object doesn't work #722

Closed
pjrobertson opened this Issue Feb 23, 2012 · 7 comments

Projects

None yet

3 participants

@pjrobertson
Member
  • Run a simple command such as Safar → Open
  • Search for the 'last command' proxy and right arrow into it.

Observe the "[Action missing: (null]" message. The icon seems to be right, which is nice!

@skurfer
Member
skurfer commented Feb 23, 2012

I’m going to guess this is related to #555. Assigning to me.

@skurfer skurfer was assigned Feb 23, 2012
@skurfer
Member
skurfer commented Mar 30, 2012

The “Recent Commands” catalog entry shows the same “Action missing” objects.

@pjrobertson
Member

This is most likely related to the fact that the way actions are stored was changed by Etienne a while ago. It's what broke saving triggers. I've just started looking into it, but I now realise you're assigned.

I think the fundamental problem is with the (QSCommand *)initWithDirectObject:(QSObject *)directObject actionObject:(QSAction *)actionObject indirectObject:(QSObject *)indirectObject method in QSCommand. The direct/indirect objects aren't really getting set properly.

@pjrobertson
Member

P.P.S. it's a problem with the aObject method in QSCommand.m. The
object's are being saved and read in different formats (some with
'directArchive' dicts and some with 'actionArchive' dicts etc.)

@tiennou - when you made these changes on how to store commands in files,
what was your logic/reasoning. What's the difference between a
'directArchive' and a 'directID'?

On 30 March 2012 19:35, Rob McBroom <
reply@reply.github.com

wrote:

The Recent Commands catalog entry shows the same Action missing
objects.


Reply to this email directly or view it on GitHub:
#722 (comment)

@skurfer
Member
skurfer commented Mar 30, 2012

I thought it was the massive differences in the result of dictionaryRepresentation. (See the plist examples I included over on #555.) But maybe that’s the same thing. dictionaryRepresentation gets called by the setters in the method you refer to.

I’m not looking at this at the moment if you want to.

@pjrobertson
Member

Im not looking at this at the moment if you want to.

I did initially, but seeing how much of a mess it's all in, maybe not... :P

On 30 March 2012 20:45, Rob McBroom <
reply@reply.github.com

wrote:

I thought it was the massive differences in the result of
dictionaryRepresentation. (See the plist examples I included over on
#555.) But maybe thats the same thing. dictionaryRepresentation gets
called by the setters in the method you refer to.

Im not looking at this at the moment if you want to.


Reply to this email directly or view it on GitHub:
#722 (comment)

@tiennou
Member
tiennou commented Apr 1, 2012

-direct/indirect/actionArchives are -dictionaryRepresentations of their corresponding command objects (a bit overkill for actions), and -direct/indirect/actionIDs are for object IDs.
The reasoning was that command items without IDs would be lost on the next startup (aka the my triggers become null bug, the null happening when QS tries to restore an object that doesn't lives in the catalog anymore) My test case for that was "pizza" > "Show in large type".
And IIRC I was trying to prevent the "Trigger pref pane has become blank" bug (like if you try to make a trigger with an encapsulated command under certain circumstances), because some objects store non-plist compatible things in a QSObject data dict, and -dictionaryRepresentation is not smart enough to handle those cases, and then the reload code would return a nil for the complete trigger array, resulting in complete trigger loss. But sadly it caused some other things to go awry (like the comma trick objects).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment