8 Replies Latest reply on Jan 21, 2011 1:00 PM by areohbee

    LrPublishedCollectionInfo references in SDK docs are broken links

    clvrmnky Level 4

      Is there an update to the SDK docs that explains LrPublishedCollectionInfo?  There are several functions that refer to this type as params, but they are all broken links and it is unclear to me if it refers to LrPublishedCollection or not. Example code seems to suggest this is not the case.

       

      Some SDK examples [e.g., the stubs for publishServiceProvider.shouldReverseSequenceForPublishedCollection()] just deepen the confusion.

       

      I'd really like to know what I can do with publishServiceProvider.goToPublishedCollection() and the passed in "info.publishedCollectionInfo" param.

        • 1. Re: LrPublishedCollectionInfo references in SDK docs are broken links
          areohbee Level 5

          Looks altogether undocumented to me.

           

          If you want to dump it out, consider using Debug.pp from John Ellis' Debug.lua file:

           

          http://www.johnrellis.com/lightroom/debugging-toolkit.htm

           

          Rob

          1 person found this helpful
          • 2. Re: LrPublishedCollectionInfo references in SDK docs are broken links
            areohbee Level 5

            Its not this is it? ( I'm just taking a wild stab - I've never worked with publish services):

             

            pubCollection:getCollectionInfoSummary()
            Retrieves an information summary about this published collection.

            This function must be called from within an asynchronous task started using LrTasks.

            First supported in version 3.0 of the Lightroom SDK.

            Return value

            table with the following information:
            • name: Name of the published collection
            • localIdentifier: Internal ID number of the collection (the local identifier).
            • remoteId: The ID of the collection on the remote service.
            • remoteUrl: URL of the collection (if applicable) as published.
            • isDefaultCollection: (Boolean) True if this is the default collection.
            • parents:  (array of tables) Information about any published collection sets that  contain this collection. An array of tables, each containing name, localCollectionId, remoteCollectionId, and publishedUrl.
            • collectionSettings: (table) Any collection-specific settings that have been stored by the plug-in.
            • publishSettings: (table) Publish settings for this plug-in.
            • 3. Re: LrPublishedCollectionInfo references in SDK docs are broken links
              clvrmnky Level 4

              Yes, it appears so. This was actually the information I was trying to get to, but I was complicating things thinking I had to further dereference the thing I got back from the info param.

               

              Thanks for the push in the right direction.

               

              I wish I could figure out the Debug package you mention. It looks useful. Unfortunately, it is too late in the evening for me to grok it and the instructions are failing early on.

              • 4. Re: LrPublishedCollectionInfo references in SDK docs are broken links
                areohbee Level 5

                Maybe in the morning (after yoga and/or a coffee/tea...) look back at John's Debug module.

                 

                Its pretty amazing.

                 

                (He's pretty amazing)

                 

                PS - I'm in the process of integrating John's debug module with the framework, which is a good way to get a plugin up quick if you dont already have your own framework / libraries / modules amassed...

                 

                R

                • 5. Re: LrPublishedCollectionInfo references in SDK docs are broken links
                  clvrmnky Level 4

                  Clearly, I need to come back to this once I get a good feeling for how the Lr env is and isn't standalone Lua I'm used to, and wrap my head around namespaces-which-are-not-modules vs. not-quite-classes. This is the first time I've seriously looked at the SDK, other than reading the API docs and poking at the examples.

                   

                  Debug tools are welcome, of course, and your hint actually keeps me from posting another question about available debugging techniques.

                   

                  For now I'm using simple LrLogger tracing but that will get old fast.

                  • 6. Re: LrPublishedCollectionInfo references in SDK docs are broken links
                    areohbee Level 5

                    clvrmnky wrote:

                     

                    Clearly, I need to come back to this once I get a good feeling for how the Lr env is and isn't standalone Lua I'm used to, and wrap my head around namespaces-which-are-not-modules vs. not-quite-classes. This is the first time I've seriously looked at the SDK, other than reading the API docs and poking at the examples.

                     

                    Debug tools are welcome, of course, and your hint actually keeps me from posting another question about available debugging techniques.

                     

                    For now I'm using simple LrLogger tracing but that will get old fast.

                     

                    Yeah, there is a bit of a learning curve...

                     

                    No true debugger for it, ala IDE or anything - no single stepping..., at least not when running in Lightroom environment... John's debugger is next best thing I think.

                     

                    I tail the log file with an editor, but the logger can also output messages direct to a debugger, if that would help (its all in the docs...)

                     

                    I wonder if it would be possible to write a true debug module for an IDE, hmmm...

                     

                    PS - I completed the integration of John's debugger with the framework.

                     

                    Have fun,

                    Rob

                    • 7. Re: LrPublishedCollectionInfo references in SDK docs are broken links
                      johnrellis Most Valuable Participant
                      I wonder if it would be possible to write a true debug module for an IDE, hmmm...

                      I think it would be very impractical, given that Adobe disabled most of the functions of the "debug" module (e.g. debug.sethook, debug.getlocal, etc.).

                       

                      I briefly considered a debugger implementation that would parse the Lua source and rewrite it with "hook calls" into a debugger API. I got as far as finding a Lua parser (in Lua) before deciding that would take much, much longer than I was willing to invest.

                       

                      If Adobe were to enable the full "debug" functionality, then a full debugger would be much more practical.

                      • 8. Re: LrPublishedCollectionInfo references in SDK docs are broken links
                        areohbee Level 5

                        Makes sense - thanks for enlightening...

                         

                        R