[Cuis-dev] TheCuisBook > Daily Workflow example code issues

Hilaire Fernandes hfern at free.fr
Sun Mar 19 08:39:58 PDT 2023


It is likely the Preferences error was causing a compilation error, so 
the script can't be executed.

Check out the attached scripts because it works for me.

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230319/2119c278/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: startIDE.sh
Type: application/x-shellscript
Size: 242 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230319/2119c278/attachment.bin>
-------------- next part --------------
| list area morph extent |
"Report by any mean error"
Transcript
   showOnDisplay: false;
   logToFile: true;
   logToStdout: true.
"Smalltalk at: #LogStartupDebugAids put: true."
"Install change set"
ChangeSet installNewUpdates.
"System configurations"
Utilities setAuthorName: 'Hilaire Fernandes' initials: 'hlsf'.
Preferences at: #logDebuggerStackToFile put: true.
Preferences at: #autoNumberUserChanges put: false.
"Install DrGeo code"
Feature require: #'DrGeo'.
Feature require: #'DrGeoFrench'.
"Delete all windows but the taskbar"
self runningWorld doOneCycleNow.
list := UISupervisor ui submorphs reject: [:aMorph | aMorph is: #TaskbarMorph].
 list do: [:each | each delete].
"Adjust font size"
Preferences at: #guiElementsSize put: #smallFonts.
"Adjust taskbar size"
morph := UISupervisor ui taskbar.
morph scale: 1/2.
Display fullScreenMode: true.
self runningWorld doOneCycleNow.
"Compute the available free space for windows placement"
area _ RealEstateAgent maximumUsableArea extendBy: 0 @ morph morphHeight negated.
extent _ area extent // 2.
"Open a few System Browsers"
BrowserWindow openBrowser 
	morphPosition: 0 at 0;
	morphExtent: extent.
BrowserWindow openBrowser 
	morphPosition: area width // 2 @ 0; 
	morphExtent: extent.
"Open a System Browser on a specific class"
morph _ BrowserWindow openBrowser 
	morphPosition: area extent // 2;
	morphExtent: extent.
morph model setClass: (Smalltalk at: #DrGeo) selector: nil.
"Open a Workspace with some default contents"
morph _ Workspace openWorkspace.
morph model actualContents: 'ChangeSet installNewUpdates.
DrGeoSystem beDevelopment.
DrGeoSystem beWorkstation.
DrGeo new.
NaturalLanguageTranslator privateStartUp .
TextDomainManager registerCategoryPrefix: ''DrGeo'' domain: ''drgeo''.
TextDomainManager allKnownDomains.
DrGSmalltalkSketchBrowser open: DrGeoSystem smalltalkSketchesPath label: ''Browse''.
DrGSmalltalkSketchEditor open: ''DrGeoSketch new'' label: ''Edit Smalltalk Sketch''.
PreferenceBrowser open: DrGeoSystem preferences label: ''Dr. Geo Preferences''.
Smalltalk browseAllSelect: [:m| m pragmas anySatisfy: [:p | p key = #drgeosettings]].
GetTextExporter exportTemplate.'.
morph 
	morphPosition: 0 @ (area height // 2);
	morphExtent: extent x @ (2 / 3 * extent y).
"Open a transcript for logs"
TranscriptWindow openTranscript 
	morphPosition: 0 @ (area height // 2 + (2 / 3 * extent y));
	morphExtent: extent x @ (1 / 3 * extent y ).
Smalltalk saveImage


More information about the Cuis-dev mailing list