Changeset 70 for trunk/src/org/expeditee/actions/NavigationActions.java
- Timestamp:
- 05/21/08 09:40:52 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/NavigationActions.java
r67 r70 160 160 161 161 public static void NextChild(Frame source) { 162 String back = DisplayIO.peekFromBack(); // ByRob: "peekFromBack" is not 163 // an informative term, better to refer to back up stack 162 String back = DisplayIO.peekFromBackUpStack(); 164 163 // if there is no parent frame (i.e. the user is on the home frame) // 165 // ByRob: this should say "for example, the user ...."166 164 if (back == null) { // No frame was on the Backup stack 167 165 FrameGraphics.DisplayMessage("No Parent Frame Found."); 168 166 _LastItemUsed = null; // ByRob: what is reason for setting 169 // this to null, who is going to use 170 // it???? 167 // this to null, who is going to use it???? 171 168 _Parent = null; // ByRob: what is reason for setting this to 172 169 // null, who is going to use it … … 174 171 } 175 172 176 /* 177 * if(_Parent == null || !back.equals(_Parent.getFrameName())){ _Parent = 178 * FrameIO.LoadFrame(back); _LastItemUsed = null; } 179 */ 180 173 //Ensure the parent variable has been initialised 181 174 if (_Parent == null || !back.equals(_Parent)) { // ByRob: what the heck 182 175 // is the code doing? … … 187 180 } 188 181 189 Frame parent = FrameIO.LoadFrame(_Parent); // at this point we have 190 // a parent frame (but 191 // does LoadFrame access 192 // backup stack? 193 194 // find the next item to visit // ByRob: We should NOT be trying to 195 // remember state!!! at time of Next, getNameOfCurrentFrame!!!! 196 // Actually, no. It could be situation that there is more than one item 197 // on frame linked to CurrentFr 198 182 Frame parent = FrameIO.LoadFrame(_Parent); 183 184 // find the next item to visit 199 185 List<Item> items = parent.getItems(); // getItems method gets us the 200 186 // FirstItem on the frame … … 210 196 211 197 // ByMike: If the 'Next' child is being sought for the 1st time... 212 213 198 String sourceName = source.getFrameName().toLowerCase(); 214 199 … … 226 211 if (items.get(i).isLinkValid() 227 212 && !items.get(i).isAnnotation() 228 && !items.get(i).getAbsoluteLink(). toLowerCase().equals(229 source.getFrameName() .toLowerCase())) {213 && !items.get(i).getAbsoluteLink().equalsIgnoreCase( 214 source.getFrameName())) { 230 215 _LastItemUsed = items.get(i); 231 FrameUtils.DisplayFrame(_LastItemUsed.get Link(), false);216 FrameUtils.DisplayFrame(_LastItemUsed.getAbsoluteLink(), false); 232 217 return; 233 218 } // ByRob: end of if
Note:
See TracChangeset
for help on using the changeset viewer.