Hello  Ramu Kannan,

>I am in the process of migrating from NetD 4.1.3 to 5.0.2. In my 4.1.3
>code, I use a method call : spider.CSpider.getProjectDirectory(). This
>returns the directory where all the projects are stored For e.g.,
>../NetDynamics/NetDynamics40/Projects
>In NetD 5.x, the same method returns all the stuff above and also the
>name of the current directory from where it is called. For example, if
>it is called from the Menuing project, it returns
>../NetDynamics/NetDynamics40/Projects/Menuing
>In other words, the same method behaves differently in NetD 5 as
>compared to NetD 4.

I've already encountered the same problem as you before and my solution is that create 
a new method to deal with this problem. The method is detailed as follows:

public static String getNDHome () {
   String projectDirectory = CSpider.getProjectDirectory ();
   int projectIndex = projectDirectory.toLowerCase ().indexOf ("projects");
        
   if (projectIndex < 0) {
      return projectDirectory;
  }
        
  return  projectDirectory.substring (0, projectIndex) +"Projects";
}

this is working ok now.

>Is there a method in NetD 5 that will return the name of the base
>project directory? Would getProjectDirectoryPath() work? This seems like
>a new method in NetD 5.

No, There is no method in ND5 returning the name of the base project directory (
CSpider.getProjectDirectory () and CSpider.getEnvVar (CSpVars.NETDYN_HOME) are working 
wrongly and I hope Sun will fix this problem soon.). CSpider.getProjectDirectoryPath 
() is working properly but it returns <d:>/NetDynamics/NetDynamics40/Projects; 
<d:>/NetDynamics/NetDynamics40/BBProjeccts 

Good luck,
Nam

---
TechPie Asia, A Sun Microsystems Business Partner 
iPlanet Implementation 

Mail to: [EMAIL PROTECTED]
Home Page: http://www.techpie.com>


MailCity. Secure Email Anywhere, Anytime!
http://www.mailcity.lycos.com

_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to