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
___________________________________________
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
___________________________________________
Thanks John,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)?
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
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
___________________________________________
Try: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)?
(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
doesn't seem to do much, but looks like a decorator only!?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
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
___________________________________________
I tried the ValueHolder way and it kinda worked, but with some weird side effects: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 -
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
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.
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)?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
doesn't seem to do much, but looks like a decorator only!?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
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
___________________________________________
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.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 -
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
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!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 (
visible.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
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)?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
doesn't seem to do much, but looks like a decorator only!?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
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
___________________________________________
(couldn't find a way to do it in View Composer):
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):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 -
(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
(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!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
visible.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
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)?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'
which doesn't seem to do much, but looks like a decorator only!?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),
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
___________________________________________
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(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.
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!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
visible.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
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)?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'
which doesn't seem to do much, but looks like a decorator only!?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),
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
___________________________________________
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 70:28:47 |
Calls: | 6,656 |
Calls today: | 2 |
Files: | 12,200 |
Messages: | 5,332,151 |
Posted today: | 1 |