Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic AnchorPattern can not create more than once (Read 1748 times)
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
AnchorPattern can not create more than once
Mar 7th, 2012 at 11:56am
Print Post  
ClientSideMode:JavaApplet,
One is:In onLoad fuction,I want to define a AnchorPattern.
e.g.
Code (Javascript)
Select All
 pattern_Bus=scripthelper.createAnchorPattern("Bus"); 


When I first load the page,there is no problem.But when I refresh the page,there is a problem.
Warning:Java: java.lang.IllegalArgumentException: The AnchorPattern string identifier must be unique.
I want your helpe!Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: AnchorPattern can not create more than once
Reply #1 - Mar 8th, 2012 at 7:06am
Print Post  
Try this:

Code
Select All
pattern_Bus=scripthelper.anchorPatternFromId("Bus");
if (!pattern_Bus)
{
    pattern_Bus=scripthelper.createAnchorPattern("Bus");
    // add points
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
Re: AnchorPattern can not create more than once
Reply #2 - Mar 8th, 2012 at 7:16am
Print Post  
I solved it.When I define it,I do not specify it's identity.It's amazing!
Thank Stoyan very much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint