Adding checks for get-port-name in object interface before method call.

svn: r10804
This commit is contained in:
Danny Yoo 2008-07-17 00:52:53 +00:00
parent 4535aa4537
commit 93c1b92c7b
2 changed files with 8 additions and 3 deletions

View File

@ -46,8 +46,11 @@
(let* ([text (drscheme:language:text/pos-text input)]
[start (drscheme:language:text/pos-start input)]
[end (drscheme:language:text/pos-end input)]
[text-port (open-input-text-editor text start end values
(send text get-port-name))])
[name (if (method-in-interface? 'get-port-name
(object-interface text))
(send text get-port-name)
(send text get-filename))]
[text-port (open-input-text-editor text start end values name)])
(port-count-lines! text-port)
(let* ([line (send text position-paragraph start)]
[column (- start (send text paragraph-start-position line))]

View File

@ -2256,7 +2256,9 @@ module browser threading seems wrong.
(let ([start 0])
(send definitions-text split-snip start)
(let* ([name (send definitions-text get-port-name)]
(let* ([name (if (method-in-interface? 'get-port-name (object-interface definitions-text))
(send definitions-text get-port-name)
(send definitions-text get-filename))]
[text-port (open-input-text-editor definitions-text start 'end values name #t)])
(port-count-lines! text-port)
(let* ([line (send definitions-text position-paragraph start)]