Changeset 107 for trunk/src/org/expeditee/actions/Simple.java
- Timestamp:
- 06/20/08 16:48:33 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/actions/Simple.java
r106 r107 1133 1133 context.getPrimitives().setValue(tokens[2], 1134 1134 new SString(currentFrame.getName())); 1135 } 1136 } else if (tokens[0].equals("getcurrentitem")) { 1137 assertMinParametreCount(tokens, 1); 1138 assertVariableType(tokens[1], 1, SPointer.itemPrefix); 1139 1140 Item currentItem = FrameUtils.getCurrentItem(); 1141 1142 context.getPointers().setObject(tokens[1], currentItem); 1143 1144 // check if the user is also after line position 1145 if (currentItem != null && currentItem instanceof Text 1146 && tokens.length > 2) { 1147 Text text = (Text) currentItem; 1148 int cursorLinePos = text 1149 .getLinePosition(FrameMouseActions.getY()); 1150 context.getPrimitives().setValue(tokens[2], 1151 new SInteger(cursorLinePos + 1)); 1152 if (tokens.length > 3) { 1153 int cursorCharPos = text.getCharPosition( 1154 cursorLinePos, DisplayIO.getMouseX()) 1155 .getCharIndex(); 1156 context.getPrimitives().setValue(tokens[3], 1157 new SInteger(cursorCharPos + 1)); 1158 } 1135 1159 } 1136 1160 } … … 1724 1748 boolean success = fileContents != null; 1725 1749 if (!success) 1726 FrameGraphics.WarningMessage("Error copying " + frameToCopy.getName()); 1750 FrameGraphics.WarningMessage("Error copying " 1751 + frameToCopy.getName()); 1727 1752 FrameIO.ResumeCache(); 1728 1753 if (tokens.length > 4) {
Note:
See TracChangeset
for help on using the changeset viewer.