MOI3 Errors when selecting Shortcuts
All  1-3  4-6

Previous
Next
 From:  redraw (MAYSKY)
9891.4 In reply to 9891.2 
Just had a look at the OPTIONS and it appears that the script indeed has the prefix of "script:"...
Below is the script I copied form within the OPTIONS - Shortcut keys tab. it reads as follows


script: /*! Highlight naked edges */ var gd = moi.geometryDatabase; gd.deselectAll(); var breps = gd.getObjects().getBreps(); for ( var i = 0; i < breps.length; ++i ) breps.item(i).getNakedEdges().setProperty( 'selected', true );


But still throws the said error.

Have tried deleting and re applying the Shortcut, but no luck either.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9891.5 In reply to 9891.4 
Hi Maysky, looks like it's a bug in the CustomUI Shortcuts menu code.

The bug is that it emits a button that has an attribute like command='script_code_here' which will cause an error if the script code also happens to have any single-quote ' ' characters in it which happens to be the case for the highlight naked edges script. When the HTML parser sees the ' character in the script code, it takes it to be the end of the command=' ' attribute.

To solve it, replace your file Shortcuts.menu.htm with the version I have attached here. This version replaces any single-quote ' characters in the script with a special HTML entity code which will tell the HTML parser to put a ' character into the attribute value rather than ending the command=' ' attribute there.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  redraw (MAYSKY)
9891.6 In reply to 9891.5 
Sweet!
Thank you Vmuch :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-6