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

Frank Church vfclists at gmail.com
Fri Jan 11 01:26:33 UTC 2013


On 10 January 2013 18:56, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 10.01.2013, at 10:39, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>
>> Bert,
>> you can add the answer on SO too :)
>>
>> Nicolas
>
> Ok. Would be helpful if people linked to the Stack Overflow question if they ask by email, too.
>
> - Bert -
>
>

I have tried them both in Squeak 4.3 but they don't work.

DisplayScreen hostWindowTitle: 'My Title'.  -> hostWindowTitle Unknown
selector error.

HostWindowProxy basicNew primitiveWindowTitle: 1 string: 'My Title'
squeakToUtf8 -> results in Unknown variable HostWindowProxy

In Pharo:

DisplayScreen hostWindowTitle: 'My Title'. -> no error message but no effect.

HostWindowProxy basicNew primitiveWindowTitle: 1 string: 'My Title'
squeakToUtf8 -> MNU: ByteString >> squeakToUtf8

When I remove the squeakToUtf8 at the end - ie:

HostWindowProxy basicNew primitiveWindowTitle: 1 string: 'My Title' ->
Error: Unable to set title of Host Window

In fact that is the actual code in

primitiveWindowTitle: id string: titleString
"Set the label of the title bar of the window"
	<primitive: 'primitiveHostWindowTitle' module: 'HostWindowPlugin'>
	^self error: 'Unable to set title of Host Window'

HostWindowProxy basicNew primitiveWindowTitle: 1 string: 'My Title'

-- 
Frank Church

=======================
http://devblog.brahmancreations.com


More information about the Squeak-dev mailing list