Name collision with Error

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

Name collision with Error

Gabriel Cotelli
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

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/43Tk3jz8cQsJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Name collision with Error

John O'Keefe-3
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

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/YPANNGjdwCwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.