Reddit example

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

Reddit example

recursive
Thanks for the pointers. I've got it working in Pharo 4 but had to change this method as I was getting a database session connection error. It appears to be losing the Glorp session, so I changed this class method thus:

RedditDatabaseResource 
login>>
"^ DefaultLogin ifNil: [ DefaultLogin := self createLogin ]"
^ DefaultLogin := self createLogin.
Reply | Threaded
Open this post in threaded view
|

Re: Reddit example

Sven Van Caekenberghe-2

> On 03 Jun 2015, at 20:24, <[hidden email]> <[hidden email]> wrote:
>
> Thanks for the pointers. I've got it working in Pharo 4 but had to change this method as I was getting a database session connection error. It appears to be losing the Glorp session, so I changed this class method thus:
>
> RedditDatabaseResource
> login>>
> "^ DefaultLogin ifNil: [ DefaultLogin := self createLogin ]"
> ^ DefaultLogin := self createLogin.

Hmm, it has been a while since I wrote this, looked at the code or ran it, but that should work the way it was intended. I even believe there is some auto-reconnect logic in Glorp, but I might be wrong.