marcardar / transcriptstudio-isha

Automatically exported from code.google.com/p/transcriptstudio4isha
0 stars 0 forks source link

Exception when marking up inlines surrounding other inlines #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Create this segment:

1 2 34

So, 6 characters long in total.

Create an inline for "1", and another inline for "2 34".

Next select "1 2". The selection should expand to the whole inline.

Now Markup Text and you get an exception:

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
    at
org.ishafoundation.archives.transcript.model::TranscriptTextSelection/markup()[C
:\flex\TranscriptStudio\src\org\ishafoundation\archives\transcript\model\Transcr
iptTextSelection.as:204]

Interestingly, if you select "1 2 3" or "1 2 34", then no such exception
occurs. Instead, the whole segment is marked up as an outline - which is
correct behaviour.

Swami - this could explain why you have not experienced the same exceptions
as me in the past - maybe, when you select text to be marked up as inlines,
you actually select the whole text rather than rely on the auto-expansion????

Original issue reported on code.google.com by mjc1...@gmail.com on 17 Apr 2009 at 11:51

GoogleCodeExporter commented 9 years ago
Even simpler way to reproduce:

Create this segment:

1 3 5

Create inline for "1" and another for "3 5".

Then select from 1 to 3 - this auto-expands to whole segment.

Now markup and you get the same exception.

Original comment by mjc1...@gmail.com on 18 Apr 2009 at 4:01

GoogleCodeExporter commented 9 years ago
Fixed in r436.

Turned out to be a very easy fix.

There was a situation where a segment subset that spanned the entire segment, 
was not
being converted into a segment.

If we refactor, we should code this to be more transparent.

Original comment by mjc1...@gmail.com on 18 Apr 2009 at 7:09