From: George H. <geo...@us...> - 2006-06-09 12:10:38
|
Update of /cvsroot/win32forth/win32forth/apps/SciEdit In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13704/win32forth/apps/SciEdit Modified Files: ClassBrowser.f Log Message: gah: Modified to show :OBJECT OBJ_NAME instead of [UNKNOWN] for objets. Index: ClassBrowser.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/SciEdit/ClassBrowser.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClassBrowser.f 14 May 2006 09:05:17 -0000 1.4 --- ClassBrowser.f 9 Jun 2006 12:10:32 -0000 1.5 *************** *** 52,62 **** create NameBuf$ MAXSTRING 1+ allot : AddName ( xt hPrev hRoot fChildren -- ) \ show name, if can't find name, [UNKNOWN] >r rot DUP >NAME DUP NAME> ['] [UNKNOWN] = \ if not found ! IF DROP z" [UNKNOWN]" ELSE COUNT NameBuf$ ascii-z \ make a z-String THEN 2swap 1 r> AddItem ; - \ ------------------------------------------------------------------------------ \ ------------------------------------------------------------------------------ --- 52,87 ---- create NameBuf$ MAXSTRING 1+ allot + \ The following definitions enable us to find the name of an object defined with :OBJECT + \ from the xt of it's nameless class; gah + + 0 value SearchClass + + : (objname) ( nfa -- ) + dup name> dup @ doobj = + if >body @ SearchClass = + if s" :OBJECT " NameBuf$ place + nfa-count NameBuf$ +place NameBuf$ +null + 0 to SearchClass + else drop + then + else 2drop + then ; + + + : objname ( xt -- ) + >body to SearchClass NameBuf$ off + \in-system-ok ['] (objname) on-allwords ; + : AddName ( xt hPrev hRoot fChildren -- ) \ show name, if can't find name, [UNKNOWN] >r rot DUP >NAME DUP NAME> ['] [UNKNOWN] = \ if not found ! IF DROP dup ?IsClass ! IF dup objname Namebuf$ count 0= ! IF drop z" [UNKNOWN]" ! THEN ! ELSE z" [UNKNOWN]" ! THEN ELSE COUNT NameBuf$ ascii-z \ make a z-String THEN 2swap 1 r> AddItem ; \ ------------------------------------------------------------------------------ \ ------------------------------------------------------------------------------ |