The Trunk: Files-pre.183.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Files-pre.183.mcz

commits-2
Patrick Rein uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-pre.183.mcz

==================== Summary ====================

Name: Files-pre.183
Author: pre
Time: 9 May 2019, 4:31:38.857225 pm
UUID: c7d0c859-2531-464e-87d8-3b580249731b
Ancestors: Files-pre.182

Deprecates classes and methods related to executing Squeak in a web browser through a browser plugin. They can be loaded through the 60Deprecated-NSPlugin-System-Support package.

=============== Diff against Files-pre.182 ===============

Item was removed:
- ----- Method: StandardFileStream class>>isRunningAsBrowserPlugin (in category 'browser requests') -----
- isRunningAsBrowserPlugin
- self new waitBrowserReadyFor: 1000 ifFail: [^false].
- ^true!

Item was removed:
- ----- Method: StandardFileStream class>>privateCheckForBrowserPrimitives (in category 'browser requests') -----
- privateCheckForBrowserPrimitives
- <primitive:'primitivePluginBrowserReady'>
- ^false!

Item was removed:
- ----- Method: StandardFileStream>>defaultBrowserReadyWait (in category 'browser requests') -----
- defaultBrowserReadyWait
- ^5000!

Item was removed:
- ----- Method: StandardFileStream>>post:target:url:ifError: (in category 'browser requests') -----
- post: data target: target url: url ifError: errorBlock
- "Post data to the given URL. The returned file stream contains the reply of the server.
- If Squeak is not running in a browser evaluate errorBlock"
-
- self waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].
- Smalltalk newExternalSemaphoreDo: [ :semaphore :index |
- | request result |
- request := self primURLPost: url target: target data: data semaIndex: index.
- request ifNil: [
- Smalltalk unregisterExternalObject: semaphore.
- ^errorBlock value ].
- [ semaphore wait. "until something happens"
- result := self primURLRequestState: request.
- result == nil ] whileTrue.
- result ifTrue: [ fileID := self primURLRequestFileHandle: request ].
- self primURLRequestDestroy: request.
- Smalltalk unregisterExternalObject: semaphore ].
- fileID ifNil: [ ^nil ].
- self register.
- name := url.
- rwmode := false.
- buffer1 := String new: 1.
- self enableReadBuffering!

Item was removed:
- ----- Method: StandardFileStream>>post:url:ifError: (in category 'browser requests') -----
- post: data url: url ifError: errorBlock
-
- self post: data target: nil url: url ifError: errorBlock!

Item was removed:
- ----- Method: StandardFileStream>>primBrowserReady (in category 'browser requests') -----
- primBrowserReady
- <primitive:'primitivePluginBrowserReady'>
- ^nil!

Item was removed:
- ----- Method: StandardFileStream>>primURLPost:data:semaIndex: (in category 'browser requests') -----
- primURLPost: url data: contents semaIndex: index
- ^self primURLPost: url target: nil data: contents semaIndex: index!

Item was removed:
- ----- Method: StandardFileStream>>primURLPost:target:data:semaIndex: (in category 'browser requests') -----
- primURLPost: url target: target data: contents semaIndex: index
- "Post the data (url might be 'mailto:' etc)"
- <primitive:'primitivePluginPostURL'>
- ^nil
-  !

Item was removed:
- ----- Method: StandardFileStream>>primURLRequest:semaIndex: (in category 'browser requests') -----
- primURLRequest: url semaIndex: index
- <primitive:'primitivePluginRequestURLStream'>
- ^nil!

Item was removed:
- ----- Method: StandardFileStream>>primURLRequest:target:semaIndex: (in category 'browser requests') -----
- primURLRequest: url target: target semaIndex: index
- "target - String (frame, also ':=top', ':=parent' etc)"
- <primitive:'primitivePluginRequestURL'>
- ^nil
-  !

Item was removed:
- ----- Method: StandardFileStream>>primURLRequestDestroy: (in category 'browser requests') -----
- primURLRequestDestroy: request
- <primitive:'primitivePluginDestroyRequest'>
- ^nil!

Item was removed:
- ----- Method: StandardFileStream>>primURLRequestFileHandle: (in category 'browser requests') -----
- primURLRequestFileHandle: request
- <primitive: 'primitivePluginRequestFileHandle'>
- ^nil!

Item was removed:
- ----- Method: StandardFileStream>>primURLRequestState: (in category 'browser requests') -----
- primURLRequestState: request
- <primitive:'primitivePluginRequestState'>
- ^false!

Item was removed:
- ----- Method: StandardFileStream>>requestURL:target: (in category 'browser requests') -----
- requestURL: url target: target
- ^self requestURL: url target: target ifError: [nil]!

Item was removed:
- ----- Method: StandardFileStream>>requestURL:target:ifError: (in category 'browser requests') -----
- requestURL: url target: target ifError: errorBlock
- "Request to go to the target for the given URL.
- If Squeak is not running in a browser evaluate errorBlock"
-
- self waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].
- Smalltalk newExternalSemaphoreDo: [ :semaphore :index |
- | request result |
- request := self primURLRequest: url target: target semaIndex: index.
- request ifNil: [
- Smalltalk unregisterExternalObject: semaphore.
- ^errorBlock value ].
- [ semaphore wait. "until something happens"
- result := self primURLRequestState: request.
- result == nil ] whileTrue.
- self primURLRequestDestroy: request.
- Smalltalk unregisterExternalObject: semaphore ].
- fileID ifNil: [ ^nil ].
- self register.
- name := url.
- rwmode := false.
- buffer1 := String new: 1.
- self enableReadBuffering!

Item was removed:
- ----- Method: StandardFileStream>>requestURLStream: (in category 'browser requests') -----
- requestURLStream: url
- "FileStream requestURLStream:'http://www.squeak.org'"
- ^self requestURLStream: url ifError:[nil]!

Item was removed:
- ----- Method: StandardFileStream>>requestURLStream:ifError: (in category 'browser requests') -----
- requestURLStream: url ifError: errorBlock
- "Request a FileStream for the given URL.
- If Squeak is not running in a browser evaluate errorBlock"
- "FileStream requestURLStream:'http://www.squeak.org'"
-
- self waitBrowserReadyFor: self defaultBrowserReadyWait ifFail: [^errorBlock value].
- Smalltalk newExternalSemaphoreDo: [ :semaphore :index |
- | request result |
- request := self primURLRequest: url semaIndex: index.
- request ifNil: [
- Smalltalk unregisterExternalObject: semaphore.
- ^errorBlock value ].
- [ semaphore wait. "until something happens"
- result := self primURLRequestState: request.
- result == nil ] whileTrue.
- result ifTrue: [ fileID := self primURLRequestFileHandle: request ].
- self primURLRequestDestroy: request.
- Smalltalk unregisterExternalObject: semaphore ].
- fileID ifNil: [ ^nil ].
- self register.
- name := url.
- rwmode := false.
- buffer1 := String new: 1.
- self enableReadBuffering!

Item was removed:
- ----- Method: StandardFileStream>>waitBrowserReadyFor:ifFail: (in category 'browser requests') -----
- waitBrowserReadyFor: timeout ifFail: errorBlock
- | startTime delay okay |
- okay := self primBrowserReady.
- okay ifNil:[^errorBlock value].
- okay ifTrue: [^true].
- startTime := Time millisecondClockValue.
- delay := Delay forMilliseconds: 100.
- [(Time millisecondsSince: startTime) < timeout]
- whileTrue: [
- delay wait.
- okay := self primBrowserReady.
- okay ifNil:[^errorBlock value].
- okay ifTrue: [^true]].
- ^errorBlock value!