Apologies for the long message - I wanted to be clear what I've tried and what my settings are! Any help you can provide is most appreciated.
I've built a sample InDesign extension using Extension Builder 2.1 and ActionScript. Although I am running InDesign CC, I hope to target CS 5.5 users and above, so I have my project's Flex SDK set to "Extension Builder 3.4". I am using the "Creative_Suite_CS5" theme that Adobe Extension Builder provided.
I have tried various options of changing the Flex SDK, changing the project theme and changing my source code, and can't seem to find a solution that makes my extension fit in with the rest of InDesign. I have looked at Adobe sample code, but even the complete examples (eg MakeSideHeads) don't actually respond to InDesign theming, which isn't very helpful.
- With the Flex SDK set to "Extension Builder 3.4" the MXML Design window refuses to run. I have to change the compiler to be Extension Builder 4.5 in order for the Design window to appear. (I realise the designer is going to go away, but for now it's a valuable crutch!)
- When I run the extension, I have to change the Flex SDK back to "Extension Builder 3.4", because when it's set to 4.5 I get an swfBridge error on lines such as this one: myCSXS.addEventListener("documentAfterActivate", documentChanged)
- When running as Extension Builder 3.4, the line "AutoTheme.sync();" works - or at least sort of works. This line was put in by Flash Builder when I made a new project, and appears to be an older form of what I've seen elsewhere: "CSInterface.instance.autoThemeColorChange = true;" If I switch back to Extension Builder 4.5, the AutoTheme.sync() line refuses to run.
- The reason I've said "AutoTheme.sync();" only "sort of" works is because it changes some parts of my extension UI correctly, but other parts wrongly. For example, it sets the panel background color correctly and it sets label colors correctly (ie, dark labels on light background, and light labels on a dark background). However it screws up my comboboxes and my buttons: it changes their labels to be light but leaves their background colors to be light too, making the text hard to read.
- Even though I'm using the "Creative_Suite_CS5" theme, my comboboxes don't look like InDesign's - they are lacking the arrows on the right side. These arrows are there if I use the Halo theme, but they go away with the Creative_Suite_CS5 theme. Similarly, my NumericSteppers put their arrows on the right, whereas InDesign seems to put them on the left.
Here are two pictures that help show what I'm seeing:
I know this is all relatively small stuff, but I want my extension to look and feel as native as possible to InDesign so that it doesn't stick out!
Thank you in advance for your help!
The issues you are having are caused by some underlying differences in the flex libraries in EB 3.4 and 4.5. Using EB 4.5 allows using flex spark components however these are not backward compatible to CS 5.5. In order to have an extension that is backwards compatible to CS 5.5 we strongly advise using EB 3.4. That does unfortunately mean that you will not be able to use the design view. The AutoTheme library was created to provide the theme syncing ability that is available in EB 4.5 through the "CSInterface.instance.autoThemeColorChange = true; call to EB 3.4 extensions and does not work with EB 4.5 (as you have found) because it is trying to set the theme of a different set of UI components which are not available in EB 4.5.
So to summarize:
AutoTheme.sync() is what you should use for EB 3.4
"CSInterface.instance.autoThemeColorChange = true; should be used with EB 4.5
they provide equivalent functionality and should not be mixed.
Finally we would strongly advise using EB 3.4 for CS5.5 extensions.
For the combo box issue unfortunately we only had the capacity to create a broad theme that should cover the majority of the controls correctly, however some controls are not ideally themed. However we do provide AutoTheme.postThemeColorChange which can be set a function to run immediately following theme setting that should allow you to customize the theme to cover these cases.
I hope that helps,
Thank you for your response - I feel I understand it a little better now!