Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

In the long run, every program becomes rococco, and then rubble. -- Alan Perlis


programming / comp.lang.smalltalk.dolphin / Re: StatusBar - how to display a string?

SubjectAuthor
* StatusBar - how to display a string?F Bek
`* Re: StatusBar - how to display a string?john.a...@gmail.com
 `* Re: StatusBar - how to display a string?F Bek
  `* Re: StatusBar - how to display a string?john.a...@gmail.com
   `* Re: StatusBar - how to display a string?F Bek
    `* Re: StatusBar - how to display a string?john.a...@gmail.com
     `* Re: StatusBar - how to display a string?F Bek
      `* Re: StatusBar - how to display a string?john.a...@gmail.com
       `- Re: StatusBar - how to display a string?F Bek

1
Subject: StatusBar - how to display a string?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 18 Feb 2021 01:16 UTC
X-Received: by 2002:ac8:1208:: with SMTP id x8mr2160080qti.14.1613610972395;
Wed, 17 Feb 2021 17:16:12 -0800 (PST)
X-Received: by 2002:aca:b254:: with SMTP id b81mr1107779oif.20.1613610971958;
Wed, 17 Feb 2021 17:16:11 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 17 Feb 2021 17:16:11 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.145.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.145.136
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
Subject: StatusBar - how to display a string?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Thu, 18 Feb 2021 01:16:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 18 Feb 2021 16:54 UTC
References: 1
X-Received: by 2002:a05:6214:76f:: with SMTP id f15mr5028640qvz.56.1613667293103; Thu, 18 Feb 2021 08:54:53 -0800 (PST)
X-Received: by 2002:a9d:4d10:: with SMTP id n16mr3506417otf.342.1613667292885; Thu, 18 Feb 2021 08:54:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 18 Feb 2021 08:54:52 -0800 (PST)
In-Reply-To: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Thu, 18 Feb 2021 16:54:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 25
View all headers
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John



On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 18 Feb 2021 23:07 UTC
References: 1 2
X-Received: by 2002:ac8:7c9c:: with SMTP id y28mr6490354qtv.193.1613689662610;
Thu, 18 Feb 2021 15:07:42 -0800 (PST)
X-Received: by 2002:aca:2208:: with SMTP id b8mr4774992oic.131.1613689662344;
Thu, 18 Feb 2021 15:07:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Thu, 18 Feb 2021 15:07:42 -0800 (PST)
In-Reply-To: <069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.145.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.145.136
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com> <069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Thu, 18 Feb 2021 23:07:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either...  Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair..

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 19 Feb 2021 09:53 UTC
References: 1 2 3
X-Received: by 2002:ae9:ef8d:: with SMTP id d135mr8461118qkg.0.1613728383892;
Fri, 19 Feb 2021 01:53:03 -0800 (PST)
X-Received: by 2002:a4a:a105:: with SMTP id i5mr6340266ool.54.1613728383578;
Fri, 19 Feb 2021 01:53:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 19 Feb 2021 01:53:03 -0800 (PST)
In-Reply-To: <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
<069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Fri, 19 Feb 2021 09:53:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

    ^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

    super onViewOpened.
    (self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

    self barModel value: 'hello'

HTH.

John


On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 20 Feb 2021 00:54 UTC
References: 1 2 3 4
X-Received: by 2002:ac8:604a:: with SMTP id k10mr11273832qtm.178.1613782498270;
Fri, 19 Feb 2021 16:54:58 -0800 (PST)
X-Received: by 2002:a9d:4d10:: with SMTP id n16mr8698809otf.342.1613782498028;
Fri, 19 Feb 2021 16:54:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Fri, 19 Feb 2021 16:54:57 -0800 (PST)
In-Reply-To: <df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.79.145.136; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 80.79.145.136
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
<069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
<df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Sat, 20 Feb 2021 00:54:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 109
View all headers
I tried the ValueHolder way and it kinda worked, but with some weird side effects: 

 First - the main view just remembered that it should be transparent, and as it was drawn on the screen, the main view background just disappeared and became a screen shot to whatever was below it on the desktop, albeit with a bit of scaling up. But when instruction <self barModel value: 'hello'> was commented out, this effect disappeared, and the view background returned to the default white. And when the <isTransparent> property was set to 'false' in 'View Composer', the effect disappeared also - fair game, as this should have been set to 'false' in the first place? But then, why only now?

 Second - the Status Bar doesn't only show the string, in this case ( hello ), but it precedes it with the symbol ( 'U' ), which is Dolphin's class icon for UTF-encoded strings. And, after a few trials, it seems that whatever the displayed object is (Float, Integer, Point, etc.), it is always preceded by its class icon - not really the desired effect. I didn't find a fix for this yet!

What am I doing wrong?

______________________________________

On Friday, February 19, 2021 at 11:53:04 AM UTC+2, john.a...@gmail.com wrote:
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

super onViewOpened.
(self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

self barModel value: 'hello'

HTH.

John
On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 10:35 UTC
References: 1 2 3 4 5
X-Received: by 2002:a05:620a:16d5:: with SMTP id a21mr10046208qkn.418.1613990135654;
Mon, 22 Feb 2021 02:35:35 -0800 (PST)
X-Received: by 2002:aca:908:: with SMTP id 8mr11396400oij.80.1613990135454;
Mon, 22 Feb 2021 02:35:35 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 02:35:35 -0800 (PST)
In-Reply-To: <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
<069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
<df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com> <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c3dee8cd-c6b7-4110-b300-425e0b5abb66n@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Mon, 22 Feb 2021 10:35:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
I'm not sure what's happening with the transparency issue, but you can get rid of the icon by setting the StatusBarItem's getImageBlock to nil.

On Saturday, February 20, 2021 at 12:54:58 AM UTC, fbek...@gmail.com wrote:
I tried the ValueHolder way and it kinda worked, but with some weird side effects:

First - the main view just remembered that it should be transparent, and as it was drawn on the screen, the main view background just disappeared and became a screen shot to whatever was below it on the desktop, albeit with a bit of scaling up. But when instruction <self barModel value: 'hello'> was commented out, this effect disappeared, and the view background returned to the default white. And when the <isTransparent> property was set to 'false' in 'View Composer', the effect disappeared also - fair game, as this should have been set to 'false' in the first place? But then, why only now?

Second - the Status Bar doesn't only show the string, in this case ( hello ), but it precedes it with the symbol ( 'U' ), which is Dolphin's class icon for UTF-encoded strings. And, after a few trials, it seems that whatever the displayed object is (Float, Integer, Point, etc.), it is always preceded by its class icon - not really the desired effect. I didn't find a fix for this yet!

What am I doing wrong?

______________________________________
On Friday, February 19, 2021 at 11:53:04 AM UTC+2, john.a...@gmail.com wrote:
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

super onViewOpened.
(self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

self barModel value: 'hello'

HTH.

John
On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 14:05 UTC
References: 1 2 3 4 5 6
X-Received: by 2002:ae9:ef8d:: with SMTP id d135mr20809992qkg.0.1614002706072;
Mon, 22 Feb 2021 06:05:06 -0800 (PST)
X-Received: by 2002:a9d:560c:: with SMTP id e12mr16750091oti.21.1614002705847;
Mon, 22 Feb 2021 06:05:05 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 06:05:05 -0800 (PST)
In-Reply-To: <c3dee8cd-c6b7-4110-b300-425e0b5abb66n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=194.126.5.145; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 194.126.5.145
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
<069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
<df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com> <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com>
<c3dee8cd-c6b7-4110-b300-425e0b5abb66n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f86865f9-f262-41bf-8a7f-04b43e5e89d9n@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Mon, 22 Feb 2021 14:05:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Indeed, setting 'getImageBlock' to 'nil' resolved the issue. I've included that in the <onViewOpened > method (couldn't find a way to do it in View Composer):
    (self view viewNamed: 'bar') model: self barModel ; getImageBlock: nil ..

I'll leave the transparency issue for now, until I (re)check a few more issues...

Thanks and best regards,
FB
----------------------------------------
On Monday, February 22, 2021 at 12:35:36 PM UTC+2, john.a...@gmail.com wrote:
I'm not sure what's happening with the transparency issue, but you can get rid of the icon by setting the StatusBarItem's getImageBlock to nil.
On Saturday, February 20, 2021 at 12:54:58 AM UTC, fbek...@gmail.com wrote:
I tried the ValueHolder way and it kinda worked, but with some weird side effects:

First - the main view just remembered that it should be transparent, and as it was drawn on the screen, the main view background just disappeared and became a screen shot to whatever was below it on the desktop, albeit with a bit of scaling up. But when instruction <self barModel value: 'hello'> was commented out, this effect disappeared, and the view background returned to the default white. And when the <isTransparent> property was set to 'false' in 'View Composer', the effect disappeared also - fair game, as this should have been set to 'false' in the first place? But then, why only now?

Second - the Status Bar doesn't only show the string, in this case ( hello ), but it precedes it with the symbol ( 'U' ), which is Dolphin's class icon for UTF-encoded strings. And, after a few trials, it seems that whatever the displayed object is (Float, Integer, Point, etc.), it is always preceded by its class icon - not really the desired effect. I didn't find a fix for this yet!

What am I doing wrong?

______________________________________
On Friday, February 19, 2021 at 11:53:04 AM UTC+2, john.a...@gmail.com wrote:
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

super onViewOpened.
(self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

self barModel value: 'hello'

HTH.

John
On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail..com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: john.a...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 14:44 UTC
References: 1 2 3 4 5 6 7
X-Received: by 2002:a0c:f80a:: with SMTP id r10mr5208293qvn.55.1614005061281; Mon, 22 Feb 2021 06:44:21 -0800 (PST)
X-Received: by 2002:a05:6808:130d:: with SMTP id y13mr15748463oiv.167.1614005060992; Mon, 22 Feb 2021 06:44:20 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 06:44:20 -0800 (PST)
In-Reply-To: <f86865f9-f262-41bf-8a7f-04b43e5e89d9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.203.71.185; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.71.185
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com> <069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com> <df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com> <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com> <c3dee8cd-c6b7-4110-b300-425e0b5abb66n@googlegroups.com> <f86865f9-f262-41bf-8a7f-04b43e5e89d9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6e4e3bfc-fb2e-43df-8cd8-1a0ec7e1c7e9n@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: john.asp...@gmail.com (john.a...@gmail.com)
Injection-Date: Mon, 22 Feb 2021 14:44:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 137
View all headers
(couldn't find a way to do it in View Composer):

Either double-click the item, change the code to nil and click the green tick, or just right-click the item and select 'Set to Nil'

Cheers.

John


On Monday, February 22, 2021 at 2:05:06 PM UTC, fbek...@gmail.com wrote:
Indeed, setting 'getImageBlock' to 'nil' resolved the issue. I've included that in the <onViewOpened > method (couldn't find a way to do it in View Composer):
(self view viewNamed: 'bar') model: self barModel ; getImageBlock: nil .

I'll leave the transparency issue for now, until I (re)check a few more issues...

Thanks and best regards,
FB
----------------------------------------
On Monday, February 22, 2021 at 12:35:36 PM UTC+2, john.a...@gmail.com wrote:
I'm not sure what's happening with the transparency issue, but you can get rid of the icon by setting the StatusBarItem's getImageBlock to nil.
On Saturday, February 20, 2021 at 12:54:58 AM UTC, fbek...@gmail.com wrote:
I tried the ValueHolder way and it kinda worked, but with some weird side effects:

First - the main view just remembered that it should be transparent, and as it was drawn on the screen, the main view background just disappeared and became a screen shot to whatever was below it on the desktop, albeit with a bit of scaling up. But when instruction <self barModel value: 'hello'> was commented out, this effect disappeared, and the view background returned to the default white. And when the <isTransparent> property was set to 'false' in 'View Composer', the effect disappeared also - fair game, as this should have been set to 'false' in the first place? But then, why only now?

Second - the Status Bar doesn't only show the string, in this case ( hello ), but it precedes it with the symbol ( 'U' ), which is Dolphin's class icon for UTF-encoded strings. And, after a few trials, it seems that whatever the displayed object is (Float, Integer, Point, etc.), it is always preceded by its class icon - not really the desired effect. I didn't find a fix for this yet!

What am I doing wrong?

______________________________________
On Friday, February 19, 2021 at 11:53:04 AM UTC+2, john.a...@gmail.com wrote:
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

super onViewOpened.
(self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

self barModel value: 'hello'

HTH.

John
On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail..com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


Subject: Re: StatusBar - how to display a string?
From: F Bek
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 17:57 UTC
References: 1 2 3 4 5 6 7 8
X-Received: by 2002:a05:620a:294a:: with SMTP id n10mr9640576qkp.496.1614016666058;
Mon, 22 Feb 2021 09:57:46 -0800 (PST)
X-Received: by 2002:a9d:6e02:: with SMTP id e2mr16747376otr.347.1614016665793;
Mon, 22 Feb 2021 09:57:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 22 Feb 2021 09:57:45 -0800 (PST)
In-Reply-To: <6e4e3bfc-fb2e-43df-8cd8-1a0ec7e1c7e9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=194.126.5.145; posting-account=5ZCy9QoAAAAoNnwHIxbmglmR4vxJHcnW
NNTP-Posting-Host: 194.126.5.145
References: <605ef755-5fdb-4e4b-be7a-5d1f7c055d04n@googlegroups.com>
<069f76a9-f3b0-4364-9621-ab0ee54bf6d8n@googlegroups.com> <08c06981-f630-45a6-acb2-2320fe8bb8afn@googlegroups.com>
<df0bb474-a941-4842-85df-f9e9caa77c8dn@googlegroups.com> <746d15b4-7023-4dcb-83bd-d81ef72c838bn@googlegroups.com>
<c3dee8cd-c6b7-4110-b300-425e0b5abb66n@googlegroups.com> <f86865f9-f262-41bf-8a7f-04b43e5e89d9n@googlegroups.com>
<6e4e3bfc-fb2e-43df-8cd8-1a0ec7e1c7e9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e86330e4-a0c1-4f42-9c5f-1347e9a09596n@googlegroups.com>
Subject: Re: StatusBar - how to display a string?
From: fbekd...@gmail.com (F Bek)
Injection-Date: Mon, 22 Feb 2021 17:57:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Of course! I don't know how I missed that, though I tried. This time, it worked.

Thanks & regards,
FB
_____________________________________

On Monday, February 22, 2021 at 4:44:22 PM UTC+2, john.a...@gmail.com wrote:
(couldn't find a way to do it in View Composer):
Either double-click the item, change the code to nil and click the green tick, or just right-click the item and select 'Set to Nil'

Cheers.

John
On Monday, February 22, 2021 at 2:05:06 PM UTC, fbek...@gmail.com wrote:
Indeed, setting 'getImageBlock' to 'nil' resolved the issue. I've included that in the <onViewOpened > method (couldn't find a way to do it in View Composer):
(self view viewNamed: 'bar') model: self barModel ; getImageBlock: nil ..

I'll leave the transparency issue for now, until I (re)check a few more issues...

Thanks and best regards,
FB
----------------------------------------
On Monday, February 22, 2021 at 12:35:36 PM UTC+2, john.a...@gmail.com wrote:
I'm not sure what's happening with the transparency issue, but you can get rid of the icon by setting the StatusBarItem's getImageBlock to nil.
On Saturday, February 20, 2021 at 12:54:58 AM UTC, fbek...@gmail.com wrote:
I tried the ValueHolder way and it kinda worked, but with some weird side effects:

First - the main view just remembered that it should be transparent, and as it was drawn on the screen, the main view background just disappeared and became a screen shot to whatever was below it on the desktop, albeit with a bit of scaling up. But when instruction <self barModel value: 'hello'> was commented out, this effect disappeared, and the view background returned to the default white. And when the <isTransparent> property was set to 'false' in 'View Composer', the effect disappeared also - fair game, as this should have been set to 'false' in the first place? But then, why only now?

Second - the Status Bar doesn't only show the string, in this case ( hello ), but it precedes it with the symbol ( 'U' ), which is Dolphin's class icon for UTF-encoded strings. And, after a few trials, it seems that whatever the displayed object is (Float, Integer, Point, etc.), it is always preceded by its class icon - not really the desired effect. I didn't find a fix for this yet!

What am I doing wrong?

______________________________________
On Friday, February 19, 2021 at 11:53:04 AM UTC+2, john.a...@gmail.com wrote:
Try:

(self view viewNamed: 'bar') model value: 'xyz'

You can decouple the direct reference to the view by creating your own ValueModel (held in an inst var) and assigning this to the item, then addressing updates to the model, e.g.

barModel

^barModel ifNil: [barModel := ValueHolder new]

onViewOpened

super onViewOpened.
(self view viewNamed: 'bar') model: self barModel

You should then be able to update the status bar item via the model, e.g.

self barModel value: 'hello'

HTH.

John
On Thursday, February 18, 2021 at 11:07:43 PM UTC, fbek...@gmail.com wrote:
Thanks John,
Indeed, StatusBar comes with one (StatusBarItem) and following your message, I added another one for the sake of trying, named it 'bar' and adjusted its (width) from the default (-1) to say (120) so the box extent and separators are clearly visible.

I am still stuck on trying to communicate anything with it: trying, from within <onViewOpened> the following: (self view viewNamed: 'bar') text: 'xyz' or #value: both selectors produce a 'not understood' error, while #displayString: 'xyz' doesn't produce an error but doesn't produce a result either.. Is there a missing step to designate it as text box first (or icon, button, image, or anything else)?

Do I have to drop a (TextEdit) on top of it? which I have done and, in the hierarchy tree, it shows as a child to the (StatusBar). But then, I am communicating with the (TextEdit), which has its own 'name', and not with the (StatusBarItem), which doesn't seem to do much, but looks like a decorator only!?

It seems like I am missing on the main concept here. Any further clarifications would be much appreciated.
FB
___________________
On Thursday, February 18, 2021 at 6:54:53 PM UTC+2, john.a...@gmail.com wrote:
Hi FB,

You can add individual fields (StatusBarItems) to a StatusBar in the View Composer - look for its 'items' aspect, you add/edit/remove/reorder items in the same way as a ListView's columns.

If you name the StatusBarItems you can then either address them directly via their name (self view viewNamed: 'barItem'), or create a correspondingly-named TextPresenter and use them like a 'normal' text view/presenter pair.

Hope this helps.

John
On Thursday, February 18, 2021 at 1:16:12 AM UTC, fbek...@gmail.com wrote:
Beginner's question
Dolphin Smalltalk 7.2.6

How do you get the Status Bar to display a string?

I can communicate with the Status Bar from a Presenter with say <(self view viewNamed: 'bar')>, but how do I get it to display anything, and update itself? Both #value: and #text: are not understood.

And more generally, how do I add items to the StatusBar and use them?

Thanks for reading and eventually answering.
FB

___________________________________________


1
rocksolid light 0.7.2
clearneti2ptor