'From SqueakLight of 16 August 2006 [latest update: #421] on 6 November 2006 at
9:26:37 am'! !HTMLScrollableField commentStamp: '<historical>' prior: 0!
HTMLScrollableField default! ]style[(27)c000000126b! !HTMLScrollableField
methodsFor: 'as yet unclassified' stamp: 'edc 11/6/2006 09:06'! jumpToUrl: url
| stream aText root last thisPage | visitedUrls ifEmpty: [thisPage := url]
ifNotEmpty:[ last := (visitedUrls at: 1) lastIndexOf: $/. root := (visitedUrls
at: 1) copyFrom: 1 to: last. last := (url lastIndexOf: $/) + 1. thisPage :=
(url copyFrom: last to: url size). thisPage := root ,thisPage]. stream :=
(HTTPSocket httpGet: thisPage accept: 'application/octet-stream') contents.
aText := (HtmlParser parse: stream) formattedText. self setMyText: aText.
self visitedUrls add: thisPage. ! ! !HTMLScrollableField class methodsFor:
'as yet unclassified' stamp: 'edc 11/6/2006 08:59'! default | newInstance r |
newInstance := self newStandAlone. newInstance color: (Color r: 0.972
g: 0.972 b: 0.662). r := Rectangle left: World left + 50 right:
World right - 50 top: World top + 100 bottom: World bottom - 50.
newInstance bounds: r. newInstance visitedUrls: OrderedCollection new. ^
newInstance openInWorld! ! !HTMLScrollableField class methodsFor: 'as yet
unclassified' stamp: 'edc 9/23/2006 15:47'! help "HTMLScrollableField help" |
stream aText sf | stream := (HTTPSocket httpGet:
'
http://minnow.cc.gatech.edu/squeak/5871' accept: 'application/octet-stream')
contents. aText := (HtmlParser parse: stream) formattedText. sf :=
HTMLScrollableField default. sf setMyText: aText. sf visitedUrls add:
'
http://www.worldwideschool.org/library/books/lit/sciencefiction/TheMysteriousIs\
land/'. ^sf openInWorld! ! !HTMLScrollableField class methodsFor: 'as yet
unclassified' stamp: 'edc 11/6/2006 09:25'! initialize (TheWorldMenu respondsTo:
#registerOpenCommand:) ifTrue: [ TheWorldMenu registerOpenCommand:
{'OneSheetBrowser'. {self. #default}}].! ! !HTMLScrollableField class
methodsFor: 'as yet unclassified' stamp: 'edc 9/28/2006 12:13'! url: url |
stream aText sf | stream := (HTTPSocket httpGet: url accept:
'application/octet-stream') contents. aText := (HtmlParser parse: stream)
formattedText. sf := HTMLScrollableField default. sf setMyText: aText. sf
visitedUrls add: url. ^sf openInWorld! ! !String methodsFor: 'converting'
stamp: 'edc 9/30/2006 09:32'! lastIndexOf: aCharacter |reverse | reverse := self
reverse. ^reverse size - (reverse indexOf: aCharacter) ! ! !TextURL
methodsFor: 'as yet unclassified' stamp: 'edc 9/28/2006 12:06'! actOnClickFor:
anObject "Do what you can with this URL. Later a web browser." | |
anObject class = HTMLScrollableField ifTrue: [anObject jumpToUrl: url. ^
true] ifFalse: [HTMLScrollableField url: url. ^ true].! !
HTMLScrollableField class removeSelector: #bbcNews! HTMLScrollableField
initialize! HTMLScrollableField class removeSelector: #redes!