SystemWindow titlebar buttons.

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

SystemWindow titlebar buttons.

Casey Ransberger
SystemWindow has two different patterns around how it finds Forms for
it's title bar buttons.

It seems that SystemWindow has class variables for CloseBoxImage and
CollapseBoxImage, but the other two Forms are kept by ScriptingSystem.

Why use ScriptingSystem for this? Seems unnecessary. If there's a good
reason to, why not use it for both?

Dilemma.

--
Ron

Reply | Threaded
Open this post in threaded view
|

Re: SystemWindow titlebar buttons.

Andreas.Raab
Ronald Spengler wrote:
> Why use ScriptingSystem for this? Seems unnecessary. If there's a good
> reason to, why not use it for both?

There's no good reason. These forms were stored there initially and when
someone wanted to use them in SystemWindow they naturally used the
ScriptingSystem formAtKey: pattern.

This should probably be migrated to something more along the lines of
MenuIcons (perhaps call it StandardGraphics), i.e., a utility class
whose only purpose is to store some of the graphic resources that are
widely used throughout the system. Then have ScriptingSystem delegate to it.

If you're looking for a short-term fix, just move it into another class
var in SystemWindow. That's a recognizable pattern too.

Cheers,
   - Andreas


Reply | Threaded
Open this post in threaded view
|

Re: Re: SystemWindow titlebar buttons.

Casey Ransberger
I put what I did in the inbox if anyone wants it:)

On Sun, Dec 13, 2009 at 5:14 PM, Andreas Raab <[hidden email]> wrote:

> Ronald Spengler wrote:
>>
>> Why use ScriptingSystem for this? Seems unnecessary. If there's a good
>> reason to, why not use it for both?
>
> There's no good reason. These forms were stored there initially and when
> someone wanted to use them in SystemWindow they naturally used the
> ScriptingSystem formAtKey: pattern.
>
> This should probably be migrated to something more along the lines of
> MenuIcons (perhaps call it StandardGraphics), i.e., a utility class whose
> only purpose is to store some of the graphic resources that are widely used
> throughout the system. Then have ScriptingSystem delegate to it.
>
> If you're looking for a short-term fix, just move it into another class var
> in SystemWindow. That's a recognizable pattern too.
>
> Cheers,
>  - Andreas
>
>
>



--
Ron

Reply | Threaded
Open this post in threaded view
|

Re: Re: SystemWindow titlebar buttons.

K. K. Subramaniam
In reply to this post by Andreas.Raab
On Monday 14 December 2009 06:44:24 am Andreas Raab wrote:
> There's no good reason. These forms were stored there initially and when
> someone wanted to use them in SystemWindow they naturally used the
> ScriptingSystem formAtKey: pattern.
Is there a standard pattern in Squeak for dealing with pure data objects like
icons, cursors, textures, sounds, videos etc.? How does one pool (pun
intended) such resources together?

Subbu

Reply | Threaded
Open this post in threaded view
|

Media objects in Code Re: Re: SystemWindow titlebar buttons.

Karl Ramberg
On 2009-12-14 09:59, K. K. Subramaniam wrote:

> On Monday 14 December 2009 06:44:24 am Andreas Raab wrote:
>    
>> There's no good reason. These forms were stored there initially and when
>> someone wanted to use them in SystemWindow they naturally used the
>> ScriptingSystem formAtKey: pattern.
>>      
> Is there a standard pattern in Squeak for dealing with pure data objects like
> icons, cursors, textures, sounds, videos etc.? How does one pool (pun
> intended) such resources together?
>
> Subbu
>
>
>    
+1000

I have often missed a more obvious way to deal with
other-than-text-objects when programming in Squeak.
It would be nice to just paste or drag&drop graphics into the browser
instead of a dreadful 4 page binary text.
It would also help to visually see what image one is dealing with etc.

Same with sounds and other media objects.

Karl