Skip to content

Instantly share code, notes, and snippets.

v := RTView new.
"o := TRAnnouncingOverseer new.
v canvas eventOverseer: o.
o announcer inspect."
droppable := RTBox new
size: 300;
borderColor: Color black;
elementOn: 'drop here'.
@peteruhnak
peteruhnak / selectors.txt
Created September 14, 2016 11:27
Pharo UIManager API notes
abort:
abort:title:
alert:
alert:title:
confirm:
confirm:label:
* label is actually a title, returns true/false
confirm:orCancel:
* the same, except returns the result of cancelBlock
confirm:trueChoice:falseChoice:
@peteruhnak
peteruhnak / assign-reifs.png
Last active September 14, 2016 11:30
MetaLinks notes
assign-reifs.png
@peteruhnak
peteruhnak / psh
Created February 12, 2016 23:11
pharo-scripting
#!/bin/sh
# place me in $PATH
set -e
if [ -z "$1" ]; then
echo "Missing script file"
exit 1
fi
@peteruhnak
peteruhnak / Pharo diffs without FileTree metadata.js
Last active September 14, 2016 11:31
Removes all diffs that are not .st or README.md file changes.
javascript:(function()%7Bif (window.location.href.match(%2Fhttps%3A%5C%2F%5C%2Fgithub.com%2F)) %7B %24('div.file-header').filter('%3Anot(%5Bdata-path%24%3D".st"%5D)').filter('%3Anot(%5Bdata-path%24%3D"README.md"%5D)').parent().toggle()%3B %7D%7D)()
@peteruhnak
peteruhnak / Roassal questions.md
Last active September 14, 2016 11:37
Roassal questions

Roassal questions

Q: What is the exact difference between Equidistant and Weighted layouts?

Q: Why is RTHorizontalFlowLayout named horizontal, if it flows in columns from top to bottom?

My expectation (and Kilon's as well) is that the name should be based on elements flow. So since elements in RTHorizontalFlowLayout flow from top to bottom, RTVerticalFlowLayout seems more correct.

For comparision:

"For more than 1 depth stencilling (form with alpha for example). use rule 37"
| stencil blitter output color |
color := Color orange.
stencil := Form extent: 32@32 depth: 32.
(FormCanvas on: stencil)
fillOval: (1@1 corner: 31@31)
color: (Color white alpha: 0.5)

lockSurfaces.st#L68

sourceHandle := interpreterProxy fetchInteger: FormBitsIndex ofObject: sourceForm.

The above returns 0 just before the crash; the surface was NOT GCed however.

sourceForm was retrieved from here loadBitBltFrom.warping..st

sourceForm := interpreterProxy fetchPointer: BBSourceFormIndex ofObject: bitBltOop.

1 to: 100 do: [ :o |
'log.txt' asFileReference
writeStreamDo: [ :stream |
stream
setToEnd;
nextPutAll: 'o(';
nextPutAll: o asString;
nextPutAll: ')';
crlf ].
@peteruhnak
peteruhnak / RPackage-pseudo-docs.md
Last active June 25, 2017 15:50
Pharo RPackage pseudo-docs

Packages RPackage

Retrieving existing package by name

  • 'MyPackage' asPackage
  • RPackage organizer packageNamed: 'MyPackage'

Create package

  • (RPackage named: 'MyPackage') register