[Pharo-project] opening a text in a window
hi! Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows Is there a way to remove the syntax highlighting? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I got the same problem in the debugger :) May Alain save us again ^^ Ben On Aug 31, 2011, at 6:04 PM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Don't know if this helps: The workspace used by the help system to interactively edit the help texts allows deactivation of the syntax highlighting via the menu in the top right corner of the workspace. Max On 31.08.2011, at 18:04, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On 8/31/2011 11:04 AM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows
Is there a way to remove the syntax highlighting?
I have recently been using ws := Workspace openLabel: 'A Nice Label'. ws contents: '"', 'my contents', '"'. ie: wrapping the contents with doubles quotes which simply make the contents a comment in the workspace. This is what I noticed was being used for the workspaces opened in in new image. I do wish we had a simple text box to receive such content which was not necessarily meant for syntax highlighting. I am using Workspace in my situation to provide progress updates on background processes which take hours to accomplish their task. I don't know if any of the recent work towards improving Transcript helps here. For me I would want an independent Transcript which I label and control. Not the general Transcript. Hope this helps. Jimmie
Thanks for your help. Alexandre On 31 Aug 2011, at 14:15, Jimmie Houchin wrote:
On 8/31/2011 11:04 AM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Mail Attachment.png>
Is there a way to remove the syntax highlighting?
I have recently been using ws := Workspace openLabel: 'A Nice Label'. ws contents: '"', 'my contents', '"'.
ie: wrapping the contents with doubles quotes which simply make the contents a comment in the workspace.
This is what I noticed was being used for the workspaces opened in in new image.
I do wish we had a simple text box to receive such content which was not necessarily meant for syntax highlighting.
I am using Workspace in my situation to provide progress updates on background processes which take hours to accomplish their task.
I don't know if any of the recent work towards improving Transcript helps here. For me I would want an independent Transcript which I label and control. Not the general Transcript.
Hope this helps.
Jimmie
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Your welcome. I also just explored and learned this. I can also do this. tt := ThreadSafeTranscript new. tt openAsMorphLabel: 'My Transcript'. tt show: 'my content';cr. tt clear. tt show: 'my new content';cr. Seems to work as what I was originally hoping for. No syntax highlighting and no quoting as a comment required. Thought maybe this would be helpful to anyone in like situation. This is in a Pharo 1.3 image. Thanks. Jimmie On 8/31/2011 12:42 PM, Alexandre Bergel wrote:
Thanks for your help.
Alexandre
On 31 Aug 2011, at 14:15, Jimmie Houchin wrote:
On 8/31/2011 11:04 AM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Mail Attachment.png>
Is there a way to remove the syntax highlighting? I have recently been using ws := Workspace openLabel: 'A Nice Label'. ws contents: '"', 'my contents', '"'.
ie: wrapping the contents with doubles quotes which simply make the contents a comment in the workspace.
This is what I noticed was being used for the workspaces opened in in new image.
I do wish we had a simple text box to receive such content which was not necessarily meant for syntax highlighting.
I am using Workspace in my situation to provide progress updates on background processes which take hours to accomplish their task.
I don't know if any of the recent work towards improving Transcript helps here. For me I would want an independent Transcript which I label and control. Not the general Transcript.
Hope this helps.
Jimmie
(Workspace new contents: 'hello world') open opens without style hilite (it took me several minutes to figure out) this thing still severly broken.. for instance, why there is #contents: and #setContent: ?? Initially i tried to do: (Workspace openContents: 'hello world' ) textMorph beUnStyled as well as variations like: (Workspace openContents: 'hello world' ) toggleStylingActive but it has to effect. Broken, broken , broken. P.S. could someone explain me, why on Earth, a PluggableTextMorph has so much instance variables dedicated to styler: - nullStyler - shoutedStyler - styler - styled ??? isn't it a responsibility of an owner of morph to set a styler and based on what it sets (nil, null, shout or whatever else value) consider text as styled or not? Why on Earth, a PluggableTextMorph needs to care about it more than just having a 'styler' ivar? -- Best regards, Igor Stasenko AKA sig.
we are talking about 1.4 latest version. I integrated the fix of alain for shout. I'm waiting for doing the same for 1.3. But I was relunctant to do that one day before the release. I really do not like the release cycle of 1.3. Beta was ignored, RC was far too long, and now just before releasing we will touch 20 packages. Sure 100% safe and tested. So if it would be me I would not integrate any non showstopper fixes in 1.3 and work in 1.4 to get 1.4 out of the door for february. Stef On Aug 31, 2011, at 10:43 PM, Igor Stasenko wrote:
(Workspace new contents: 'hello world') open
opens without style hilite
(it took me several minutes to figure out) this thing still severly broken..
for instance, why there is #contents: and #setContent: ??
Initially i tried to do:
(Workspace openContents: 'hello world' ) textMorph beUnStyled
as well as variations like:
(Workspace openContents: 'hello world' ) toggleStylingActive
but it has to effect.
Broken, broken , broken.
P.S. could someone explain me, why on Earth, a PluggableTextMorph has so much instance variables dedicated to styler: - nullStyler - shoutedStyler - styler - styled
??? isn't it a responsibility of an owner of morph to set a styler and based on what it sets (nil, null, shout or whatever else value) consider text as styled or not? Why on Earth, a PluggableTextMorph needs to care about it more than just having a 'styler' ivar?
-- Best regards, Igor Stasenko AKA sig.
P.S. could someone explain me, why on Earth, a PluggableTextMorph has so much instance variables dedicated to styler: - nullStyler - shoutedStyler - styler - styled
??? isn't it a responsibility of an owner of morph to set a styler and based on what it sets (nil, null, shout or whatever else value) consider text as styled or not? Why on Earth, a PluggableTextMorph needs to care about it more than just having a 'styler' ivar?
See http://code.google.com/p/pharo/issues/detail?id=4609 -- Lukas Renggli www.lukas-renggli.ch
On 31 August 2011 23:55, Lukas Renggli <renggli@gmail.com> wrote:
P.S. could someone explain me, why on Earth, a PluggableTextMorph has so much instance variables dedicated to styler: - nullStyler - shoutedStyler - styler - styled
??? isn't it a responsibility of an owner of morph to set a styler and based on what it sets (nil, null, shout or whatever else value) consider text as styled or not? Why on Earth, a PluggableTextMorph needs to care about it more than just having a 'styler' ivar?
Yeah.. sorry for rant. I seen this topic, but never read inside of it. It was outside of my current interests, and i just saving time on reading stuff by ignoring it. Because it is really to much to read every day.
-- Lukas Renggli www.lukas-renggli.ch
-- Best regards, Igor Stasenko AKA sig.
In latest 1.4 wk := Workspace new. wk contents: 'lkhkhkjhkjh'. wk toggleStylingActive. wk open so I imagine easily that we can define a better creation method but this one is working well. Stef On Aug 31, 2011, at 6:04 PM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I've just found something funny: Workspace new isStylingActive => '<yes> syntax highlighting' ah ah ah Should't we expect true or false? http://code.google.com/p/pharo/issues/detail?id=4739 I am working right now on a new test: WorkspaceTest Cheers, Alexandre On 31 Aug 2011, at 17:45, Stéphane Ducasse wrote:
In latest 1.4
wk := Workspace new. wk contents: 'lkhkhkjhkjh'. wk toggleStylingActive. wk open
so I imagine easily that we can define a better creation method but this one is working well.
Stef
On Aug 31, 2011, at 6:04 PM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On 31 August 2011 23:45, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
In latest 1.4
wk := Workspace new. wk contents: 'lkhkhkjhkjh'. wk  toggleStylingActive. wk open
so I imagine easily that we can define a better creation method but this one is working well.
i tried in 1.3 image which i hastily found in one of my folders on my windows machine.i have no idea how dusty it is :)
Stef
On Aug 31, 2011, at 6:04 PM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace  openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko AKA sig.
I am working in a Pharo 1.3 image and this works well for me. ws := Workspace openLabel: 'my new workspace'. ws toggleStylingActive. ws contents: 'my new content'. I like opening with a descriptive label rather than just adding another "Workspace" window on my screen or on my tabs at the bottom. It helps to identify and find. I can refresh the contents with them remaining unstyled. From my experiments I have discovered that toggling from a styled state to an unstyled state is only successful if the contents are empty, ''. Toggling from an unstyled state to a styled state is always successful. I can do the below, executing each line at a time in sequence in a Workspace and it behaves like the comments on each line. r := Random new. ws := Workspace openLabel: 'my new workspace'. ws toggleStylingActive. " de-activates styling". ws contents: '"', r next asString, '"'. " no styling as expected". ws toggleStylingActive. " activates styling". ws contents: '"', r next asString, '"'. " styling changes as expected". ws toggleStylingActive. " de-activates styling". ws contents: '"', r next asString, '"'. " styling did not change, WHY??? ". ws contents: ''. ws contents: '"', r next asString, '"'. " styling changes" ws toggleStylingActive. " activates styling". ws contents: '"', r next asString, '"'. " styling changes". Strange behavior. Thanks for the information. Jimmie On 8/31/2011 3:45 PM, Stéphane Ducasse wrote:
In latest 1.4
wk := Workspace new. wk contents: 'lkhkhkjhkjh'. wk toggleStylingActive. wk open
so I imagine easily that we can define a better creation method but this one is working well.
Stef
On Aug 31, 2011, at 6:04 PM, Alexandre Bergel wrote:
hi!
Is there a way to open a text in a window in Pharo? Doing: Workspace openContents: 'hello world' shows <Screen Shot 2011-08-31 at 13.03.06.png>
Is there a way to remove the syntax highlighting?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
So what I learned waiting for the full explanation alain will nicely give us (thanks thanks thanks) The model of the widgets (yes the funky StringHolder is asked whether it should be styled or not) by invoking the method shoutAboutToStyle: shoutAboutToStyle: aPluggableShoutMorphOrView ^ self stylingActive Now I do not know more but soon will :)
:)) I'm documenting shout using (an help for the help browser + adding Shout-Examples with several examples). Now, maybe 1.3 should be fixed without this help and keep it for 1.4. Alain On 31/08/2011 22:48, Stéphane Ducasse wrote:
So what I learned waiting for the full explanation alain will nicely give us (thanks thanks thanks)
The model of the widgets (yes the funky StringHolder is asked whether it should be styled or not) by invoking the method shoutAboutToStyle:
shoutAboutToStyle: aPluggableShoutMorphOrView ^ self stylingActive
Now I do not know more but soon will :)
Ok for me where are the files for 1.3: the first slices? (not tagged for-14)? On Sep 3, 2011, at 10:28 AM, Alain Plantec wrote:
:)) I'm documenting shout using (an help for the help browser + adding Shout-Examples with several examples). Now, maybe 1.3 should be fixed without this help and keep it for 1.4. Alain On 31/08/2011 22:48, Stéphane Ducasse wrote:
So what I learned waiting for the full explanation alain will nicely give us (thanks thanks thanks)
The model of the widgets (yes the funky StringHolder is asked whether it should be styled or not) by invoking the method shoutAboutToStyle:
shoutAboutToStyle: aPluggableShoutMorphOrView ^ self stylingActive
Now I do not know more but soon will :)
participants (8)
-
Alain Plantec -
Alexandre Bergel -
Benjamin -
Igor Stasenko -
Jimmie Houchin -
Lukas Renggli -
Max Leske -
Stéphane Ducasse