[squeak-dev] How can the main window title in Squeak and Pharo be set?

Bert Freudenberg bert at freudenbergs.de
Fri Jan 11 18:15:37 UTC 2013


On 11.01.2013, at 05:45, "David T. Lewis" <lewis at mail.msen.com> wrote:

> On Thu, Jan 10, 2013 at 09:15:58PM -0800, Bert Freudenberg wrote:
>> 
>> On 10.01.2013, at 20:41, "Ron Teitelbaum" <ron at usmedrec.com> wrote:
>> 
>>> Hi All,
>>> 
>>> We change the window title on Windows and Mac so I looked it up.
>>> 
>>> We use:
>>> 
>>> Smalltalk windowLabel: 'Terf'
>>> 
>>> Doesn't seem to be in Squeak 4.3  but the included HostWindowPlugin appears
>>> to support it.
>> 
>> This is yet another primitive, independent of HostWindowPlugin.
>> 
>>> I added Andreas' code to Squeak 4.3 and it worked on Windows.  It probably
>>> works on Mac, doubt it works on Linux.
>> 
>> Works on Eliot's Mac VM, yes. Does it work in the Windows interpreter VM?
>> 
>> - Bert -
> 
> The alternative #primitiveSetWindowLabel is in the Cog branch only, and
> therefore is not be present in any of the interpreter VMs.
> 
> I can't recall if this was ever discussed on the vm-dev list, but I know
> that adding the primitive would require platform source changes for unix,
> Windows, Mac, and RiscOS. Somebody would need to actively make that happen.
> IMHO this is function is something better implemented in a plugin than
> in the main interpreter anyway, so I would prefer to just use the primitive
> that is already available in HostWindowPlugin.
> 
> Dave

+1

- Bert -

>> 
>>> 
>>> SmalltalkImage >> windowLabel: aString
>>> 	"Set the window label for the main Squeak window"
>>> 	^self primitiveWindowLabel: (aString ifNil:[''] ifNotNil:[aString
>>> squeakToUtf8])
>>> 
>>> SmalltalkImage >> primitiveWindowLabel: aString
>>> 	"Set the window label for the main Squeak window"
>>> 	<primitive: 'primitiveSetWindowLabel'>
>>> 	^nil
>>> 
>>> Hope that helps.
>>> 
>>> All the best,
>>> 
>>> Ron Teitelbaum
>>> Head Of Engineering
>>> 3d Immersive Collaboration Consulting
>>> ron at 3dicc.com
>>> Follow Me On Twitter: @RonTeitelbaum
>>> www.3dicc.com 
>>> 
>>> 
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
>>>> bounces at lists.squeakfoundation.org] On Behalf Of Bert Freudenberg
>>>> Sent: Thursday, January 10, 2013 10:16 PM
>>>> To: The general-purpose Squeak developers list
>>>> Subject: Re: [squeak-dev] How can the main window title in Squeak and
>>> Pharo
>>>> be set?
>>>> 
>>>> 
>>>> On 10.01.2013, at 18:18, tim Rowledge <tim at rowledge.org> wrote:
>>>> 
>>>>> 
>>>>> On 10-01-2013, at 6:07 PM, "Ron Teitelbaum" <ron at usmedrec.com> wrote:
>>>>> 
>>>>>> Hi Frank,
>>>>>> 
>>>>>> This might be really dumb but I set the window title in the ini file.
>>>>> 
>>>>> That's a way of doing it permanently; there's a similar option in the
>>> RISC OS
>>>> !run file.
>>>> 
>>>> There is no such option on the Mac or in the Unix VM.
>>>> 
>>>>> The HostWindow stuff depends on there being an actual HostWindowPlugin
>>>> installed that functions. I know it's there for RISC OS. I know it's
>>> likely there for
>>>> Mac. I think it's there for Windows; I'm fairly sure it isn't for unix.
>>>> 
>>>> 
>>>> For Unix (X11 specifically) there is just enough HostWindowPlugin stuff
>>>> implemented to be able to change the title and size of the main window.
>>> The
>>>> multi-window stuff is there as stubs.
>>>> 
>>>> - Bert -
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> - Bert -
>> 
>> 
> 





More information about the Squeak-dev mailing list