WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

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

WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

Louis LaBrunda
Hi Everyone,

As the subject says, WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction.  But we already have a class Rectangle.  The PlatformFunction definition wins making it impossible (or at least very hard) to use Rectangle.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

John O'Keefe-3
Hi Lou -

The Rectangle platform function has been defined since the first version of VisualAge Smalltalk and so has the Rectangle class. You are the first person (that I am aware of) to have a problem with that.

You are correct that referencing the Rectangle class (directly) in a class that specifies the PlatformFunctions pool doesn't work. If you need to reference both in the same class, you probably already know the workaround -- either don't define the pool and use PlatformFunctions::Rectangle to reference the platform function, or do include the pool and use Smalltalk classAt: Rectangle to reference the class.

John

On Thursday, September 29, 2016 at 8:20:05 PM UTC+2, Louis LaBrunda wrote:
Hi Everyone,

As the subject says, WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction.  But we already have a class Rectangle.  The PlatformFunction definition wins making it impossible (or at least very hard) to use Rectangle.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

Louis LaBrunda
Hi John,

Thanks for the reply.  I didn't realize the conflict had been around that long.

I did figure out the workaround.  I went with Smalltalk classAt: #Rectangle because it is only needed when you want a rectangle and not defining the pool means you need to prefix every function with PlatformFunctions::.

Lou

On Thursday, September 29, 2016 at 3:47:49 PM UTC-4, John O'Keefe wrote:
Hi Lou -

The Rectangle platform function has been defined since the first version of VisualAge Smalltalk and so has the Rectangle class. You are the first person (that I am aware of) to have a problem with that.

You are correct that referencing the Rectangle class (directly) in a class that specifies the PlatformFunctions pool doesn't work. If you need to reference both in the same class, you probably already know the workaround -- either don't define the pool and use PlatformFunctions::Rectangle to reference the platform function, or do include the pool and use Smalltalk classAt: Rectangle to reference the class.

John

On Thursday, September 29, 2016 at 8:20:05 PM UTC+2, Louis LaBrunda wrote:
Hi Everyone,

As the subject says, WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction.  But we already have a class Rectangle.  The PlatformFunction definition wins making it impossible (or at least very hard) to use Rectangle.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

Richard Sargent
Administrator
On Thursday, September 29, 2016 at 1:35:46 PM UTC-7, Louis LaBrunda wrote:
Hi John,

Thanks for the reply.  I didn't realize the conflict had been around that long.

I did figure out the workaround.  I went with Smalltalk classAt: #Rectangle because it is only needed when you want a rectangle and not defining the pool means you need to prefix every function with PlatformFunctions::.

The :: syntax works more generally than just for shared pool access. Kernel::Rectangle would resolve to the class and do so at compile time.

 

Lou

On Thursday, September 29, 2016 at 3:47:49 PM UTC-4, John O'Keefe wrote:
Hi Lou -

The Rectangle platform function has been defined since the first version of VisualAge Smalltalk and so has the Rectangle class. You are the first person (that I am aware of) to have a problem with that.

You are correct that referencing the Rectangle class (directly) in a class that specifies the PlatformFunctions pool doesn't work. If you need to reference both in the same class, you probably already know the workaround -- either don't define the pool and use PlatformFunctions::Rectangle to reference the platform function, or do include the pool and use Smalltalk classAt: Rectangle to reference the class.

John

On Thursday, September 29, 2016 at 8:20:05 PM UTC+2, Louis LaBrunda wrote:
Hi Everyone,

As the subject says, WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction.  But we already have a class Rectangle.  The PlatformFunction definition wins making it impossible (or at least very hard) to use Rectangle.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction, bug?

Louis LaBrunda
Thanks Richard, I like that.

Lou

On Thursday, September 29, 2016 at 5:54:55 PM UTC-4, Richard Sargent wrote:
On Thursday, September 29, 2016 at 1:35:46 PM UTC-7, Louis LaBrunda wrote:
Hi John,

Thanks for the reply.  I didn't realize the conflict had been around that long.

I did figure out the workaround.  I went with Smalltalk classAt: #Rectangle because it is only needed when you want a rectangle and not defining the pool means you need to prefix every function with PlatformFunctions::.

The :: syntax works more generally than just for shared pool access. Kernel::Rectangle would resolve to the class and do so at compile time.

 

Lou

On Thursday, September 29, 2016 at 3:47:49 PM UTC-4, John O'Keefe wrote:
Hi Lou -

The Rectangle platform function has been defined since the first version of VisualAge Smalltalk and so has the Rectangle class. You are the first person (that I am aware of) to have a problem with that.

You are correct that referencing the Rectangle class (directly) in a class that specifies the PlatformFunctions pool doesn't work. If you need to reference both in the same class, you probably already know the workaround -- either don't define the pool and use PlatformFunctions::Rectangle to reference the platform function, or do include the pool and use Smalltalk classAt: Rectangle to reference the class.

John

On Thursday, September 29, 2016 at 8:20:05 PM UTC+2, Louis LaBrunda wrote:
Hi Everyone,

As the subject says, WindowsPlatformFramework>>_PRAGMA_PlatformFunctions defines Rectangle as a PlatformFunction.  But we already have a class Rectangle.  The PlatformFunction definition wins making it impossible (or at least very hard) to use Rectangle.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.