Skip navigation
Currently Being Moderated

Preserving persistance implementing class id

Oct 6, 2011 11:32 PM

Tags: #porting

Hi,

 

I was suggested by Adobe to preserve the persistance implementaton class id while splitting the CS4 project into model and ui plugin for CS5 or to give conversion provider if the persitant data format ge changed. But I have doubt what to do if a class which is UI related is conataing such implementation. Since, that Boss class including the aggregated interfaces and implementations will be moved into UI pluging which will be having a new implementation id based on the new plugin prefix id of the UI plugin.

So how we can handle this case.

 

Thanks a lot!

 
Replies
  • Currently Being Moderated
    Oct 7, 2011 12:53 AM   in reply to dvkkk

    Could you please give an example of the actual problem that you are facing, that would allow me to answer this better.

    However if you are placing a persistent interface in a boss class that has both UI implementations and the persistent implementations then you can split the boss class definition into two. The definition in the UI plugin will have the UI implementations and the model definition will have the persistent implementation. This way you will be using the ID of the model for the persistent implementation.

     

    Manan Joshi

     

    - Efficient InDesign Solutions -

    MetaDesign Solutions

    http://metadesignsolutions.com/services/indesign-development.php

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2011 2:41 AM   in reply to dvkkk

    For this scenario what you could do is split this boss class into two parts as i mentioned before. In the model you could place the following defenition

     

    Class

    {

              kMyRevisionPrefPanelDialogBoss,

              kPrimaryResourcePanelWidgetBoss,

              {

     

                   IID_ITABLECELLDATA,               kMyRevisionTableCellDataImpl,

              }

    },

     

    and the UI plugin will have the class decleration as

     

    Class

    {

              kMyRevisionPrefPanelDialogBoss,

              kPrimaryResourcePanelWidgetBoss,

              {

                                                 IID_IPANELCREATOR,               kMyRevisionPrfPanelCreatorImpl,

                                                 IID_IK2SERVICEPROVIDER,      kDialogPanelServiceImpl,

                                                 IID_IDIALOGCONTROLLER,        kMyRevisionPrefPanelControllerImpl,

                                                 IID_IOBSERVER,                        kMyRevisionPrefPanelObserverImpl,

              }

    },

     

     

    for this to work you will have to declare the ID of the UI plugin in the model plugin's id.h so that the we have the definition for the kMyRevisionPrefPanelDialogBoss, you would also need the declaration of the boss class kMyRevisionPrefPanelDialogBoss ID in the model plugin. Once this is done you can give the kMyRevisionTableCellDataImpl class your implementation with the model plugin ID. I think this should work fine. Let me know when your findings.

     

    Infact on second thoughts you could declare the boss class in the model plugin itself and include the model's ID.h in the UI plugin. The class definition in this case will also remain as i have exmplefied above. This should simplify the process.

     

    Anyhow i have a query what specifically are you trying to achieve using a persistent implementation in a UI boss class.

     

    Manan Joshi

     

    - Efficient InDesign Solutions -

    MetaDesign Solutions

    http://metadesignsolutions.com/services/indesign-development.php

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2011 3:43 AM   in reply to dvkkk

    Yes this should work, sorry i erroroneously wrote Class in place of an AddIn. Try this out this will work.

     

    Manan

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2011 4:48 AM   in reply to dvkkk

    My pleasure.

     

    Manan Joshi

     

    - Efficient InDesign Solutions -

    MetaDesign Solutions

    http://metadesignsolutions.com/services/indesign-development.php

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points