Changeset 167 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/TimeSlice.java
- Timestamp:
- 12/16/2019 03:55:46 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/scriptbuilder/structures/TimeSlice.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/TimeSlice.java
r162 r167 320 320 } 321 321 } 322 //these two following functions should not be necessary. 322 323 /** 323 324 * this method removes an audioevent that corresponds to the input I_AudioEvent. NEEDS VERIFICATION 324 325 */ 325 326 public void removeCorrespondingAudioEvent(I_AudioEvent comparisonEvent){ 326 String id = comparisonEvent.get FileName().split("/")[1];327 String id = comparisonEvent.getID(); 327 328 for(I_ScriptEvent event : events) 328 329 { 329 330 if(event instanceof AudioEvent) 330 331 { 331 System.out.println("removed an audioevent \n" + ((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4)); 332 System.out.println(id); 333 System.out.println(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4))); 334 335 if(id.equals(((AudioEvent)event).audioPath.split("/")[2].substring(0,((AudioEvent)event).audioPath.split("/")[2].length() - 4))) 332 if(id.equals(((AudioEvent) event).id)) 336 333 { 337 334 System.out.println("the event was deleted"); … … 342 339 } 343 340 } 344 public AudioEvent getCorrespondingAudioEvent(I_AudioEvent compari osonEvent)345 { 346 String id = compari osonEvent.getFileName();341 public AudioEvent getCorrespondingAudioEvent(I_AudioEvent comparisonEvent) 342 { 343 String id = comparisonEvent.getID(); 347 344 AudioEvent retVal = null; 348 345 for(I_ScriptEvent event: events) 349 346 { 350 if(event instanceof AudioEvent && ((AudioEvent)event).audioPath.split("/")[2].equals(id))347 if(event instanceof AudioEvent && id.equals(((AudioEvent) event).id)) 351 348 { 352 349 retVal = (AudioEvent) event;
Note: See TracChangeset
for help on using the changeset viewer.
