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

Show the details returned by detailsOfObject: #591

Closed
skurfer opened this issue Nov 25, 2011 · 6 comments
Closed

Show the details returned by detailsOfObject: #591

skurfer opened this issue Nov 25, 2011 · 6 comments
Labels
Milestone

Comments

@skurfer
Copy link
Member

skurfer commented Nov 25, 2011

Some object sources in plug-ins use a method called detailsOfObject to assign details on the fly, instead of assigning them when objects are first created. This method is being called, but the resulting details are not being displayed.

@skurfer
Copy link
Member Author

skurfer commented Nov 30, 2011

The details are being pulled in on line 389 of QSObject.m, but the wiped out (set to nil) by line 393.

Any ideas @HenningJ? Looks like you cleaned up safeLocalizedStringForKey earlier this year. (This was probably broken before that, but the method seems to still have problems.)

@HenningJ
Copy link
Contributor

You're right, it might be my fault. Might be related to a problem with localization @pjrobertson had recently.

Basically it happens, because the string you put in safeLocalizedStringForKey is not found in the QSObject.details.strings file. Then safeLocalizedStringForKey returns what you put in for value:. Since at QSObject.m:L393, we put in nil for value, it returns nil.

@skurfer
Copy link
Member Author

skurfer commented Dec 1, 2011

Then safeLocalizedStringForKey returns what you put in for value:. Since at QSObject.m:L393, we put in nil for value, it returns nil.

That’s what I thought, so I passed in details as the default value, but it still comes back nil. I also tried just returning the details without localization (figuring that the details from some plug-in were never going to match a string in the QSObject.details table), but apparently that method takes care of things like turning HFS paths into POSIX paths, so that isn’t the answer.

I stepped through it in the debugger as well, but that just confused me. I never saw the details string I expected as the value for key. I sometimes saw something to the effect of “not a CFString”, so maybe that’s related.

So (as you can see) I spent some time trying to fix this myself earlier, but ran out of time, so my message was brief. :-)

While this probably won’t fix the bug, I still want to ask: There could be a number of places that pass nil as the default value. Should we have the method set defaultValue = key when defaultValue is nil?

@skurfer
Copy link
Member Author

skurfer commented Dec 16, 2011

OK, I don’t think the problem is in safeLocalizedStringForKey. In the debugger, I was never seeing the missing details string get passed to it. I put return key; on the first line to make it effectively do nothing and the details were still missing.

Commenting out the call altogether seems to work, so it must have something to do with the way it’s called. I suspect [self bundle] isn’t resolving or is resolving to the wrong thing.

@skurfer
Copy link
Member Author

skurfer commented Jan 18, 2012

Grrrr. Why didn’t this close automatically?

@skurfer skurfer closed this as completed Jan 18, 2012
@pjrobertson
Copy link
Member

Hehe. Oooh I like the milestone ;-)

v1.0 is sooooon!

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

3 participants