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.
The text was updated successfully, but these errors were encountered:
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.
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?
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.