alexrozanski / PXSourceList

Source List control for the Mac
Other
639 stars 77 forks source link

isGroupAlwaysExpanded not quite working for me #13

Closed locomote closed 13 years ago

locomote commented 13 years ago

Hi, I have configured the isGroupAlwaysExpanded Delegate method to return yes for all groups but it doesn't display correctly when running. The disclosure triange goes away as expected by the child items then don't display; Any ideas?

alexrozanski commented 13 years ago

Hi,

Have you implemented -sourceList:isItemExpandable: ? You must return YES in this method for all items that you want to display as always expanded

locomote commented 13 years ago

Hi, thanks for the quick reply. Yes I have implemented that method but still to no avail. I also had a couple of issues with this latest version relating to the PXLog definition, I restored the definition to the older one and it fixed it.

alexrozanski commented 13 years ago

Without more information about how you've implemented the control, it would be hard to say what is wrong – if you have returned that the item has children, and you've returned that the item has 1 or more child items, then the control should be displayed correctly.

Have you checked your code against the demo target to see whether you have implemented the delegate messages correctly?

locomote commented 13 years ago

Hi again, I have checked my code against the demo and it's exactly the same. All of the same delegate methods have been implemented too. It's quite bizzarre really. The only thing different is that I was getting lots of build errors with the new PXSourceList from the other day all relating to _PXLog. I simply changed the #define at the top to what the old one was. Any chance this could be causing it? Also, the disclosure triangle does disappear normally, it just doesn't draw the child items.

locomote commented 13 years ago

Correction: that was with pxlistview

locomote commented 13 years ago

Well I ended up working it out. It was quite a stupid mistake actually, I'm a bit ashamed. I had been using the init method to fill the array, I moved that code into the awakeFromNib method and it resolved it. I should really have thought of that earlier. Thanks for your help!