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

H. Hirzel hannes.hirzel at gmail.com
Thu Jan 3 15:56:00 CST 2013


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 <hannes.hirzel at gmail.com> 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 <hannes.hirzel at gmail.com> 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 <garduino at gmail.com> wrote:
>>> Not that I've in mind at this moment, but a workspace with "Useful
>>> Expressions" is really useful :)
>>>
>>> 2013/1/2 Juan Vuletich <juan at jvuletich.org>
>>>
>>>> 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
>>>> Cuis at jvuletich.org
>>>> http://jvuletich.org/mailman/**listinfo/cuis_jvuletich.org<http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org>
>>>>
>>>
>>
>




More information about the Cuis mailing list