Re: [GS/SS Beta] Problems with name and location of GCI library

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

Re: [GS/SS Beta] Problems with name and location of GCI library

James Foster

On Feb 2, 2010, at 11:57 PM, Friedrich Dominicus wrote:

> James Foster <[hidden email]> writes:
>
>> Friedrich,
>>
>> Sorry this has been so difficult to get working. I think I now understand what is happening. It seems that in the time since some of us followed the instructions the Squeak VM has changed. I assume when you created your clean Pharo install you used the Squeak-3.11.3.2135 virtual machine. It seems that this VM expects to have shared libraries in a different location and given different names.
>>
>> Please move 'gciForLinux.so' from the image directory to the vm
>> directory and give it the name 'so.gciForLinux'. In addition, modify
>> GciLibrary>>#'moduleName' to simply return 'gciForLinux' (without 'so'
>> on the beginning or end). At that point I believe things will
>> work. I've written this up in some more detail at
>> http://programminggems.wordpress.com/2010/02/02/name-and-location-of-gci-library/.
>
> This has given me the needed hints. but
> I have to copy he shard library to the vm dirctory ame it so.gciForLinux
> and I have to copy it into the image directory under the name
> gciForLinux
>
> So at least it seems I need them in the vm directory and the image
> directory.
>
> Also it seems it needs to have the name so.gciForLinux in the vm
> directory and
> gciForLinux in the image directory.
>
> Not very logical but I tried other names and "that did not " work
>
> Regards
> Friedrich
>

Did you make any edits to the client method GciLibrary>>#'moduleName'?

James

Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] Problems with name and location of GCI library

FDominicus
James Foster <[hidden email]> writes:

>
> Did you make any edits to the client method GciLibrary>>#'moduleName'?
Yes I change it to:

Oh I see the update beta-4 does change this function again,
sorry I have to restart from the beginning to include the changes. The
beta 4 does contain a different implementation

Regards
Friedrich





--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] Problems with name and location of GCI library

James Foster

On Feb 3, 2010, at 7:29 AM, Friedrich Dominicus wrote:

> James Foster <[hidden email]> writes:
>
>> Did you make any edits to the client method GciLibrary>>#'moduleName'?
> Yes I change it to:

This isn't coming through on the email.

> Oh I see the update beta-4 does change this function again,
> sorry I have to restart from the beginning to include the changes. The
> beta 4 does contain a different implementation

Also, my instructions and blog post described the change.

James
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] Problems with name and location of GCI library

FDominicus
In reply to this post by James Foster
Just FYI

I can not use the gemstone monticello browser. If I try to
open an URL I got an error from HTTPSock

Regards
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] Problems with name and location of GCI library

FDominicus
In reply to this post by James Foster
James Foster <[hidden email]> writes:

> On Feb 3, 2010, at 7:29 AM, Friedrich Dominicus wrote:
>
>> James Foster <[hidden email]> writes:
>>
>>> Did you make any edits to the client method GciLibrary>>#'moduleName'?
>> Yes I change it to:
>
> This isn't coming through on the email.
Sorry I wanted to include it, but in the beta-4 the code was changed.
>
>> Oh I see the update beta-4 does change this function again,
>> sorry I have to restart from the beginning to include the changes. The
>> beta 4 does contain a different implementation
>
> Also, my instructions and blog post described the change.
Yes I have read this description.

Regards
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] Problems with name and location of GCI library

SeanTAllen
In reply to this post by FDominicus
On Wed, Feb 3, 2010 at 10:51 AM, Friedrich Dominicus
<[hidden email]> wrote:
> Just FYI
>
> I can not use the gemstone monticello browser. If I try to
> open an URL I got an error from HTTPSock
>

What is the error?
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

FDominicus
Sean Allen <[hidden email]> writes:

> On Wed, Feb 3, 2010 at 10:51 AM, Friedrich Dominicus
> <[hidden email]> wrote:
>> Just FYI
>>
>> I can not use the gemstone monticello browser. If I try to
>> open an URL I got an error from HTTPSock
>>
>
> What is the error?
sorry, it  is:


No method was found for the selector:
#httpGet:args:user:passwd when sent to HTTPSocket

fair enough because if I file it out from the GS/System Browser I do not
find it.

doit
SpSocket subclass: 'HTTPSocket'
        instVarNames: #( headerTokens headers responseCode)
        classVars: #( CR CrLf HTTPBlabEmail HTTPProxyCredentials HTTPProxyExceptions HTTPProxyPort HTTPProxyServer LF)
        classInstVars: #()
        poolDictionaries: #[]
        inDictionary: ''
        category: 'Squeak-Gemstone'

%

! Remove existing behavior from HTTPSocket
doit
HTTPSocket removeAllMethods.
HTTPSocket class removeAllMethods.
%
! ------------------- Class methods for HTTPSocket
category: 'proxy settings'
classmethod: HTTPSocket
addProxyExceptions: aColl
        HTTPProxyExceptions isNil
                ifTrue: [HTTPProxyExceptions := Set new].
        HTTPProxyExceptions addAll: aColl.
%
category: 'get'
classmethod: HTTPSocket
httpGet: url
        "Return the exact contents of a web page or other web object. The parsed header is saved.  Use a proxy server if one has been registered.  tk 7/23/97 17:21"
        " HTTPSocket httpShowPage: 'http://www.altavista.digital.com/index.html'         "
        " HTTPSocket httpShowPage: 'www.webPage.com/~kaehler2/ab.html' "
        " HTTPSocket httpShowPage: 'www.exploratorium.edu/index.html' "
        " HTTPSocket httpShowPage: 'www.apple.com/default.html' "
        " HTTPSocket httpShowPage: 'www.altavista.digital.com/' "
        " HTTPSocket httpShowPage: 'jumbo/tedk/ab.html' "

        ^ self httpGet: url accept: '*/*'
%
category: 'get'
classmethod: HTTPSocket
httpGet: url accept: mimeType
        "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. The parsed header is saved. Use a proxy server if one has been registered.
        Note: To fetch raw data, you can use the MIME type 'application/octet-stream'.  To accept anything, use '*/*'."

        ^self httpGet: url  args: nil accept: mimeType
%
category: 'get'
classmethod: HTTPSocket
httpGet: url args: args accept: mimeType

        ^self httpGet: url args: args accept: mimeType request: ''
%
category: 'get'
classmethod: HTTPSocket
httpGetDocument: url args: args accept: mimeType request: requestString
        "Return the exact contents of a web object. Asks for the given MIME
type. If mimeType is nil, use 'text/html'. An extra requestString may be
submitted and must end with crlf.  The parsed header is saved. Use a
proxy server if one has been registered.  tk 7/23/97 17:12"
        "Note: To fetch raw data, you can use the MIME type
'application/octet-stream'."

        | serverName serverAddr port sock header length bare page list firstData
aStream index connectToHost connectToPort type newUrl |
        bare _ (url asLowercase beginsWith: 'http://')
                ifTrue: [url copyFrom: 8 to: url size]
                ifFalse: [url].
        bare _ bare copyUpTo: $#.  "remove fragment, if specified"
        serverName _ bare copyUpTo: $/.
        page _ bare copyFrom: serverName size + 1 to: bare size.
        (serverName includes: $:)
                ifTrue: [ index _ serverName indexOf: $:.
                        port _ (serverName copyFrom: index+1 to: serverName size) asNumber.
                        serverName _ serverName copyFrom: 1 to: index-1. ]
                ifFalse: [ port _ self defaultPort ].
        page size = 0 ifTrue: [page _ '/'].
        "add arguments"
        args ifNotNil: [page _ page, (self argString: args) ].
        "check for proxy"
        (self shouldUseProxy: serverName)
                ifFalse: [
                        connectToHost := serverName.
                        connectToPort := port]
                ifTrue: [
                        connectToHost := self httpProxyServer.
                        connectToHost isNil ifTrue: [connectToHost := serverName.].
                        connectToPort := self httpProxyPort.
                        page := 'http://', serverName, ':', port printString, page. "put back
together"].

        serverAddr _ GsSocket getHostAddressByName: connectToHost.
        serverAddr ifNil: [
                ^ 'Could not resolve the server named: ', connectToHost].

3 timesRepeat: [
        [ sock _ HTTPSocket connectToServerOnHost: serverAddr port: connectToPort ] on: Error do: [:ex | ^ 'Server ',connectToHost,' is not responding: ', ex description ].
        sock sendCommand: 'GET ', page, ' HTTP/1.0', CrLf,
                (mimeType ifNotNil: ['ACCEPT: ', mimeType, CrLf] ifNil: ['']),
                'ACCEPT: text/html', CrLf, "Always accept plain text"
                HTTPBlabEmail, "may be empty"
                requestString, "extra user request. Authorization"
                self userAgentString, CrLf,
                'Host: ', serverName, ':', port printString, CrLf. "blank line
automatically added"

        list _ sock getResponseUpTo: CrLf, CrLf ignoring: (String with: CR). "list = header, CrLf, CrLf,
beginningOfData"
        header _ list at: 1.
        firstData _ list at: 3.
        header isEmpty
                ifTrue: [aStream _ 'server aborted early']
                ifFalse: [
                        "dig out some headers"
                        sock header: header.
                        length _ sock getHeader: 'content-length'.
                        length ifNotNil: [ length _ length asNumber ].
                        type _ sock getHeader: 'content-type'.
                        sock responseCode first = $3 ifTrue: [
                                newUrl _ sock getHeader: 'location'.
                                newUrl ifNotNil: [
                                        sock close.
                                        newUrl _ self expandUrl: newUrl ip: serverAddr port: connectToPort.
                                        ^self httpGetDocument: newUrl args: args  accept: mimeType request: requestString] ].
                        aStream _ sock getRestOfBuffer: firstData totalLength: length.
                        "a 400-series error"
                        sock responseCode first = $4 ifTrue: [^ header, aStream contents].
                        ].
        sock close. "Always OK to destroy!"
        aStream class ~~ String ifTrue: [
  ^ self mimeDocumentClass contentType: type content: aStream contents url: url].
        aStream = 'server aborted early' ifTrue: [ ^aStream ].
        ].

(Array with: 'HTTPSocket class>>httpGetDocument:args:accept:request:' with: aStream with: url) perform: #inspect.

        ^'some other bad thing happened!'
%
category: 'utilities'
classmethod: HTTPSocket
initHTTPSocket: httpUrl wait: timeout ifError: aBlock
        "Retrieve the server and port information from the URL, match it to the proxy settings and open a http socket for the request."

        | serverName connectToHost connectToPort serverAddr s |
        serverName := connectToHost := httpUrl authority.
        connectToPort := httpUrl port ifNil: [self defaultPort].

        (self shouldUseProxy: connectToHost) ifTrue: [
                connectToHost := self httpProxyServer.
                connectToHost isNil ifTrue: [connectToHost := serverName.].
                connectToPort := self httpProxyPort].

  "make the request"
        serverAddr := GsSocket getHostAddressByName: connectToHost.
        serverAddr ifNil: [
                aBlock value: 'Error: Could not resolve the server named: ', connectToHost].

        [ s := HTTPSocket connectToServerOnHost: serverAddr port: connectToPort ]
                on: Error
                do: [:ex |
                        ^ aBlock value: 'Error: Server ',httpUrl authority,' is not responding' ].
        ^s
%
category: 'initialization'
classmethod: HTTPSocket
initialize
        "HTTPSocket initialize"

        CR := Character cr.
        LF := Character lf.

        "string for command line termination:"
        CrLf := String with: CR with: LF.

        HTTPProxyCredentials := HTTPBlabEmail := ''.  " 'From: [hidden email]', CrLf "
%
category: 'proxy settings'
classmethod: HTTPSocket
proxyUser: userName password: password
        "Store  HTTP 1.0 basic authentication credentials
        Note: this is an ugly hack that stores your password
        in your image.  It's just enought to get you going
        if you use a firewall that requires authentication"

    | stream encodedStream |
        stream := ReadWriteStream on: (String new).
        stream nextPutAll: userName ,':' , password.
        encodedStream := Base64MimeConverter mimeEncode: stream.
        HTTPProxyCredentials := 'Proxy-Authorization: Basic ' , (encodedStream contents) , String crlf
%
! ------------------- Instance methods for HTTPSocket
category: 'http'
method: HTTPSocket
getResponseUpTo: markerString
        "Keep reading until the marker is seen.  Return three parts: header, marker, beginningOfData.  Fails if no marker in first 2000 chars."

        | buf response bytesRead tester mm tries |
        buf := ByteArray new: 2000.
        response := WriteStream on: ByteArray new.
        tester := 1. mm := 1.
        tries := 3.
        [tester := tester - markerString size + 1 max: 1.  "rewind a little, in case the marker crosses a read boundary"
        tester to: response position - 1 do: [:tt |
                (Character value: (buf at: tt)) = (markerString at: mm)
                        ifTrue: [mm := mm + 1]
                        ifFalse: [mm := 1 ].
                        "Not totally correct for markers like xx0xx"
                mm > markerString size ifTrue: ["got it"
                        ^ Array with: (buf asString copyFrom: 1 to: tt+1-mm)
                                with: markerString
                                with: (buf asString copyFrom: tt+1 to: response position - 1)]].
         tester := 1 max: response position. "OK if mm in the middle"
         (response position < buf size) & (self isActive | self readyForRead)
                & ((tries := tries - 1) >= 0) ] whileTrue: [
                (self waitForReadDataUpToMs: 120000) ifFalse: [
                        self error: 'data was late'].
                bytesRead := self readInto: buf startingAt: 1 for: buf size.
                response nextPutAll: (buf copyFrom: 1 to: bytesRead)].

        ^ Array with: response contents asString
                with: ''
                with: '' "Marker not found and connection closed"
%
category: 'http'
method: HTTPSocket
getRestOfBuffer: beginning
        "We don't know the length. Keep going until connection is closed. Part of
        it has already been received. Response is of type text, not binary."
        | buf response bytesRead |
        response := RWBinaryOrTextStream
                                on: String new.
        response nextPutAll: beginning.
        buf := String new: 2000.
        [self isActive "& self readyForRead" & self underlyingSocket isConnected]
                whileTrue: [
                        [(self waitForReadDataUpToMs: (5000))] whileFalse: [
          GsFile gciLogServer: 'data is slow'].
                        bytesRead _ self readInto: buf startingAt: 1 for: buf size.
                        bytesRead > 0
                                ifTrue: [ response nextPutAll: (buf copyFrom: 1 to: bytesRead) ]].
        response reset.
        ^ response
%
doit
HTTPSocket category: 'Squeak-Gemstone'
%



so what am I missing?


I thouht well this thing seems to be broken but in the normal image
there is a HTTPSocket also but if I open the GS File Browser I got an
exception:
GSCompileError

doit
SpSocket subclass: 'HTTPSocket'
        instVarNames: #( headerTokens headers responseCode)
        classVars: #( CR CrLf HTTPBlabEmail HTTPProxyCredentials HTTPProxyExceptions HTTPProxyPort HTTPProxyServer LF)
        classInstVars: #()
        poolDictionaries: #[]
        inDictionary: ''
        category: 'Squeak-Gemstone'

%

! Remove existing behavior from HTTPSocket
doit
HTTPSocket removeAllMethods.
HTTPSocket class removeAllMethods.
%
! ------------------- Class methods for HTTPSocket
category: 'proxy settings'
classmethod: HTTPSocket
addProxyExceptions: aColl
        HTTPProxyExceptions isNil
                ifTrue: [HTTPProxyExceptions := Set new].
        HTTPProxyExceptions addAll: aColl.
%
category: 'get'
classmethod: HTTPSocket
httpGet: url
        "Return the exact contents of a web page or other web object. The parsed header is saved.  Use a proxy server if one has been registered.  tk 7/23/97 17:21"
        " HTTPSocket httpShowPage: 'http://www.altavista.digital.com/index.html'         "
        " HTTPSocket httpShowPage: 'www.webPage.com/~kaehler2/ab.html' "
        " HTTPSocket httpShowPage: 'www.exploratorium.edu/index.html' "
        " HTTPSocket httpShowPage: 'www.apple.com/default.html' "
        " HTTPSocket httpShowPage: 'www.altavista.digital.com/' "
        " HTTPSocket httpShowPage: 'jumbo/tedk/ab.html' "

        ^ self httpGet: url accept: '*/*'
%
category: 'get'
classmethod: HTTPSocket
httpGet: url accept: mimeType
        "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. The parsed header is saved. Use a proxy server if one has been registered.
        Note: To fetch raw data, you can use the MIME type 'application/octet-stream'.  To accept anything, use '*/*'."

        ^self httpGet: url  args: nil accept: mimeType
%
category: 'get'
classmethod: HTTPSocket
httpGet: url args: args accept: mimeType

        ^self httpGet: url args: args accept: mimeType request: ''
%
category: 'get'
classmethod: HTTPSocket
httpGetDocument: url args: args accept: mimeType request: requestString
        "Return the exact contents of a web object. Asks for the given MIME
type. If mimeType is nil, use 'text/html'. An extra requestString may be
submitted and must end with crlf.  The parsed header is saved. Use a
proxy server if one has been registered.  tk 7/23/97 17:12"
        "Note: To fetch raw data, you can use the MIME type
'application/octet-stream'."

        | serverName serverAddr port sock header length bare page list firstData
aStream index connectToHost connectToPort type newUrl |
        bare _ (url asLowercase beginsWith: 'http://')
                ifTrue: [url copyFrom: 8 to: url size]
                ifFalse: [url].
        bare _ bare copyUpTo: $#.  "remove fragment, if specified"
        serverName _ bare copyUpTo: $/.
        page _ bare copyFrom: serverName size + 1 to: bare size.
        (serverName includes: $:)
                ifTrue: [ index _ serverName indexOf: $:.
                        port _ (serverName copyFrom: index+1 to: serverName size) asNumber.
                        serverName _ serverName copyFrom: 1 to: index-1. ]
                ifFalse: [ port _ self defaultPort ].
        page size = 0 ifTrue: [page _ '/'].
        "add arguments"
        args ifNotNil: [page _ page, (self argString: args) ].
        "check for proxy"
        (self shouldUseProxy: serverName)
                ifFalse: [
                        connectToHost := serverName.
                        connectToPort := port]
                ifTrue: [
                        connectToHost := self httpProxyServer.
                        connectToHost isNil ifTrue: [connectToHost := serverName.].
                        connectToPort := self httpProxyPort.
                        page := 'http://', serverName, ':', port printString, page. "put back
together"].

        serverAddr _ GsSocket getHostAddressByName: connectToHost.
        serverAddr ifNil: [
                ^ 'Could not resolve the server named: ', connectToHost].

3 timesRepeat: [
        [ sock _ HTTPSocket connectToServerOnHost: serverAddr port: connectToPort ] on: Error do: [:ex | ^ 'Server ',connectToHost,' is not responding: ', ex description ].
        sock sendCommand: 'GET ', page, ' HTTP/1.0', CrLf,
                (mimeType ifNotNil: ['ACCEPT: ', mimeType, CrLf] ifNil: ['']),
                'ACCEPT: text/html', CrLf, "Always accept plain text"
                HTTPBlabEmail, "may be empty"
                requestString, "extra user request. Authorization"
                self userAgentString, CrLf,
                'Host: ', serverName, ':', port printString, CrLf. "blank line
automatically added"

        list _ sock getResponseUpTo: CrLf, CrLf ignoring: (String with: CR). "list = header, CrLf, CrLf,
beginningOfData"
        header _ list at: 1.
        firstData _ list at: 3.
        header isEmpty
                ifTrue: [aStream _ 'server aborted early']
                ifFalse: [
                        "dig out some headers"
                        sock header: header.
                        length _ sock getHeader: 'content-length'.
                        length ifNotNil: [ length _ length asNumber ].
                        type _ sock getHeader: 'content-type'.
                        sock responseCode first = $3 ifTrue: [
                                newUrl _ sock getHeader: 'location'.
                                newUrl ifNotNil: [
                                        sock close.
                                        newUrl _ self expandUrl: newUrl ip: serverAddr port: connectToPort.
                                        ^self httpGetDocument: newUrl args: args  accept: mimeType request: requestString] ].
                        aStream _ sock getRestOfBuffer: firstData totalLength: length.
                        "a 400-series error"
                        sock responseCode first = $4 ifTrue: [^ header, aStream contents].
                        ].
        sock close. "Always OK to destroy!"
        aStream class ~~ String ifTrue: [
  ^ self mimeDocumentClass contentType: type content: aStream contents url: url].
        aStream = 'server aborted early' ifTrue: [ ^aStream ].
        ].

(Array with: 'HTTPSocket class>>httpGetDocument:args:accept:request:' with: aStream with: url) perform: #inspect.

        ^'some other bad thing happened!'
%
category: 'utilities'
classmethod: HTTPSocket
initHTTPSocket: httpUrl wait: timeout ifError: aBlock
        "Retrieve the server and port information from the URL, match it to the proxy settings and open a http socket for the request."

        | serverName connectToHost connectToPort serverAddr s |
        serverName := connectToHost := httpUrl authority.
        connectToPort := httpUrl port ifNil: [self defaultPort].

        (self shouldUseProxy: connectToHost) ifTrue: [
                connectToHost := self httpProxyServer.
                connectToHost isNil ifTrue: [connectToHost := serverName.].
                connectToPort := self httpProxyPort].

  "make the request"
        serverAddr := GsSocket getHostAddressByName: connectToHost.
        serverAddr ifNil: [
                aBlock value: 'Error: Could not resolve the server named: ', connectToHost].

        [ s := HTTPSocket connectToServerOnHost: serverAddr port: connectToPort ]
                on: Error
                do: [:ex |
                        ^ aBlock value: 'Error: Server ',httpUrl authority,' is not responding' ].
        ^s
%
category: 'initialization'
classmethod: HTTPSocket
initialize
        "HTTPSocket initialize"

        CR := Character cr.
        LF := Character lf.

        "string for command line termination:"
        CrLf := String with: CR with: LF.

        HTTPProxyCredentials := HTTPBlabEmail := ''.  " 'From: [hidden email]', CrLf "
%
category: 'proxy settings'
classmethod: HTTPSocket
proxyUser: userName password: password
        "Store  HTTP 1.0 basic authentication credentials
        Note: this is an ugly hack that stores your password
        in your image.  It's just enought to get you going
        if you use a firewall that requires authentication"

    | stream encodedStream |
        stream := ReadWriteStream on: (String new).
        stream nextPutAll: userName ,':' , password.
        encodedStream := Base64MimeConverter mimeEncode: stream.
        HTTPProxyCredentials := 'Proxy-Authorization: Basic ' , (encodedStream contents) , String crlf
%
! ------------------- Instance methods for HTTPSocket
category: 'http'
method: HTTPSocket
getResponseUpTo: markerString
        "Keep reading until the marker is seen.  Return three parts: header, marker, beginningOfData.  Fails if no marker in first 2000 chars."

        | buf response bytesRead tester mm tries |
        buf := ByteArray new: 2000.
        response := WriteStream on: ByteArray new.
        tester := 1. mm := 1.
        tries := 3.
        [tester := tester - markerString size + 1 max: 1.  "rewind a little, in case the marker crosses a read boundary"
        tester to: response position - 1 do: [:tt |
                (Character value: (buf at: tt)) = (markerString at: mm)
                        ifTrue: [mm := mm + 1]
                        ifFalse: [mm := 1 ].
                        "Not totally correct for markers like xx0xx"
                mm > markerString size ifTrue: ["got it"
                        ^ Array with: (buf asString copyFrom: 1 to: tt+1-mm)
                                with: markerString
                                with: (buf asString copyFrom: tt+1 to: response position - 1)]].
         tester := 1 max: response position. "OK if mm in the middle"
         (response position < buf size) & (self isActive | self readyForRead)
                & ((tries := tries - 1) >= 0) ] whileTrue: [
                (self waitForReadDataUpToMs: 120000) ifFalse: [
                        self error: 'data was late'].
                bytesRead := self readInto: buf startingAt: 1 for: buf size.
                response nextPutAll: (buf copyFrom: 1 to: bytesRead)].

        ^ Array with: response contents asString
                with: ''
                with: '' "Marker not found and connection closed"
%
category: 'http'
method: HTTPSocket
getRestOfBuffer: beginning
        "We don't know the length. Keep going until connection is closed. Part of
        it has already been received. Response is of type text, not binary."
        | buf response bytesRead |
        response := RWBinaryOrTextStream
                                on: String new.
        response nextPutAll: beginning.
        buf := String new: 2000.
        [self isActive "& self readyForRead" & self underlyingSocket isConnected]
                whileTrue: [
                        [(self waitForReadDataUpToMs: (5000))] whileFalse: [
          GsFile gciLogServer: 'data is slow'].
                        bytesRead _ self readInto: buf startingAt: 1 for: buf size.
                        bytesRead > 0
                                ifTrue: [ response nextPutAll: (buf copyFrom: 1 to: bytesRead) ]].
        response reset.
        ^ response
%
doit
HTTPSocket category: 'Squeak-Gemstone'
%


If try to reload another HTTPSocket I get an exception:
--- The full stack ---
GciSession>>getNbResult
GciSession>>getNbResultAsOop
GciSession>>executeStringNB:
OGCmdOpenFileBrowser>>execute
[] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
BlockClosure>>ensure:
CursorWithMask(Cursor)>>showWhile:
ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
ToggleMenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
MenuMorph>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear:
[] in PasteUpMorph>>becomeActiveDuring:
BlockClosure>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockClosure>>newProcess

So by any mean I'd argue my installation is really "messed" however it's
not easy to find a up-to-date installation instruction....

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

FDominicus
Ok, I've tried it from the start. and installed it completly a-fresh
following:
http://gemstonesoup.wordpress.com/2009/11/04/gemtools-client-1-0-beta-1/#installing

Now Monticello works as did other things. Great. Now I can start
learning Gemstone ;-)

Regards
Friedrich
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

Dale
Friedrich ... I'm glad that you got things working finally:)

With the 1.0-beta.8 release I will be updating most of the deliverables for GLASS (which also causes more delays...but that is life). I hesitate to make a schedule prediction, because I've been so wrong in the past:), but I can say that I'm making daily progress towards 1.0-beta.8:)

Dale
----- "Friedrich Dominicus" <[hidden email]> wrote:

| Ok, I've tried it from the start. and installed it completly a-fresh
| following:
| http://gemstonesoup.wordpress.com/2009/11/04/gemtools-client-1-0-beta-1/#installing
|
| Now Monticello works as did other things. Great. Now I can start
| learning Gemstone ;-)
|
| Regards
| Friedrich
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

FDominicus
Dale Henrichs <[hidden email]> writes:

> Friedrich ... I'm glad that you got things working finally:)
>
> With the 1.0-beta.8 release I will be updating most of the deliverables for GLASS (which also causes more delays...but that is life). I hesitate to make a schedule prediction, because I've been so wrong in the past:), but I can say that I'm making daily progress towards 1.0-beta.8:)
>
> Dale
> ----- "Friedrich Dominicus" <[hidden email]> wrote:
>
> | Ok, I've tried it from the start. and installed it completly a-fresh
> | following:
> | http://gemstonesoup.wordpress.com/2009/11/04/gemtools-client-1-0-beta-1/#installing
> |
> | Now Monticello works as did other things. Great. Now I can start
> | learning Gemstone ;-)
> |
> | Regards
> | Friedrich
>
>
>
Ok next trouble spot: how do I get seaside into the gemstone tools?
according to :
http://gemstonesoup.wordpress.com/2009/12/02/bootstrapping-glass-1-0-beta-4/#step9

Something along the line:
(ConfigurationOfGLASS project version: '1.0-beta.4')
    load: 'Seaside Dev'.

Should do, but I get
Error: Name not found Seaside Dev
Seaside does not wrok nor simply load,

So what am I  expected to do to get Seaside into it?



Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

FDominicus
And yet another thin I do not understand.
If logged into the Stone (seaside) an trying to run upate Update Glass
I got also an error traceback
No method was found for the selector #'preLoadDoit:

Regards
Friedrich
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

Dale
In reply to this post by James Foster
Friedrich,

You don't really need to upgrade to 1.0-beta.4 to load Seaside. The following expression should get seaside loaded correctly into 1.0-beta.1:

  ConfigurationOfGLASS project currentVersion load: 'Seaside Dev'.

As I'm working through the upgrade issues for 1.0-beta.8, I believe that I am attempting to ensure that upgrades work from a number of starting points and along the way I have found (and resolved) various upgrade problems, so I recommend that you sit tight with 1.0-beta.1 for now and upgrade to 1.0-beta.8 when I make it available.

The #'preLoadDoit: MNU was a problem that I introduced in ConfigurationOfGLASS-DaleHenrichs.123 and fixed in ConfigurationOfGLASS-DaleHenrichs.127 while working on 1.0-beta.8 ... sorry about that ...

Dale
----- "Friedrich Dominicus" <[hidden email]> wrote:

| And yet another thin I do not understand.
| If logged into the Stone (seaside) an trying to run upate Update
| Glass
| I got also an error traceback
| No method was found for the selector #'preLoadDoit:
|
| Regards
| Friedrich
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

FDominicus
Dale Henrichs <[hidden email]> writes:

> ConfigurationOfGLASS project currentVersion load: 'Seaside Dev'.

Well  I have got the
ConfigurationOfGLASS-DaleHenrichs.127
and now if I try to run the above command:
in a G/S workspace
curVersion := ConfigurationOfGLASS project currentVersion.

curVersion is nil and so of course load fails.

So I still like to know what  do  I am supposed to do to get Seaside
installed?

Regards
Friedrich

--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Reply | Threaded
Open this post in threaded view
|

Re: Problems with name and location of GCI library

Dale
In reply to this post by James Foster
Friedrich,

I'm not exactly sure what is going on with your installation ... So I think that you need to be at a known starting pointing and I want to minimize the number of extra steps that you need to take (until 1.0-beta.8 is ready).

Soooo, your best bet is to create a 1.0-beta.4 bootstrap extent (http://gemstonesoup.wordpress.com/2009/12/02/bootstrapping-glass-1-0-beta-4/) and then just work with it .. do not attempt to move to a later version of GLASS or upgrade any of the packages.

When you bring up gemtools on the 1.0-beta.4 extent, make an immediate backup so that you will always have a fresh copy in case things go whacky on you.

After making the backup, install Seaside using this expression:

(ConfigurationOfGLASS project version: '1.0-beta.4')
    load: 'Seaside Dev'.

Make another backup so that you'll be able to easily return to a known point ...

Dale
----- "Friedrich Dominicus" <[hidden email]> wrote:

| Dale Henrichs <[hidden email]> writes:
|
| > ConfigurationOfGLASS project currentVersion load: 'Seaside Dev'.
|
| Well  I have got the
| ConfigurationOfGLASS-DaleHenrichs.127
| and now if I try to run the above command:
| in a G/S workspace
| curVersion := ConfigurationOfGLASS project currentVersion.
|
| curVersion is nil and so of course load fails.
|
| So I still like to know what  do  I am supposed to do to get Seaside
| installed?
|
| Regards
| Friedrich
|
| --
| Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
| Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus