1747 |
1747 |
1748 "Modified (format): / 07-03-2012 / 13:11:17 / cg" |
1748 "Modified (format): / 07-03-2012 / 13:11:17 / cg" |
1749 ! |
1749 ! |
1750 |
1750 |
1751 displayArgsOn:aStream |
1751 displayArgsOn:aStream |
|
1752 self displayArgsOn:aStream withCRs:false indent:0 |
|
1753 |
|
1754 "Modified: / 15-03-2017 / 14:13:38 / cg" |
|
1755 ! |
|
1756 |
|
1757 displayArgsOn:aStream withCRs:withCRs indent:i |
1752 | n "{ Class: SmallInteger }" |
1758 | n "{ Class: SmallInteger }" |
1753 s | |
1759 s | |
1754 |
1760 |
1755 n := self argumentCount. |
1761 n := self argumentCount. |
1756 1 to:n do:[:index | |
1762 1 to:n do:[:index | |
1759 ] do:[ |
1765 ] do:[ |
1760 s := self argStringFor:(self at:index). |
1766 s := self argStringFor:(self at:index). |
1761 s := s contractTo:100. |
1767 s := s contractTo:100. |
1762 ]. |
1768 ]. |
1763 |
1769 |
|
1770 aStream spaces:i. |
1764 aStream nextPutAll:s asString string. |
1771 aStream nextPutAll:s asString string. |
1765 index ~~ n ifTrue:[ aStream space ]. |
1772 withCRs ifTrue:[ |
1766 ]. |
1773 aStream cr. |
1767 |
1774 ] ifFalse:[ |
1768 "Modified: / 07-03-2012 / 13:09:17 / cg" |
1775 index ~~ n ifTrue:[ aStream space ]. |
|
1776 ]. |
|
1777 ]. |
|
1778 |
|
1779 "Created: / 15-03-2017 / 14:13:33 / cg" |
|
1780 ! |
|
1781 |
|
1782 displayLocalsOn:aStream withCRs:withCRs indent:i |
|
1783 | n "{ Class: SmallInteger }" |
|
1784 s | |
|
1785 |
|
1786 n := self argumentCount. |
|
1787 n+1 to:self size do:[:index | |
|
1788 Error handle:[:ex | |
|
1789 s := '*Error in localString*'. |
|
1790 ] do:[ |
|
1791 s := self argStringFor:(self at:index). |
|
1792 s := s contractTo:100. |
|
1793 ]. |
|
1794 aStream spaces:i. |
|
1795 aStream nextPutAll:s asString string. |
|
1796 withCRs ifTrue:[ |
|
1797 aStream cr |
|
1798 ] ifFalse:[ |
|
1799 index ~~ n ifTrue:[ aStream space ]. |
|
1800 ]. |
|
1801 ]. |
|
1802 |
|
1803 "Created: / 15-03-2017 / 14:13:23 / cg" |
1769 ! |
1804 ! |
1770 |
1805 |
1771 displayOn:aGCOrStream |
1806 displayOn:aGCOrStream |
1772 "return a string to display the receiver - for display in Inspector" |
1807 "return a string to display the receiver - for display in Inspector" |
1773 |
1808 |
1787 ! |
1822 ! |
1788 |
1823 |
1789 fullPrintAllOn:aStream |
1824 fullPrintAllOn:aStream |
1790 "print a full walkback (incl arguments) starting at the receiver" |
1825 "print a full walkback (incl arguments) starting at the receiver" |
1791 |
1826 |
1792 self withAllSendersDo:[:con | con fullPrintOn:aStream. aStream cr]. |
1827 self fullPrintAllOn:aStream withVariables:false |
1793 |
1828 |
1794 " |
1829 " |
1795 thisContext fullPrintAllOn:Transcript |
1830 thisContext fullPrintAllOn:Transcript |
1796 " |
1831 " |
1797 |
1832 |
1798 "Created: 15.1.1997 / 18:09:05 / cg" |
1833 "Created: / 15-01-1997 / 18:09:05 / cg" |
|
1834 "Modified: / 15-03-2017 / 14:16:12 / cg" |
1799 ! |
1835 ! |
1800 |
1836 |
1801 fullPrintAllOn:aStream throughContextForWhich:aBlock |
1837 fullPrintAllOn:aStream throughContextForWhich:aBlock |
1802 "print a full walkback (incl arguments) starting at the receiver" |
1838 "print a full walkback (incl arguments) starting at the receiver" |
1803 |
1839 |
1837 |
1885 |
1838 "Created: / 21-08-2011 / 07:37:36 / cg" |
1886 "Created: / 21-08-2011 / 07:37:36 / cg" |
1839 ! |
1887 ! |
1840 |
1888 |
1841 fullPrintOn:aStream |
1889 fullPrintOn:aStream |
|
1890 "append a verbose description (incl. arguments) of the receiver onto aStream" |
|
1891 |
|
1892 self fullPrintOn:aStream withVariables:false |
|
1893 |
|
1894 " |
|
1895 thisContext fullPrintOn:Transcript |
|
1896 thisContext sender fullPrintOn:Transcript |
|
1897 " |
|
1898 |
|
1899 "Created: / 15-01-1997 / 18:09:06 / cg" |
|
1900 "Modified (comment): / 15-03-2017 / 14:08:51 / cg" |
|
1901 ! |
|
1902 |
|
1903 fullPrintOn:aStream withVariables:withVariables |
1842 "append a verbose description (incl. arguments) of the receiver onto aStream" |
1904 "append a verbose description (incl. arguments) of the receiver onto aStream" |
1843 |
1905 |
1844 self printReceiverOn:aStream. |
1906 self printReceiverOn:aStream. |
1845 aStream nextPutAll:' >> '. |
1907 aStream nextPutAll:' >> '. |
1846 self selector printOn:aStream. "show as string (as symbol looks too ugly in browser ...)" |
1908 self selector printOn:aStream. "show as string (as symbol looks too ugly in browser ...)" |
1847 "/ self selector storeOn:aStream. "show as symbol" |
1909 "/ self selector storeOn:aStream. "show as symbol" |
1848 |
1910 |
1849 self size ~~ 0 ifTrue: [ |
1911 withVariables ifFalse:[ |
1850 aStream space. |
1912 self size ~~ 0 ifTrue: [ |
1851 self displayArgsOn:aStream |
1913 aStream space. |
|
1914 self displayArgsOn:aStream |
|
1915 ]. |
1852 ]. |
1916 ]. |
1853 aStream nextPutAll:' {'. |
1917 aStream nextPutAll:' {'. |
1854 self identityHash printOn:aStream. |
1918 self identityHash printOn:aStream. |
1855 aStream nextPut:$}. |
1919 aStream nextPut:$}. |
1856 |
1920 |
1857 aStream nextPutAll:' ['. |
1921 aStream nextPutAll:' ['. |
1858 self lineNumber printOn:aStream. |
1922 self lineNumber printOn:aStream. |
1859 aStream nextPut:$]. |
1923 aStream nextPut:$]. |
1860 |
1924 |
1861 " |
1925 withVariables ifTrue:[ |
1862 thisContext fullPrintOn:Transcript |
1926 self size ~~ 0 ifTrue: [ |
1863 " |
1927 self argumentCount ~~ 0 ifTrue:[ |
1864 |
1928 aStream cr; nextPutAll:' Args:'; cr. |
1865 "Modified: 20.5.1996 / 10:27:14 / cg" |
1929 self displayArgsOn:aStream withCRs:true indent:4. |
1866 "Created: 15.1.1997 / 18:09:06 / cg" |
1930 ]. |
|
1931 self size > self argumentCount ifTrue:[ |
|
1932 aStream cr; nextPutAll:' Locals:'; cr. |
|
1933 self displayLocalsOn:aStream withCRs:true indent:4. |
|
1934 ]. |
|
1935 ]. |
|
1936 ]. |
|
1937 |
|
1938 " |
|
1939 thisContext fullPrintOn:Transcript withVariables:true |
|
1940 " |
|
1941 |
|
1942 "Created: / 15-03-2017 / 13:24:16 / cg" |
1867 ! |
1943 ! |
1868 |
1944 |
1869 fullPrintString |
1945 fullPrintString |
1870 "return a string describing the context - this includes the linenumber, |
1946 "return a string describing the context - this includes the linenumber, |
1871 receiver printString and argument printString" |
1947 receiver printString and argument printString" |