Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87055

Weird Layout behaviour in InDesign CC (Mac OS, CC only)

$
0
0

Hello,

 

I'm developing a new version of an extension with Extension Builder 2.1 (Flash Builder 4.6) that targets InDesign CC.

The layout of my extension is changing based on the selected element of the document. I have layouts for TextFrame, Rectangle, Cell, Group and a "main menu".

I save the layout data to the script label of the selected element in my application_focusOutHandler. After saving, the main menu layout should be displayed.

 

I ran into a weird problem with the layout on InDesign CC on Mac OS.

 

Some code that might be helpful:

<csxs:CSExtension xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:csxs="com.adobe.csxs.core.*"

   width="220"

   height="344"

   applicationComplete="onCreationComplete()"

   backgroundColor="white"

   fontSize="9" fontFamily="Arial" xmlns:mx="library://ns.adobe.com/flex/mx" >

 

Setting up the event listener:

var csxs:CSInterface = CSInterface.instance;
csxs.addEventListener(StateChangeEvent.WINDOW_LOSE_FOCUS, application_focusOutHandler);

 

 

The problem:

For example, when the user selects a TextFrame, my layout looks like this:

extension4.PNG

 

When the user clicks on the checkbox (i.e. "Bewegen"), the extension will immediately go back to the "main menu" layout. However, the checkbox is NOT checked and the data is not saved to the script label!

I can't check any of them by clicking on the extensions UI.

When holding the left mouse button, the "underlaying" (underlaying as in the same X;Y position of the checkbox-mouse-click) button of the main menu will also be pressed down and execute on release of the mouse button.

 

extension1.PNG

I can't reproduce this on Windows. Unfortunately I am not able to debug on our Mac as I have no access to it.

 

This occurs on the mx as well as the spark checkbox control:

<s:CheckBox label="Bewegen" id="bMove" selected="{controller.cLabelData.bMove}" height="16"/>
<mx:CheckBox label="Bewegen" id="bMove2" selected="{controller.cLabelData.bMove}" height="16"/>

 

 

I use mx:Box containers. I have one box container for every InDesign element type that I listed above. The other components inside the box containers differ from type to type.

Main menu:

<mx:Box visible="{controller.ObjType == 0}" x="2" y="0" width="200" height="344" includeInLayout="{controller.ObjType == 0}" horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="1">

TextFrame:

<mx:Box visible="{controller.ObjType == 1}" x="2" y="0" width="200" height="344" includeInLayout="{controller.ObjType == 1}" horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="0" >

etc.

 

The earlier versions of this extension were targeting older versions of InDesign and worked flawlessly (CS5, CS5.5, CS6).

 

Thanks for every help!

Greetings,


Viewing all articles
Browse latest Browse all 87055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>