[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did
From: |
Holger Freyther |
Subject: |
Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d |
Date: |
Mon, 31 Aug 2015 14:17:37 +0200 |
> On 31 Aug 2015, at 14:08, Mark Bratcher <address@hidden> wrote:
>
> Thank you, Holger.
>
> I understand the pragmatics of the decision. One could argue that, in the
> current bug case, the `(self new) stream: aStream ; initialize` statement is
> a bit "off-pattern". :) I think it's a little unfortunate that Pharo deviated
> from Smalltalk-80 in a small, but fundamental way. I think it means that if I
> want to write more portable Smalltalk code, I might avoid using "initialize"
> since its behavior will be different in Pharo (and now GNU) versus other
> implementations. Such avoidance would be necessary in cases where one wants
> instance initialization to be deferred after instance creation.
Yes, it is unfortunate. But if you look at the diff that introduced this
behavior then
you see that it was used a lot already. In both Pharo and GST there is
>>#basicNew
as well but I don’t know if this is in an ANSI protocol.
So e.g. this could fix the issue you have debugged:
diff --git a/packages/dbd-mysql/Connection.st b/packages/dbd-mysql/Connection.st
index b97dc89..ef5ac65 100644
--- a/packages/dbd-mysql/Connection.st
+++ b/packages/dbd-mysql/Connection.st
@@ -237,7 +237,7 @@ Object subclass: MySQLPacket [
MySQLPacket class >> on: aStream [
<category: 'instance creation'>
- ^(self new)
+ ^(self basicNew)
stream: aStream;
initialize
]
- [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Mark Bratcher, 2015/08/29
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Holger Freyther, 2015/08/29
- Message not available
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Holger Freyther, 2015/08/30
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Mark Bratcher, 2015/08/30
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Holger Freyther, 2015/08/31
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Mark Bratcher, 2015/08/31
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Holger Freyther, 2015/08/31
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Mark Bratcher, 2015/08/31
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d,
Holger Freyther <=
- Re: [Help-smalltalk] DBI.Connection call yields "Object: nil error: did not understand #atEnd" in ST 3.2.91-b98173d, Mark Bratcher, 2015/08/31