Re: [XXE] contextualMenuItems command crossing over between configurations

2015-04-24 Thread Hussein Shafie

On 04/24/2015 03:31 AM, Jeff Hooker wrote:


I have 3 custom right-click menus defined, each in its own
configuration, each defined with the
 command.

When I create a new document from each of the different configurations,
the right-click menu for all three documents will be the right-click
menu for whichever document I created last.



That's normal because commands are global to all configurations. Hence 
the last loaded command "{contextualMenuItems}extraMenuItems" overrides 
the previously loaded one.


Note that you the local part "extraMenuItems" is not significant. You 
can call it whatever you want. This means that you can have 
"extraMenuItems1", "extraMenuItems2", "extraMenuItems3" to prevent one 
command to override the other.






I have tried making the menus more specific, using the

  variant of the command, but it makes no difference to the outcome;
whichever configuration was last used to create a new document (or open
an existing document) the right-click menu will be the menu that appears
across all the open documents.

I’m running version 6.0.0 with the included JVM on a Windows 8.1 machine.

Thoughts?


Well, we use this mechanism in the stock configurations and we don't 
experience this behaviour.


Note the use of the "$c" variable. More info at the very end of this email.

XXE_install_dir/addon/config/dita/topic.xxe
---
  

  


  

  

  

  
  

  
---


XXE_install_dir/addon/config/docbook5/docbook5_support_base.incl
---
  

  

  pattern="db:imagedata[@fileref]" />

  


  pattern="db:imagedata[./svg:svg]" />

  

  

  

  

  
  

  

  

  
  

  

  

  





  

  
---

Note that above, "$c" is an alias for the name of the configuration 
where the command has been defined.


If the command "{$c}foo" is defined in common.incl and if common.incl is 
included in config1.xxe, config2.xxe and config3.xxe, then this will 
create 3 different commands "{config1}foo", "{config2}foo" and 
"{config3}foo".





--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support


Re: [XXE] contextualMenuItems command crossing over between configurations

2015-04-24 Thread Jeff Hooker
Hello Hussein,

Making the "local" part of the command unique for each configuration had no 
effect by itself, but changing the menus so that they were called into the 
contextualMenuIitems command as below fixed the problem.




  
  
   

 
  
  

   
   



Thanks,
Jeff.

-Original Message-
From: xmleditor-support-boun...@xmlmind.com 
[mailto:xmleditor-support-boun...@xmlmind.com] On Behalf Of Hussein Shafie
Sent: Friday, April 24, 2015 12:02 AM
To: Jeff Hooker
Cc: 'xmleditor-support@xmlmind.com'
Subject: Re: [XXE] contextualMenuItems command crossing over between 
configurations

On 04/24/2015 03:31 AM, Jeff Hooker wrote:
>
> I have 3 custom right-click menus defined, each in its own 
> configuration, each defined with the 
>  command.
>
> When I create a new document from each of the different 
> configurations, the right-click menu for all three documents will be 
> the right-click menu for whichever document I created last.
>

That's normal because commands are global to all configurations. Hence the last 
loaded command "{contextualMenuItems}extraMenuItems" overrides the previously 
loaded one.

Note that you the local part "extraMenuItems" is not significant. You can call 
it whatever you want. This means that you can have "extraMenuItems1", 
"extraMenuItems2", "extraMenuItems3" to prevent one command to override the 
other.




> I have tried making the menus more specific, using the 
> 
>   variant of the command, but it makes no difference to the outcome; 
> whichever configuration was last used to create a new document (or 
> open an existing document) the right-click menu will be the menu that 
> appears across all the open documents.
>
> I'm running version 6.0.0 with the included JVM on a Windows 8.1 machine.
>
> Thoughts?

Well, we use this mechanism in the stock configurations and we don't experience 
this behaviour.

Note the use of the "$c" variable. More info at the very end of this email.

XXE_install_dir/addon/config/dita/topic.xxe
---
   
 
   
 
 
   
 
   

   
 
   
   
 
   
---


XXE_install_dir/addon/config/docbook5/docbook5_support_base.incl
---
   
 
   
 
   
   
 
 
   
   
 
   
 
   

   
 
   
   
 
   

   
 
   
   
 
   

   
 
   
 

 

 
   
 
   
---

Note that above, "$c" is an alias for the name of the configuration where the 
command has been defined.

If the command "{$c}foo" is defined in common.incl and if common.incl is 
included in config1.xxe, config2.xxe and config3.xxe, then this will create 3 
different commands "{config1}foo", "{config2}foo" and "{config3}foo".




--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support