AbtVariable class>>abtPrimitiveEventForFeatureNamed:

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

AbtVariable class>>abtPrimitiveEventForFeatureNamed:

Postby marten » Fri Oct 08, 2010 2:33 am

I think, that this class method may have a bug ?

Code: Select all
abtPrimitiveEventForFeatureNamed: aFeatureName
   | ans |
   ^(ans := super abtPrimitiveEventForFeatureNamed: aFeatureName) isNil
      ifTrue: [
         self featureEventClass new
            featureName: aFeatureName;
            eventName: #basicEvent;
            yourself]
      ifFalse: [ans]


The method "featureEventClass" is an instance based method - this method is called during debugging and is as old as from 1998 !
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: AbtVariable class>>abtPrimitiveEventForFeatureNamed:

Postby wembley » Fri Oct 08, 2010 6:32 am

Marten -

You are correct -- it is broken. Case 47658 has been opened and the fix (copying the method to the class side of AbtVariable and updating the instance-side method to send self class featureEventClass ) will be in VA Smalltalk V8.0.3.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: AbtVariable class>>abtPrimitiveEventForFeatureNamed:

Postby wembley » Fri Oct 08, 2010 6:43 am

Marten -

I'm having a little trouble creating a simple example view that will hit this problem -- do you have one you could send me?

Thanks, John
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: AbtVariable class>>abtPrimitiveEventForFeatureNamed:

Postby marten » Sat Oct 09, 2010 3:08 am

wembley wrote:Marten -

I'm having a little trouble creating a simple example view that will hit this problem -- do you have one you could send me?

Thanks, John


Here is a simple example app ...
Attachments
Case47658.zip
Example to see the error
(12.85 KiB) Downloaded 18 times
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: AbtVariable class>>abtPrimitiveEventForFeatureNamed:

Postby wembley » Mon Oct 11, 2010 7:08 am

Marten -

Thank you for the testcase. What this testcase pointed out is that it is important which way you create the attribute-to-attribute connection. If the connection is made from the entry field to the variable, it always works; if it is made from the variable to the entry field, it fails without the fix -- of course I was making it the first way and that was the cause of my difficulty.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron