Menu 'Help' / 'Useful expressions' text window --> workspace?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
Hello

I realize that when I choose the menu 'Help' / 'Useful expressions' I
get a editor window and not a workspace.

I think a workspace would be better.

And we need to test if really all the expressions there still work.

--Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Juan Vuletich-4
H. Hirzel wrote:

> Hello
>
> I realize that when I choose the menu 'Help' / 'Useful expressions' I
> get a editor window and not a workspace.
>
> I think a workspace would be better.
>
> And we need to test if really all the expressions there still work.
>
> --Hannes
>  

Yes, reviewing them would be a good service. Maybe we decide to
completely remove it... Anybody has suggestions on really useful
expressions to be included?

And yes, it should be a workspace!

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

garduino
Not that I've in mind at this moment, but a workspace with "Useful Expressions" is really useful :)

2013/1/2 Juan Vuletich <[hidden email]>
H. Hirzel wrote:
Hello

I realize that when I choose the menu 'Help' / 'Useful expressions' I
get a editor window and not a workspace.

I think a workspace would be better.

And we need to test if really all the expressions there still work.

--Hannes
 

Yes, reviewing them would be a good service. Maybe we decide to completely remove it... Anybody has suggestions on really useful expressions to be included?

And yes, it should be a workspace!

Cheers,
Juan Vuletich


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org




_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
At the moment I'd like to see some reporting snippets on classes and
categories. And loading scripts like the one you recently helped me
with, Juan.


| slash |
slash _ FileDirectory slash.
{
  'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
  'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
  'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
}
do:
[ :fileName | CodeFileBrowser installPackage:
                 (FileStream concreteStream readOnlyFileNamed: fileName)
]



And for example simple things like

SystemOrganization categories


BTW what is the difference between SystemOrganization  and
SystemOrganizer. Code snippets would be illustrative.

And our old friends which always give much discussions: Reading and
writing a text file (FileDirectory examples we recently had on the
Pharo list)

On 1/2/13, Germán Arduino <[hidden email]> wrote:

> Not that I've in mind at this moment, but a workspace with "Useful
> Expressions" is really useful :)
>
> 2013/1/2 Juan Vuletich <[hidden email]>
>
>> H. Hirzel wrote:
>>
>>> Hello
>>>
>>> I realize that when I choose the menu 'Help' / 'Useful expressions' I
>>> get a editor window and not a workspace.
>>>
>>> I think a workspace would be better.
>>>
>>> And we need to test if really all the expressions there still work.
>>>
>>> --Hannes
>>>
>>>
>>
>> Yes, reviewing them would be a good service. Maybe we decide to
>> completely
>> remove it... Anybody has suggestions on really useful expressions to be
>> included?
>>
>> And yes, it should be a workspace!
>>
>> Cheers,
>> Juan Vuletich
>>
>>
>> ______________________________**_________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
An example script

"To create a *.pck.st file for each category with tests afterwards to
remove these categories"

(SystemOrganization categoriesMatching: '*Test*')
        do: [ :cat | (CodePackage named: cat
                                createIfAbsent: true
                                registerIfNew: false) save.
                            SystemOrganization removeSystemCategory: cat.
         ]



On 1/2/13, H. Hirzel <[hidden email]> wrote:

> At the moment I'd like to see some reporting snippets on classes and
> categories. And loading scripts like the one you recently helped me
> with, Juan.
>
>
> | slash |
> slash _ FileDirectory slash.
> {
>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
> }
> do:
> [ :fileName | CodeFileBrowser installPackage:
>                  (FileStream concreteStream readOnlyFileNamed: fileName)
> ]
>
>
>
> And for example simple things like
>
> SystemOrganization categories
>
>
> BTW what is the difference between SystemOrganization  and
> SystemOrganizer. Code snippets would be illustrative.
>
> And our old friends which always give much discussions: Reading and
> writing a text file (FileDirectory examples we recently had on the
> Pharo list)
>
> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>> Not that I've in mind at this moment, but a workspace with "Useful
>> Expressions" is really useful :)
>>
>> 2013/1/2 Juan Vuletich <[hidden email]>
>>
>>> H. Hirzel wrote:
>>>
>>>> Hello
>>>>
>>>> I realize that when I choose the menu 'Help' / 'Useful expressions' I
>>>> get a editor window and not a workspace.
>>>>
>>>> I think a workspace would be better.
>>>>
>>>> And we need to test if really all the expressions there still work.
>>>>
>>>> --Hannes
>>>>
>>>>
>>>
>>> Yes, reviewing them would be a good service. Maybe we decide to
>>> completely
>>> remove it... Anybody has suggestions on really useful expressions to be
>>> included?
>>>
>>> And yes, it should be a workspace!
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>>
>>> ______________________________**_________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
Thank you Juan for adding my example script for unloading the tests.
This is surely something I will have forgotten in 4 weeks and it is
very handy to still have it then.

The other things are useful as well. In particular the expression for
finding method names. I am now used to the search box in Squeak and
have been missing this a lot.


    Symbol selectorsContaining: 'rsCon'.

is a useful workaround.


I copy in the content of the 'Useful expressions' workspace as it is
of now below.

I added comments and suggestions for more expressions (marked with >>>>>)

Kind regards
-- Hannes





"Querying the system"

SystemOrganization categories.
SystemOrganization categoryOfElement: #Morph.
Editor organization categoryOfElement: #clearSelection.


"find selectors"
Symbol selectorsContaining: 'rsCon'.
Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
internally and UTF8 externally"


"Example for loading an external package; adapt to your needs"

slash _ FileDirectory slash.
{
  'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
  'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
  'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
} do: [ :fileName | CodeFileBrowser installPackage:
        (FileStream concreteStream readOnlyFileNamed: fileName) ].


"To create a *.pck.st file for each category with tests and  then to
remove these categories"
(SystemOrganization categoriesMatching: '*Test*')
        do: [ :cat | (CodePackage named: cat
                                createIfAbsent: true
                                registerIfNew: false) save.
                        SystemOrganization removeSystemCategory: cat.
        ]


">>>> maybe add something more about CodePackages, e.g. list of
CodePackages which are not saved and save them in one go"


"Globals"
Cursor wait showWhile: [Sensor waitButton].


">>>> Display the list of Global Variables on the Transcript"



"Source code management"
ChangeList browseRecentLog.

">>>> maybe add something about CodePackages"


"Space and object count statistics"
Smalltalk bytesLeft asStringWithCommas.
Symbol instanceCount.

">>>> add calculation of the 10 Object types whose instances used most
of the space"



"Performance measurement"
Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
MessageTally spyOn: [Smalltalk allCallsOn: #asOop].


"Opening a Text editor"
'Something' editLabel: 'Title'.

">>>> opening a workspace"





On 1/2/13, H. Hirzel <[hidden email]> wrote:

> An example script
>
> "To create a *.pck.st file for each category with tests afterwards to
> remove these categories"
>
> (SystemOrganization categoriesMatching: '*Test*')
> do: [ :cat | (CodePackage named: cat
> createIfAbsent: true
> registerIfNew: false) save.
>    SystemOrganization removeSystemCategory: cat.
> ]
>
>
>
> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>> At the moment I'd like to see some reporting snippets on classes and
>> categories. And loading scripts like the one you recently helped me
>> with, Juan.
>>
>>
>> | slash |
>> slash _ FileDirectory slash.
>> {
>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>> }
>> do:
>> [ :fileName | CodeFileBrowser installPackage:
>>                  (FileStream concreteStream readOnlyFileNamed: fileName)
>> ]
>>
>>
>>
>> And for example simple things like
>>
>> SystemOrganization categories
>>
>>
>> BTW what is the difference between SystemOrganization  and
>> SystemOrganizer. Code snippets would be illustrative.
>>
>> And our old friends which always give much discussions: Reading and
>> writing a text file (FileDirectory examples we recently had on the
>> Pharo list)
>>
>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>> Not that I've in mind at this moment, but a workspace with "Useful
>>> Expressions" is really useful :)
>>>
>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>
>>>> H. Hirzel wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> I realize that when I choose the menu 'Help' / 'Useful expressions' I
>>>>> get a editor window and not a workspace.
>>>>>
>>>>> I think a workspace would be better.
>>>>>
>>>>> And we need to test if really all the expressions there still work.
>>>>>
>>>>> --Hannes
>>>>>
>>>>>
>>>>
>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>> completely
>>>> remove it... Anybody has suggestions on really useful expressions to be
>>>> included?
>>>>
>>>> And yes, it should be a workspace!
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>>>
>>>>
>>>> ______________________________**_________________
>>>> Cuis mailing list
>>>> [hidden email]
>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>
>>>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Juan Vuletich-4
Hi Hannes,

Just uploaded 3 new updates. The last one includes your updated text. I
added your requests, and a couple more I found.

BTW, remember that in Cuis you have World / Open / Message Names to look
for selectors!

Cheers,
Juan Vuletich

Ps. Too tired right now to upload an updated image... Please use the
change sets.

H. Hirzel wrote:

> Thank you Juan for adding my example script for unloading the tests.
> This is surely something I will have forgotten in 4 weeks and it is
> very handy to still have it then.
>
> The other things are useful as well. In particular the expression for
> finding method names. I am now used to the search box in Squeak and
> have been missing this a lot.
>
>
>     Symbol selectorsContaining: 'rsCon'.
>
> is a useful workaround.
>
>
> I copy in the content of the 'Useful expressions' workspace as it is
> of now below.
>
> I added comments and suggestions for more expressions (marked with >>>>>)
>
> Kind regards
> -- Hannes
>
>
>
>
>
> "Querying the system"
>
> SystemOrganization categories.
> SystemOrganization categoryOfElement: #Morph.
> Editor organization categoryOfElement: #clearSelection.
>
>
> "find selectors"
> Symbol selectorsContaining: 'rsCon'.
> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
> internally and UTF8 externally"
>
>
> "Example for loading an external package; adapt to your needs"
>
> slash _ FileDirectory slash.
> {
>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
> } do: [ :fileName | CodeFileBrowser installPackage:
> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>
>
> "To create a *.pck.st file for each category with tests and  then to
> remove these categories"
> (SystemOrganization categoriesMatching: '*Test*')
> do: [ :cat | (CodePackage named: cat
> createIfAbsent: true
> registerIfNew: false) save.
> SystemOrganization removeSystemCategory: cat.
> ]
>
>
> ">>>> maybe add something more about CodePackages, e.g. list of
> CodePackages which are not saved and save them in one go"
>
>
> "Globals"
> Cursor wait showWhile: [Sensor waitButton].
>
>
> ">>>> Display the list of Global Variables on the Transcript"
>
>
>
> "Source code management"
> ChangeList browseRecentLog.
>
> ">>>> maybe add something about CodePackages"
>
>
> "Space and object count statistics"
> Smalltalk bytesLeft asStringWithCommas.
> Symbol instanceCount.
>
> ">>>> add calculation of the 10 Object types whose instances used most
> of the space"
>
>
>
> "Performance measurement"
> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>
>
> "Opening a Text editor"
> 'Something' editLabel: 'Title'.
>
> ">>>> opening a workspace"
>
>
>
>
>
> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>  
>> An example script
>>
>> "To create a *.pck.st file for each category with tests afterwards to
>> remove these categories"
>>
>> (SystemOrganization categoriesMatching: '*Test*')
>> do: [ :cat | (CodePackage named: cat
>> createIfAbsent: true
>> registerIfNew: false) save.
>>    SystemOrganization removeSystemCategory: cat.
>> ]
>>
>>
>>
>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>    
>>> At the moment I'd like to see some reporting snippets on classes and
>>> categories. And loading scripts like the one you recently helped me
>>> with, Juan.
>>>
>>>
>>> | slash |
>>> slash _ FileDirectory slash.
>>> {
>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>> }
>>> do:
>>> [ :fileName | CodeFileBrowser installPackage:
>>>                  (FileStream concreteStream readOnlyFileNamed: fileName)
>>> ]
>>>
>>>
>>>
>>> And for example simple things like
>>>
>>> SystemOrganization categories
>>>
>>>
>>> BTW what is the difference between SystemOrganization  and
>>> SystemOrganizer. Code snippets would be illustrative.
>>>
>>> And our old friends which always give much discussions: Reading and
>>> writing a text file (FileDirectory examples we recently had on the
>>> Pharo list)
>>>
>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>      
>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>> Expressions" is really useful :)
>>>>
>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>
>>>>        
>>>>> H. Hirzel wrote:
>>>>>
>>>>>          
>>>>>> Hello
>>>>>>
>>>>>> I realize that when I choose the menu 'Help' / 'Useful expressions' I
>>>>>> get a editor window and not a workspace.
>>>>>>
>>>>>> I think a workspace would be better.
>>>>>>
>>>>>> And we need to test if really all the expressions there still work.
>>>>>>
>>>>>> --Hannes
>>>>>>
>>>>>>
>>>>>>            
>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>> completely
>>>>> remove it... Anybody has suggestions on really useful expressions to be
>>>>> included?
>>>>>
>>>>> And yes, it should be a workspace!
>>>>>
>>>>> Cheers,
>>>>> Juan Vuletich
>>>>>
>>>>>
>>>>> ______________________________**_________________
>>>>> Cuis mailing list
>>>>> [hidden email]
>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>
>>>>>          
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
Thank you, Juan,  for adding many new 'useful expressions'.

In particular this one is interesting
    "'Anaylize memory usage by class."
    (String streamContents: [ :strm | SpaceTally new
printSpaceAnalysis: 1 on: strm ]) edit.

for comment see new thread.

-- Hannes



On 1/4/13, Juan Vuletich <[hidden email]> wrote:

> Hi Hannes,
>
> Just uploaded 3 new updates. The last one includes your updated text. I
> added your requests, and a couple more I found.
>
> BTW, remember that in Cuis you have World / Open / Message Names to look
> for selectors!
>
> Cheers,
> Juan Vuletich
>
> Ps. Too tired right now to upload an updated image... Please use the
> change sets.
>
> H. Hirzel wrote:
>> Thank you Juan for adding my example script for unloading the tests.
>> This is surely something I will have forgotten in 4 weeks and it is
>> very handy to still have it then.
>>
>> The other things are useful as well. In particular the expression for
>> finding method names. I am now used to the search box in Squeak and
>> have been missing this a lot.
>>
>>
>>     Symbol selectorsContaining: 'rsCon'.
>>
>> is a useful workaround.
>>
>>
>> I copy in the content of the 'Useful expressions' workspace as it is
>> of now below.
>>
>> I added comments and suggestions for more expressions (marked with >>>>>)
>>
>> Kind regards
>> -- Hannes
>>
>>
>>
>>
>>
>> "Querying the system"
>>
>> SystemOrganization categories.
>> SystemOrganization categoryOfElement: #Morph.
>> Editor organization categoryOfElement: #clearSelection.
>>
>>
>> "find selectors"
>> Symbol selectorsContaining: 'rsCon'.
>> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
>> internally and UTF8 externally"
>>
>>
>> "Example for loading an external package; adapt to your needs"
>>
>> slash _ FileDirectory slash.
>> {
>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>> } do: [ :fileName | CodeFileBrowser installPackage:
>> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>>
>>
>> "To create a *.pck.st file for each category with tests and  then to
>> remove these categories"
>> (SystemOrganization categoriesMatching: '*Test*')
>> do: [ :cat | (CodePackage named: cat
>> createIfAbsent: true
>> registerIfNew: false) save.
>> SystemOrganization removeSystemCategory: cat.
>> ]
>>
>>
>> ">>>> maybe add something more about CodePackages, e.g. list of
>> CodePackages which are not saved and save them in one go"
>>
>>
>> "Globals"
>> Cursor wait showWhile: [Sensor waitButton].
>>
>>
>> ">>>> Display the list of Global Variables on the Transcript"
>>
>>
>>
>> "Source code management"
>> ChangeList browseRecentLog.
>>
>> ">>>> maybe add something about CodePackages"
>>
>>
>> "Space and object count statistics"
>> Smalltalk bytesLeft asStringWithCommas.
>> Symbol instanceCount.
>>
>> ">>>> add calculation of the 10 Object types whose instances used most
>> of the space"
>>
>>
>>
>> "Performance measurement"
>> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
>> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>>
>>
>> "Opening a Text editor"
>> 'Something' editLabel: 'Title'.
>>
>> ">>>> opening a workspace"
>>
>>
>>
>>
>>
>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>
>>> An example script
>>>
>>> "To create a *.pck.st file for each category with tests afterwards to
>>> remove these categories"
>>>
>>> (SystemOrganization categoriesMatching: '*Test*')
>>> do: [ :cat | (CodePackage named: cat
>>> createIfAbsent: true
>>> registerIfNew: false) save.
>>>    SystemOrganization removeSystemCategory: cat.
>>> ]
>>>
>>>
>>>
>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>
>>>> At the moment I'd like to see some reporting snippets on classes and
>>>> categories. And loading scripts like the one you recently helped me
>>>> with, Juan.
>>>>
>>>>
>>>> | slash |
>>>> slash _ FileDirectory slash.
>>>> {
>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>> }
>>>> do:
>>>> [ :fileName | CodeFileBrowser installPackage:
>>>>                  (FileStream concreteStream readOnlyFileNamed: fileName)
>>>> ]
>>>>
>>>>
>>>>
>>>> And for example simple things like
>>>>
>>>> SystemOrganization categories
>>>>
>>>>
>>>> BTW what is the difference between SystemOrganization  and
>>>> SystemOrganizer. Code snippets would be illustrative.
>>>>
>>>> And our old friends which always give much discussions: Reading and
>>>> writing a text file (FileDirectory examples we recently had on the
>>>> Pharo list)
>>>>
>>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>>
>>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>>> Expressions" is really useful :)
>>>>>
>>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>>
>>>>>
>>>>>> H. Hirzel wrote:
>>>>>>
>>>>>>
>>>>>>> Hello
>>>>>>>
>>>>>>> I realize that when I choose the menu 'Help' / 'Useful expressions' I
>>>>>>> get a editor window and not a workspace.
>>>>>>>
>>>>>>> I think a workspace would be better.
>>>>>>>
>>>>>>> And we need to test if really all the expressions there still work.
>>>>>>>
>>>>>>> --Hannes
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>>> completely
>>>>>> remove it... Anybody has suggestions on really useful expressions to
>>>>>> be
>>>>>> included?
>>>>>>
>>>>>> And yes, it should be a workspace!
>>>>>>
>>>>>> Cheers,
>>>>>> Juan Vuletich
>>>>>>
>>>>>>
>>>>>> ______________________________**_________________
>>>>>> Cuis mailing list
>>>>>> [hidden email]
>>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>>
>>>>>>
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
Hello Juan,

Another candidate code snippet I suggest to add

"taken from
http://wiki.squeak.org/squeak/52
works in Squeak but not in Cuis"

m := RectangleLikeMorph new.
m layoutPolicy: TableLayout new.
m listDirection: #leftToRight.
m hResizing: #shrinkWrap; vResizing: #shrinkWrap.
m layoutInset: 20; cellInset: 10.
4 timesRepeat:[ m addMorph: (RectangleMorph new color: (Color random)) ].
m openInWorld.


I think it would be good to include both, the not working Squeak
version and the fixed one for Cuis.

And may even put that into another help workspace so that we can add
more Morphic examples for people to learn quickly.

An extension from the example above could be to have 4 buttons and add
a label and block to each of them thus creating a launcher.

The Workspace may include as well suggestions which class comments to
consider for further reading.

Kind regards
Hannes

On 1/4/13, H. Hirzel <[hidden email]> wrote:

> Thank you, Juan,  for adding many new 'useful expressions'.
>
> In particular this one is interesting
>     "'Anaylize memory usage by class."
>     (String streamContents: [ :strm | SpaceTally new
> printSpaceAnalysis: 1 on: strm ]) edit.
>
> for comment see new thread.
>
> -- Hannes
>
>
>
> On 1/4/13, Juan Vuletich <[hidden email]> wrote:
>> Hi Hannes,
>>
>> Just uploaded 3 new updates. The last one includes your updated text. I
>> added your requests, and a couple more I found.
>>
>> BTW, remember that in Cuis you have World / Open / Message Names to look
>> for selectors!
>>
>> Cheers,
>> Juan Vuletich
>>
>> Ps. Too tired right now to upload an updated image... Please use the
>> change sets.
>>
>> H. Hirzel wrote:
>>> Thank you Juan for adding my example script for unloading the tests.
>>> This is surely something I will have forgotten in 4 weeks and it is
>>> very handy to still have it then.
>>>
>>> The other things are useful as well. In particular the expression for
>>> finding method names. I am now used to the search box in Squeak and
>>> have been missing this a lot.
>>>
>>>
>>>     Symbol selectorsContaining: 'rsCon'.
>>>
>>> is a useful workaround.
>>>
>>>
>>> I copy in the content of the 'Useful expressions' workspace as it is
>>> of now below.
>>>
>>> I added comments and suggestions for more expressions (marked with
>>> >>>>>)
>>>
>>> Kind regards
>>> -- Hannes
>>>
>>>
>>>
>>>
>>>
>>> "Querying the system"
>>>
>>> SystemOrganization categories.
>>> SystemOrganization categoryOfElement: #Morph.
>>> Editor organization categoryOfElement: #clearSelection.
>>>
>>>
>>> "find selectors"
>>> Symbol selectorsContaining: 'rsCon'.
>>> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
>>> internally and UTF8 externally"
>>>
>>>
>>> "Example for loading an external package; adapt to your needs"
>>>
>>> slash _ FileDirectory slash.
>>> {
>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>> } do: [ :fileName | CodeFileBrowser installPackage:
>>> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>>>
>>>
>>> "To create a *.pck.st file for each category with tests and  then to
>>> remove these categories"
>>> (SystemOrganization categoriesMatching: '*Test*')
>>> do: [ :cat | (CodePackage named: cat
>>> createIfAbsent: true
>>> registerIfNew: false) save.
>>> SystemOrganization removeSystemCategory: cat.
>>> ]
>>>
>>>
>>> ">>>> maybe add something more about CodePackages, e.g. list of
>>> CodePackages which are not saved and save them in one go"
>>>
>>>
>>> "Globals"
>>> Cursor wait showWhile: [Sensor waitButton].
>>>
>>>
>>> ">>>> Display the list of Global Variables on the Transcript"
>>>
>>>
>>>
>>> "Source code management"
>>> ChangeList browseRecentLog.
>>>
>>> ">>>> maybe add something about CodePackages"
>>>
>>>
>>> "Space and object count statistics"
>>> Smalltalk bytesLeft asStringWithCommas.
>>> Symbol instanceCount.
>>>
>>> ">>>> add calculation of the 10 Object types whose instances used most
>>> of the space"
>>>
>>>
>>>
>>> "Performance measurement"
>>> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
>>> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>>>
>>>
>>> "Opening a Text editor"
>>> 'Something' editLabel: 'Title'.
>>>
>>> ">>>> opening a workspace"
>>>
>>>
>>>
>>>
>>>
>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>
>>>> An example script
>>>>
>>>> "To create a *.pck.st file for each category with tests afterwards to
>>>> remove these categories"
>>>>
>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>> do: [ :cat | (CodePackage named: cat
>>>> createIfAbsent: true
>>>> registerIfNew: false) save.
>>>>    SystemOrganization removeSystemCategory: cat.
>>>> ]
>>>>
>>>>
>>>>
>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>
>>>>> At the moment I'd like to see some reporting snippets on classes and
>>>>> categories. And loading scripts like the one you recently helped me
>>>>> with, Juan.
>>>>>
>>>>>
>>>>> | slash |
>>>>> slash _ FileDirectory slash.
>>>>> {
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>>> }
>>>>> do:
>>>>> [ :fileName | CodeFileBrowser installPackage:
>>>>>                  (FileStream concreteStream readOnlyFileNamed:
>>>>> fileName)
>>>>> ]
>>>>>
>>>>>
>>>>>
>>>>> And for example simple things like
>>>>>
>>>>> SystemOrganization categories
>>>>>
>>>>>
>>>>> BTW what is the difference between SystemOrganization  and
>>>>> SystemOrganizer. Code snippets would be illustrative.
>>>>>
>>>>> And our old friends which always give much discussions: Reading and
>>>>> writing a text file (FileDirectory examples we recently had on the
>>>>> Pharo list)
>>>>>
>>>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>>>
>>>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>>>> Expressions" is really useful :)
>>>>>>
>>>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>>>
>>>>>>
>>>>>>> H. Hirzel wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Hello
>>>>>>>>
>>>>>>>> I realize that when I choose the menu 'Help' / 'Useful expressions'
>>>>>>>> I
>>>>>>>> get a editor window and not a workspace.
>>>>>>>>
>>>>>>>> I think a workspace would be better.
>>>>>>>>
>>>>>>>> And we need to test if really all the expressions there still work.
>>>>>>>>
>>>>>>>> --Hannes
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>>>> completely
>>>>>>> remove it... Anybody has suggestions on really useful expressions to
>>>>>>> be
>>>>>>> included?
>>>>>>>
>>>>>>> And yes, it should be a workspace!
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Juan Vuletich
>>>>>>>
>>>>>>>
>>>>>>> ______________________________**_________________
>>>>>>> Cuis mailing list
>>>>>>> [hidden email]
>>>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>>>
>>>>>>>
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
Juan,
And could we please have something like the following Squeak code


UpdatingStringMorph new
     target: [World activeHand position asString];
     getSelector: #value;
     stepTime: 10;
     openInWorld

By Bob Arning,
taken from http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167575.html

The Squeak code does not work in Cuis.

It gives a continuous display of the mouse position coordinates.

--HH

On 1/4/13, H. Hirzel <[hidden email]> wrote:

> Hello Juan,
>
> Another candidate code snippet I suggest to add
>
> "taken from
> http://wiki.squeak.org/squeak/52
> works in Squeak but not in Cuis"
>
> m := RectangleLikeMorph new.
> m layoutPolicy: TableLayout new.
> m listDirection: #leftToRight.
> m hResizing: #shrinkWrap; vResizing: #shrinkWrap.
> m layoutInset: 20; cellInset: 10.
> 4 timesRepeat:[ m addMorph: (RectangleMorph new color: (Color random)) ].
> m openInWorld.
>
>
> I think it would be good to include both, the not working Squeak
> version and the fixed one for Cuis.
>
> And may even put that into another help workspace so that we can add
> more Morphic examples for people to learn quickly.
>
> An extension from the example above could be to have 4 buttons and add
> a label and block to each of them thus creating a launcher.
>
> The Workspace may include as well suggestions which class comments to
> consider for further reading.
>
> Kind regards
> Hannes
>
> On 1/4/13, H. Hirzel <[hidden email]> wrote:
>> Thank you, Juan,  for adding many new 'useful expressions'.
>>
>> In particular this one is interesting
>>     "'Anaylize memory usage by class."
>>     (String streamContents: [ :strm | SpaceTally new
>> printSpaceAnalysis: 1 on: strm ]) edit.
>>
>> for comment see new thread.
>>
>> -- Hannes
>>
>>
>>
>> On 1/4/13, Juan Vuletich <[hidden email]> wrote:
>>> Hi Hannes,
>>>
>>> Just uploaded 3 new updates. The last one includes your updated text. I
>>> added your requests, and a couple more I found.
>>>
>>> BTW, remember that in Cuis you have World / Open / Message Names to look
>>> for selectors!
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> Ps. Too tired right now to upload an updated image... Please use the
>>> change sets.
>>>
>>> H. Hirzel wrote:
>>>> Thank you Juan for adding my example script for unloading the tests.
>>>> This is surely something I will have forgotten in 4 weeks and it is
>>>> very handy to still have it then.
>>>>
>>>> The other things are useful as well. In particular the expression for
>>>> finding method names. I am now used to the search box in Squeak and
>>>> have been missing this a lot.
>>>>
>>>>
>>>>     Symbol selectorsContaining: 'rsCon'.
>>>>
>>>> is a useful workaround.
>>>>
>>>>
>>>> I copy in the content of the 'Useful expressions' workspace as it is
>>>> of now below.
>>>>
>>>> I added comments and suggestions for more expressions (marked with
>>>> >>>>>)
>>>>
>>>> Kind regards
>>>> -- Hannes
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Querying the system"
>>>>
>>>> SystemOrganization categories.
>>>> SystemOrganization categoryOfElement: #Morph.
>>>> Editor organization categoryOfElement: #clearSelection.
>>>>
>>>>
>>>> "find selectors"
>>>> Symbol selectorsContaining: 'rsCon'.
>>>> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
>>>> internally and UTF8 externally"
>>>>
>>>>
>>>> "Example for loading an external package; adapt to your needs"
>>>>
>>>> slash _ FileDirectory slash.
>>>> {
>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>> } do: [ :fileName | CodeFileBrowser installPackage:
>>>> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>>>>
>>>>
>>>> "To create a *.pck.st file for each category with tests and  then to
>>>> remove these categories"
>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>> do: [ :cat | (CodePackage named: cat
>>>> createIfAbsent: true
>>>> registerIfNew: false) save.
>>>> SystemOrganization removeSystemCategory: cat.
>>>> ]
>>>>
>>>>
>>>> ">>>> maybe add something more about CodePackages, e.g. list of
>>>> CodePackages which are not saved and save them in one go"
>>>>
>>>>
>>>> "Globals"
>>>> Cursor wait showWhile: [Sensor waitButton].
>>>>
>>>>
>>>> ">>>> Display the list of Global Variables on the Transcript"
>>>>
>>>>
>>>>
>>>> "Source code management"
>>>> ChangeList browseRecentLog.
>>>>
>>>> ">>>> maybe add something about CodePackages"
>>>>
>>>>
>>>> "Space and object count statistics"
>>>> Smalltalk bytesLeft asStringWithCommas.
>>>> Symbol instanceCount.
>>>>
>>>> ">>>> add calculation of the 10 Object types whose instances used most
>>>> of the space"
>>>>
>>>>
>>>>
>>>> "Performance measurement"
>>>> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
>>>> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>>>>
>>>>
>>>> "Opening a Text editor"
>>>> 'Something' editLabel: 'Title'.
>>>>
>>>> ">>>> opening a workspace"
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>
>>>>> An example script
>>>>>
>>>>> "To create a *.pck.st file for each category with tests afterwards to
>>>>> remove these categories"
>>>>>
>>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>>> do: [ :cat | (CodePackage named: cat
>>>>> createIfAbsent: true
>>>>> registerIfNew: false) save.
>>>>>    SystemOrganization removeSystemCategory: cat.
>>>>> ]
>>>>>
>>>>>
>>>>>
>>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>>
>>>>>> At the moment I'd like to see some reporting snippets on classes and
>>>>>> categories. And loading scripts like the one you recently helped me
>>>>>> with, Juan.
>>>>>>
>>>>>>
>>>>>> | slash |
>>>>>> slash _ FileDirectory slash.
>>>>>> {
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>>>> }
>>>>>> do:
>>>>>> [ :fileName | CodeFileBrowser installPackage:
>>>>>>                  (FileStream concreteStream readOnlyFileNamed:
>>>>>> fileName)
>>>>>> ]
>>>>>>
>>>>>>
>>>>>>
>>>>>> And for example simple things like
>>>>>>
>>>>>> SystemOrganization categories
>>>>>>
>>>>>>
>>>>>> BTW what is the difference between SystemOrganization  and
>>>>>> SystemOrganizer. Code snippets would be illustrative.
>>>>>>
>>>>>> And our old friends which always give much discussions: Reading and
>>>>>> writing a text file (FileDirectory examples we recently had on the
>>>>>> Pharo list)
>>>>>>
>>>>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>>>>
>>>>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>>>>> Expressions" is really useful :)
>>>>>>>
>>>>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>>>>
>>>>>>>
>>>>>>>> H. Hirzel wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hello
>>>>>>>>>
>>>>>>>>> I realize that when I choose the menu 'Help' / 'Useful
>>>>>>>>> expressions'
>>>>>>>>> I
>>>>>>>>> get a editor window and not a workspace.
>>>>>>>>>
>>>>>>>>> I think a workspace would be better.
>>>>>>>>>
>>>>>>>>> And we need to test if really all the expressions there still
>>>>>>>>> work.
>>>>>>>>>
>>>>>>>>> --Hannes
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>>>>> completely
>>>>>>>> remove it... Anybody has suggestions on really useful expressions
>>>>>>>> to
>>>>>>>> be
>>>>>>>> included?
>>>>>>>>
>>>>>>>> And yes, it should be a workspace!
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Juan Vuletich
>>>>>>>>
>>>>>>>>
>>>>>>>> ______________________________**_________________
>>>>>>>> Cuis mailing list
>>>>>>>> [hidden email]
>>>>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>>>>
>>>>>>>>
>>>>
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> [hidden email]
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>>
>>>
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
In reply to this post by Hannes Hirzel
On 1/4/13, H. Hirzel <[hidden email]> wrote:

> Hello Juan,
>
> Another candidate code snippet I suggest to add
>
> "taken from
> http://wiki.squeak.org/squeak/52
> works in Squeak but not in Cuis"
>
> m := RectangleLikeMorph new.
> m layoutPolicy: TableLayout new.
> m listDirection: #leftToRight.
> m hResizing: #shrinkWrap; vResizing: #shrinkWrap.
> m layoutInset: 20; cellInset: 10.
> 4 timesRepeat:[ m addMorph: (RectangleMorph new color: (Color random)) ].
> m openInWorld.
>
>
> I think it would be good to include both, the not working Squeak
> version and the fixed one for Cuis.
>
> And may even put that into another help workspace so that we can add
> more Morphic examples for people to learn quickly.
>
> An extension from the example above could be to have 4 buttons and add
> a label and block to each of them thus creating a launcher.

To clarify: something like this...

label1 :=   'aaaa'.
label2 :=   'bbbb'.
label3 :=   'cccc'.
label4 :=   'dddd'.

block1 :=  [....].
block2 :=  [....].
block3 :=  [....].
block4 :=  [....].

code which creates a RectangleLikeMorph (or the subclass PasteUpMorph
or another one like a window?) which in turns has 4 buttons with the
labels and blocks attached ---> a launcher.


>
> The Workspace may include as well suggestions which class comments to
> consider for further reading.
>
> Kind regards
> Hannes
>
> On 1/4/13, H. Hirzel <[hidden email]> wrote:
>> Thank you, Juan,  for adding many new 'useful expressions'.
>>
>> In particular this one is interesting
>>     "'Anaylize memory usage by class."
>>     (String streamContents: [ :strm | SpaceTally new
>> printSpaceAnalysis: 1 on: strm ]) edit.
>>
>> for comment see new thread.
>>
>> -- Hannes
>>
>>
>>
>> On 1/4/13, Juan Vuletich <[hidden email]> wrote:
>>> Hi Hannes,
>>>
>>> Just uploaded 3 new updates. The last one includes your updated text. I
>>> added your requests, and a couple more I found.
>>>
>>> BTW, remember that in Cuis you have World / Open / Message Names to look
>>> for selectors!
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> Ps. Too tired right now to upload an updated image... Please use the
>>> change sets.
>>>
>>> H. Hirzel wrote:
>>>> Thank you Juan for adding my example script for unloading the tests.
>>>> This is surely something I will have forgotten in 4 weeks and it is
>>>> very handy to still have it then.
>>>>
>>>> The other things are useful as well. In particular the expression for
>>>> finding method names. I am now used to the search box in Squeak and
>>>> have been missing this a lot.
>>>>
>>>>
>>>>     Symbol selectorsContaining: 'rsCon'.
>>>>
>>>> is a useful workaround.
>>>>
>>>>
>>>> I copy in the content of the 'Useful expressions' workspace as it is
>>>> of now below.
>>>>
>>>> I added comments and suggestions for more expressions (marked with
>>>> >>>>>)
>>>>
>>>> Kind regards
>>>> -- Hannes
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Querying the system"
>>>>
>>>> SystemOrganization categories.
>>>> SystemOrganization categoryOfElement: #Morph.
>>>> Editor organization categoryOfElement: #clearSelection.
>>>>
>>>>
>>>> "find selectors"
>>>> Symbol selectorsContaining: 'rsCon'.
>>>> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
>>>> internally and UTF8 externally"
>>>>
>>>>
>>>> "Example for loading an external package; adapt to your needs"
>>>>
>>>> slash _ FileDirectory slash.
>>>> {
>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>> } do: [ :fileName | CodeFileBrowser installPackage:
>>>> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>>>>
>>>>
>>>> "To create a *.pck.st file for each category with tests and  then to
>>>> remove these categories"
>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>> do: [ :cat | (CodePackage named: cat
>>>> createIfAbsent: true
>>>> registerIfNew: false) save.
>>>> SystemOrganization removeSystemCategory: cat.
>>>> ]
>>>>
>>>>
>>>> ">>>> maybe add something more about CodePackages, e.g. list of
>>>> CodePackages which are not saved and save them in one go"
>>>>
>>>>
>>>> "Globals"
>>>> Cursor wait showWhile: [Sensor waitButton].
>>>>
>>>>
>>>> ">>>> Display the list of Global Variables on the Transcript"
>>>>
>>>>
>>>>
>>>> "Source code management"
>>>> ChangeList browseRecentLog.
>>>>
>>>> ">>>> maybe add something about CodePackages"
>>>>
>>>>
>>>> "Space and object count statistics"
>>>> Smalltalk bytesLeft asStringWithCommas.
>>>> Symbol instanceCount.
>>>>
>>>> ">>>> add calculation of the 10 Object types whose instances used most
>>>> of the space"
>>>>
>>>>
>>>>
>>>> "Performance measurement"
>>>> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
>>>> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>>>>
>>>>
>>>> "Opening a Text editor"
>>>> 'Something' editLabel: 'Title'.
>>>>
>>>> ">>>> opening a workspace"
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>
>>>>> An example script
>>>>>
>>>>> "To create a *.pck.st file for each category with tests afterwards to
>>>>> remove these categories"
>>>>>
>>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>>> do: [ :cat | (CodePackage named: cat
>>>>> createIfAbsent: true
>>>>> registerIfNew: false) save.
>>>>>    SystemOrganization removeSystemCategory: cat.
>>>>> ]
>>>>>
>>>>>
>>>>>
>>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>>
>>>>>> At the moment I'd like to see some reporting snippets on classes and
>>>>>> categories. And loading scripts like the one you recently helped me
>>>>>> with, Juan.
>>>>>>
>>>>>>
>>>>>> | slash |
>>>>>> slash _ FileDirectory slash.
>>>>>> {
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>>>> }
>>>>>> do:
>>>>>> [ :fileName | CodeFileBrowser installPackage:
>>>>>>                  (FileStream concreteStream readOnlyFileNamed:
>>>>>> fileName)
>>>>>> ]
>>>>>>
>>>>>>
>>>>>>
>>>>>> And for example simple things like
>>>>>>
>>>>>> SystemOrganization categories
>>>>>>
>>>>>>
>>>>>> BTW what is the difference between SystemOrganization  and
>>>>>> SystemOrganizer. Code snippets would be illustrative.
>>>>>>
>>>>>> And our old friends which always give much discussions: Reading and
>>>>>> writing a text file (FileDirectory examples we recently had on the
>>>>>> Pharo list)
>>>>>>
>>>>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>>>>
>>>>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>>>>> Expressions" is really useful :)
>>>>>>>
>>>>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>>>>
>>>>>>>
>>>>>>>> H. Hirzel wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hello
>>>>>>>>>
>>>>>>>>> I realize that when I choose the menu 'Help' / 'Useful
>>>>>>>>> expressions'
>>>>>>>>> I
>>>>>>>>> get a editor window and not a workspace.
>>>>>>>>>
>>>>>>>>> I think a workspace would be better.
>>>>>>>>>
>>>>>>>>> And we need to test if really all the expressions there still
>>>>>>>>> work.
>>>>>>>>>
>>>>>>>>> --Hannes
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>>>>> completely
>>>>>>>> remove it... Anybody has suggestions on really useful expressions
>>>>>>>> to
>>>>>>>> be
>>>>>>>> included?
>>>>>>>>
>>>>>>>> And yes, it should be a workspace!
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Juan Vuletich
>>>>>>>>
>>>>>>>>
>>>>>>>> ______________________________**_________________
>>>>>>>> Cuis mailing list
>>>>>>>> [hidden email]
>>>>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>>>>
>>>>>>>>
>>>>
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> [hidden email]
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>>
>>>
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Hannes Hirzel
And as we are at it a note where to add code to have an additional
WorldMenu (? is this the right expression) entry....

On 1/4/13, H. Hirzel <[hidden email]> wrote:

> On 1/4/13, H. Hirzel <[hidden email]> wrote:
>> Hello Juan,
>>
>> Another candidate code snippet I suggest to add
>>
>> "taken from
>> http://wiki.squeak.org/squeak/52
>> works in Squeak but not in Cuis"
>>
>> m := RectangleLikeMorph new.
>> m layoutPolicy: TableLayout new.
>> m listDirection: #leftToRight.
>> m hResizing: #shrinkWrap; vResizing: #shrinkWrap.
>> m layoutInset: 20; cellInset: 10.
>> 4 timesRepeat:[ m addMorph: (RectangleMorph new color: (Color random)) ].
>> m openInWorld.
>>
>>
>> I think it would be good to include both, the not working Squeak
>> version and the fixed one for Cuis.
>>
>> And may even put that into another help workspace so that we can add
>> more Morphic examples for people to learn quickly.
>>
>> An extension from the example above could be to have 4 buttons and add
>> a label and block to each of them thus creating a launcher.
>
> To clarify: something like this...
>
> label1 :=   'aaaa'.
> label2 :=   'bbbb'.
> label3 :=   'cccc'.
> label4 :=   'dddd'.
>
> block1 :=  [....].
> block2 :=  [....].
> block3 :=  [....].
> block4 :=  [....].
>
> code which creates a RectangleLikeMorph (or the subclass PasteUpMorph
> or another one like a window?) which in turns has 4 buttons with the
> labels and blocks attached ---> a launcher.
>
>
>>
>> The Workspace may include as well suggestions which class comments to
>> consider for further reading.
>>
>> Kind regards
>> Hannes
>>
>> On 1/4/13, H. Hirzel <[hidden email]> wrote:
>>> Thank you, Juan,  for adding many new 'useful expressions'.
>>>
>>> In particular this one is interesting
>>>     "'Anaylize memory usage by class."
>>>     (String streamContents: [ :strm | SpaceTally new
>>> printSpaceAnalysis: 1 on: strm ]) edit.
>>>
>>> for comment see new thread.
>>>
>>> -- Hannes
>>>
>>>
>>>
>>> On 1/4/13, Juan Vuletich <[hidden email]> wrote:
>>>> Hi Hannes,
>>>>
>>>> Just uploaded 3 new updates. The last one includes your updated text. I
>>>> added your requests, and a couple more I found.
>>>>
>>>> BTW, remember that in Cuis you have World / Open / Message Names to
>>>> look
>>>> for selectors!
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>>>
>>>> Ps. Too tired right now to upload an updated image... Please use the
>>>> change sets.
>>>>
>>>> H. Hirzel wrote:
>>>>> Thank you Juan for adding my example script for unloading the tests.
>>>>> This is surely something I will have forgotten in 4 weeks and it is
>>>>> very handy to still have it then.
>>>>>
>>>>> The other things are useful as well. In particular the expression for
>>>>> finding method names. I am now used to the search box in Squeak and
>>>>> have been missing this a lot.
>>>>>
>>>>>
>>>>>     Symbol selectorsContaining: 'rsCon'.
>>>>>
>>>>> is a useful workaround.
>>>>>
>>>>>
>>>>> I copy in the content of the 'Useful expressions' workspace as it is
>>>>> of now below.
>>>>>
>>>>> I added comments and suggestions for more expressions (marked with
>>>>> >>>>>)
>>>>>
>>>>> Kind regards
>>>>> -- Hannes
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Querying the system"
>>>>>
>>>>> SystemOrganization categories.
>>>>> SystemOrganization categoryOfElement: #Morph.
>>>>> Editor organization categoryOfElement: #clearSelection.
>>>>>
>>>>>
>>>>> "find selectors"
>>>>> Symbol selectorsContaining: 'rsCon'.
>>>>> Symbol selectorsContaining: 'iso8859'.    "Cuis uses iso885915
>>>>> internally and UTF8 externally"
>>>>>
>>>>>
>>>>> "Example for loading an external package; adapt to your needs"
>>>>>
>>>>> slash _ FileDirectory slash.
>>>>> {
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>>> } do: [ :fileName | CodeFileBrowser installPackage:
>>>>> (FileStream concreteStream readOnlyFileNamed: fileName) ].
>>>>>
>>>>>
>>>>> "To create a *.pck.st file for each category with tests and  then to
>>>>> remove these categories"
>>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>>> do: [ :cat | (CodePackage named: cat
>>>>> createIfAbsent: true
>>>>> registerIfNew: false) save.
>>>>> SystemOrganization removeSystemCategory: cat.
>>>>> ]
>>>>>
>>>>>
>>>>> ">>>> maybe add something more about CodePackages, e.g. list of
>>>>> CodePackages which are not saved and save them in one go"
>>>>>
>>>>>
>>>>> "Globals"
>>>>> Cursor wait showWhile: [Sensor waitButton].
>>>>>
>>>>>
>>>>> ">>>> Display the list of Global Variables on the Transcript"
>>>>>
>>>>>
>>>>>
>>>>> "Source code management"
>>>>> ChangeList browseRecentLog.
>>>>>
>>>>> ">>>> maybe add something about CodePackages"
>>>>>
>>>>>
>>>>> "Space and object count statistics"
>>>>> Smalltalk bytesLeft asStringWithCommas.
>>>>> Symbol instanceCount.
>>>>>
>>>>> ">>>> add calculation of the 10 Object types whose instances used most
>>>>> of the space"
>>>>>
>>>>>
>>>>>
>>>>> "Performance measurement"
>>>>> Time millisecondsToRun: [Smalltalk allCallsOn: #asOop].
>>>>> MessageTally spyOn: [Smalltalk allCallsOn: #asOop].
>>>>>
>>>>>
>>>>> "Opening a Text editor"
>>>>> 'Something' editLabel: 'Title'.
>>>>>
>>>>> ">>>> opening a workspace"
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>>
>>>>>> An example script
>>>>>>
>>>>>> "To create a *.pck.st file for each category with tests afterwards to
>>>>>> remove these categories"
>>>>>>
>>>>>> (SystemOrganization categoriesMatching: '*Test*')
>>>>>> do: [ :cat | (CodePackage named: cat
>>>>>> createIfAbsent: true
>>>>>> registerIfNew: false) save.
>>>>>>    SystemOrganization removeSystemCategory: cat.
>>>>>> ]
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 1/2/13, H. Hirzel <[hidden email]> wrote:
>>>>>>
>>>>>>> At the moment I'd like to see some reporting snippets on classes and
>>>>>>> categories. And loading scripts like the one you recently helped me
>>>>>>> with, Juan.
>>>>>>>
>>>>>>>
>>>>>>> | slash |
>>>>>>> slash _ FileDirectory slash.
>>>>>>> {
>>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitParser.pck' .
>>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTests.pck' .
>>>>>>>   'packages', slash, 'PetitParser', slash, 'PetitTutorial.pck'
>>>>>>> }
>>>>>>> do:
>>>>>>> [ :fileName | CodeFileBrowser installPackage:
>>>>>>>                  (FileStream concreteStream readOnlyFileNamed:
>>>>>>> fileName)
>>>>>>> ]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> And for example simple things like
>>>>>>>
>>>>>>> SystemOrganization categories
>>>>>>>
>>>>>>>
>>>>>>> BTW what is the difference between SystemOrganization  and
>>>>>>> SystemOrganizer. Code snippets would be illustrative.
>>>>>>>
>>>>>>> And our old friends which always give much discussions: Reading and
>>>>>>> writing a text file (FileDirectory examples we recently had on the
>>>>>>> Pharo list)
>>>>>>>
>>>>>>> On 1/2/13, Germán Arduino <[hidden email]> wrote:
>>>>>>>
>>>>>>>> Not that I've in mind at this moment, but a workspace with "Useful
>>>>>>>> Expressions" is really useful :)
>>>>>>>>
>>>>>>>> 2013/1/2 Juan Vuletich <[hidden email]>
>>>>>>>>
>>>>>>>>
>>>>>>>>> H. Hirzel wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hello
>>>>>>>>>>
>>>>>>>>>> I realize that when I choose the menu 'Help' / 'Useful
>>>>>>>>>> expressions'
>>>>>>>>>> I
>>>>>>>>>> get a editor window and not a workspace.
>>>>>>>>>>
>>>>>>>>>> I think a workspace would be better.
>>>>>>>>>>
>>>>>>>>>> And we need to test if really all the expressions there still
>>>>>>>>>> work.
>>>>>>>>>>
>>>>>>>>>> --Hannes
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Yes, reviewing them would be a good service. Maybe we decide to
>>>>>>>>> completely
>>>>>>>>> remove it... Anybody has suggestions on really useful expressions
>>>>>>>>> to
>>>>>>>>> be
>>>>>>>>> included?
>>>>>>>>>
>>>>>>>>> And yes, it should be a workspace!
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Juan Vuletich
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ______________________________**_________________
>>>>>>>>> Cuis mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Cuis mailing list
>>>>> [hidden email]
>>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Cuis mailing list
>>>> [hidden email]
>>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>>
>>>
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Juan Vuletich-4
In reply to this post by Hannes Hirzel
Added it. Feel free to enhance as you wish...

Cheers,
Juan Vuletich

H. Hirzel wrote:

> On 1/4/13, H. Hirzel <[hidden email]> wrote:
>  
>> Hello Juan,
>>
>> Another candidate code snippet I suggest to add
>>
>> "taken from
>> http://wiki.squeak.org/squeak/52
>> works in Squeak but not in Cuis"
>>
>> m := RectangleLikeMorph new.
>> m layoutPolicy: TableLayout new.
>> m listDirection: #leftToRight.
>> m hResizing: #shrinkWrap; vResizing: #shrinkWrap.
>> m layoutInset: 20; cellInset: 10.
>> 4 timesRepeat:[ m addMorph: (RectangleMorph new color: (Color random)) ].
>> m openInWorld.
>>
>>
>> I think it would be good to include both, the not working Squeak
>> version and the fixed one for Cuis.
>>
>> And may even put that into another help workspace so that we can add
>> more Morphic examples for people to learn quickly.
>>
>> An extension from the example above could be to have 4 buttons and add
>> a label and block to each of them thus creating a launcher.
>>    
>
> To clarify: something like this...
>
> label1 :=   'aaaa'.
> label2 :=   'bbbb'.
> label3 :=   'cccc'.
> label4 :=   'dddd'.
>
> block1 :=  [....].
> block2 :=  [....].
> block3 :=  [....].
> block4 :=  [....].
>
> code which creates a RectangleLikeMorph (or the subclass PasteUpMorph
> or another one like a window?) which in turns has 4 buttons with the
> labels and blocks attached ---> a launcher.
>
>
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Menu 'Help' / 'Useful expressions' text window --> workspace?

Juan Vuletich-4
In reply to this post by Hannes Hirzel
Hi Hannes,

I added UpdatingStringMorph to be compatible with Squeak's. The Squeak
code works now.

Cheers,
Juan Vuletich

H. Hirzel wrote:

> Juan,
> And could we please have something like the following Squeak code
>
>
> UpdatingStringMorph new
>      target: [World activeHand position asString];
>      getSelector: #value;
>      stepTime: 10;
>      openInWorld
>
> By Bob Arning,
> taken from http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167575.html
>
> The Squeak code does not work in Cuis.
>
> It gives a continuous display of the mouse position coordinates.
>
> --HH
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org