mirrors: makes string an inspectable sequence, fixes #1238

locals-and-roots
Björn Lindqvist 2016-03-25 21:10:26 +01:00
parent 774c6ae19e
commit b21457411e
2 changed files with 3 additions and 8 deletions

View File

@ -1,9 +1,8 @@
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs byte-arrays classes classes.tuple
classes.tuple.private combinators fry hash-sets hashtables
kernel math quotations sequences sets slots slots.private
vectors ;
classes.tuple.private combinators fry hash-sets hashtables kernel math
quotations sequences sets slots slots.private strings vectors ;
IN: mirrors
TUPLE: mirror { object read-only } ;
@ -61,6 +60,7 @@ INSTANCE: array inspected-sequence
INSTANCE: vector inspected-sequence
INSTANCE: callable inspected-sequence
INSTANCE: byte-array inspected-sequence
INSTANCE: string inspected-sequence
GENERIC: make-mirror ( obj -- assoc )
M: hashtable make-mirror ;

View File

@ -442,8 +442,3 @@ pane H{
GENERIC: content-gadget ( object -- gadget/f )
M: object content-gadget drop f ;
M: string content-gadget
'[ _ write ] make-pane <scroller>
{ 450 100 } >>pref-dim
<wrapper> ;