Name collision with Error

37 views
Skip to first unread message

Gabriel Cotelli

unread,
Nov 29, 2011, 5:22:38 PM11/29/11
to va-sma...@googlegroups.com
Hi,
Today we found that the new ANSI class Error collides with some `Error` defined in PlatformConstants pool dictionary. So, if you have some class using the pool dictionary (for example a subclass of WbApplication) you cannot refer the class Error in the code because the Pool Dictionary variable takes precedence over the class.

To test define a class that uses the pool dictionary and try to handle on some method Error, the result is a DNU that 0 does not understand handle:do:.

I will temporarily change the code to do "System globalNamespace at: #Error". Any better workaround or fix is welcomed.

I'm using VA 8.5 but I think this probably happens since the ANSI exceptions are supported.

Regards,
Gabriel

John O'Keefe

unread,
Nov 30, 2011, 11:52:37 AM11/30/11
to va-sma...@googlegroups.com
Gabriel -
 
Yes, it has been that way since VisualAge Smalltalk V6.0.2.
 
The Error entry in the PlatformConstants pool is only used by the CgRegion class on Windows. There are 4 possible return code from the various region functions -- Nullregion, Simpleregion, Complexregion, and Error.  To fix the problem, I propose renaming Error to Errorregion (to match the other 3 return codes) in the Windows PlatformConstants pool and in the classes that reference it.
 
Case 49059 opened.
 
John
Reply all
Reply to author
Forward
0 new messages