Various fixes for Android
[sdk] / ide / src / project / Workspace.ec
index 856b35b..bf868e4 100644 (file)
@@ -368,7 +368,7 @@ public:
       GetLastDirectory(relative, name);
       for(p : projects)
       {
-         if(node = p.topNode.Find(name, false))
+         if((node = p.topNode.Find(name, false)))
          {
             prj = p;
             break;
@@ -479,9 +479,6 @@ public:
 
    void UpdateSourceDirsArray(Array<String> dirs)
    {
-      byte * tokens[256];
-      int c, numTokens;
-
       sourceDirs.Free();
 
       for(s : dirs)
@@ -530,6 +527,7 @@ public:
          ide.projectView.Update(null);
          Save();
       }
+      ide.AdjustDebugMenus();
    }
 
    bool FindPath(ProjectNode node, const char * path)
@@ -558,7 +556,7 @@ public:
 
    void ChangeBreakpoint(DataRow row, const char * location)
    {
-      Breakpoint bp = (Breakpoint)row.tag;
+      Breakpoint bp = (Breakpoint)(intptr)row.tag;
       if(bp)
       {
          char * currentLoc = bp.CopyUserLocationString();
@@ -593,7 +591,7 @@ public:
 
    void ChangeBreakpointIgnore(DataRow row, int ignore)
    {
-      Breakpoint bp = (Breakpoint)row.tag;
+      Breakpoint bp = (Breakpoint)(intptr)row.tag;
       if(bp)
       {
          bp.ignore = ignore;
@@ -603,7 +601,7 @@ public:
 
    void ChangeBreakpointLevel(DataRow row, int level)
    {
-      Breakpoint bp = (Breakpoint)row.tag;
+      Breakpoint bp = (Breakpoint)(intptr)row.tag;
       if(bp)
       {
          bp.level = level;
@@ -613,7 +611,7 @@ public:
 
    void ChangeBreakpointCondition(DataRow row, const char * condition)
    {
-      Breakpoint bp = (Breakpoint)row.tag;
+      Breakpoint bp = (Breakpoint)(intptr)row.tag;
       if(bp && !(!bp.condition && !(condition && condition[0])))
       {
          if(!bp.condition)
@@ -687,7 +685,7 @@ public:
       Link bpLink, next;
       for(bpLink = breakpoints.first; bpLink; bpLink = next)
       {
-         Breakpoint bp = (Breakpoint)bpLink.data;
+         Breakpoint bp = (Breakpoint)(intptr)bpLink.data;
          next = bpLink.next;
 
          if(bp.type == user)
@@ -813,10 +811,9 @@ Workspace LoadWorkspace(const char * filePath, const char * fromProjectFile)
       {
          char buffer[65536];
          char * equal;
-         int len;
 
          Watch wh;
-         Breakpoint bp;
+         Breakpoint bp = null;
 
          file.GetLine(buffer, 65536 - 1);
          TrimLSpaces(buffer, buffer);
@@ -1278,8 +1275,7 @@ Workspace LoadWorkspace(const char * filePath, const char * fromProjectFile)
    else if(fromProjectFile)
    {
       //MessageBox { type = Ok, master = ide, contents = "Worspace load file failed", text = "Worspace Load File Error" }.Modal();
-
-      char projectFile[MAX_LOCATION];
+      //char projectFile[MAX_LOCATION];
       Project newProject;
 
       //strcpy(projectFile, filePath);