er, ah, i hate to ask another newbie questions, but after i file in it, i can't get it work. is there some initialization i need to do? what class of object does #allCommentsOn look for?
sorry, but i'mma learnin'. jason
Jason, the argument for #allCommentsOn: must be an HtmlFileStream. You can create one of those just sending a FileStream the message asHtml. For instace, try the folloing in a workspace:
file _ (FileStream newFileNamed: 'comments.html') asHtml. Number allCommentsOn: file. file close
This should write all the comments of the Number hierarchy on the file comments.html (in the Squeak working directory).
Luciano.-
Luciano Notarfrancesco wrote:
er, ah, i hate to ask another newbie questions, but after i file in it, i can't get it work. is there some initialization i need to do? what class of object does #allCommentsOn look for?
sorry, but i'mma learnin'.
My mistake - I didn't attach the final version which had an example and cleaned up output . Were you more interested in getting the class comments output or understanding "how" to output them? Have you looked at Stephen's utility? It works with categories but will take more work to understand than my barebones example.
Regards, -Laurence
jason
Jason, the argument for #allCommentsOn: must be an HtmlFileStream. You can create one of those just sending a FileStream the message asHtml. For instace, try the folloing in a workspace:
file _ (FileStream newFileNamed: 'comments.html') asHtml. Number allCommentsOn: file. file close
This should write all the comments of the Number hierarchy on the file comments.html (in the Squeak working directory).
Luciano.-
Thanks Luciano
'From Squeak 2.4a of April 21, 1999 on 30 July 1999 at 10:45:55 am'!
!ClassDescription methodsFor: 'Comments' stamp: 'LPR 7/30/1999 10:43'! allSubclassCommentsOn: anHtmlFileStream self subclasses do: [:each | anHtmlFileStream command: 'h3'; nextPutAll: each name; command: '/h3'; cr; nextPutAll: each comment; command: 'blockquote'. each allSubclassCommentsOn: anHtmlFileStream. anHtmlFileStream command: '/blockquote']! !
!ClassDescription methodsFor: 'Comments' stamp: 'LPR 7/30/1999 10:42'! commentsOn: anHtmlFileStream "Object commentsOn: (StandardFileStream fileNamed: 'AllComments.html') asHtml." anHtmlFileStream command: 'h3'; nextPutAll: self name; command: '/h3'; cr; nextPutAll: self comment; command: 'blockquote'. self allSubclassCommentsOn: anHtmlFileStream. anHtmlFileStream command: '/blockquote'
! !
Hello everybody,
some curiosities: what's the difference between the Morphic projects, the mpv projects and the contruction projects?
What are mpv projects for?
And construct projects?
Also, I discovered what Celeste is. I wrote a pair of test messages but I can't find the command to send them. Where is it?
One more thing: what's Alice?
Sorry for silly questions, I'm trying to get oriented.
Thanks for your kindness. Adriano
squeak-dev@lists.squeakfoundation.org