4 Replies Latest reply on Jan 27, 2011 12:50 AM by johnrellis

    Bug in catalog:getActiveSources()

    johnrellis Most Valuable Participant

      There is no way for a plugin to accurately determine the current source.  If the current source is All Photographs,  Quick Collection, or Previous Import, the method catalog:getActiveSources() returns the empty table {}, but it should return catalog.kAllPhotos, .kQuickCollectionIdentifier, or .kPreviousImport.



        • 1. Re: Bug in catalog:getActiveSources()
          areohbee Level 5

          Yeah, if this were working, one could implement "sticky collections" as a background task:

           

          - get active sources

          - assure sticky collection is one of them

          - set active source that include the sticky collection, if not already set...

           

          Although, as long as it returns the correct source for most situations, it may not be too bad...

           

          Probably not a good solution for sticky privacy collections, since there would be a moment when it becomes unstuck.

           

          Anyway, just brainstorming...

           

          R

          • 2. Re: Bug in catalog:getActiveSources()
            johnrellis Most Valuable Participant

            I was interested in something related: The ability to undo and redo source and filter selections.  A background task would capture the current state of sources and filters every second, for use by the Undo and Redo commands.  My unfinished prototype works well, except for the fact that getActiveSources() doesn't capture all the sources.

            • 3. Re: Bug in catalog:getActiveSources()
              areohbee Level 5

              Good idea.

               

              So does this mean the prototype will never make it to production? Or, it will be produced, but with limitations...

              • 4. Re: Bug in catalog:getActiveSources()
                johnrellis Most Valuable Participant

                I'm not planning on doing any more work until if/when the bug and limitation are fixed.  If get/setActiveSources can't replicate user actions (e.g. knowing that the current source is set to the previous import), then it's much less useful to me.