Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.383.mcz
==================== Summary ====================
Name: Tests-mt.383
Author: mt
Time: 18 September 2017, 11:43:21.93578 am
UUID: a6f43f48-58a8-774e-8ad4-3b102f1fda9d
Ancestors: Tests-mt.382
Adds and fixes tests considering that current UI themes do not have to be registered such as in test code.
=============== Diff against Tests-mt.382 ===============
Item was changed:
----- Method: UserInterfaceThemeTest>>test27ScopeIntegrity (in category 'tests') -----
test27ScopeIntegrity
"If application code manages to use Object >> #userInterfaceTheme without invoking the DNU dispatch directly afterwards, the theme's scope might get inconsistent. Even though this should usually never happen, check for it to be sure."
| issues |
issues := OrderedCollection new.
UserInterfaceTheme allThemes do: [:uit |
(uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]].
+ UserInterfaceTheme current in: [:uit |
+ (UserInterfaceTheme allThemes includes: uit)
+ ifFalse: [(uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]]].
self assert: issues isEmpty description: 'Some user interface themes have an inconsistent scope state, which can interfere with GC.'.!
Item was added:
+ ----- Method: UserInterfaceThemeTest>>test28DanglingTheme (in category 'tests') -----
+ test28DanglingTheme
+
+ self
+ assert: (UserInterfaceTheme allThemes includes: UserInterfaceTheme current)
+ description: 'The current user interface theme is not registered.'.!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.382.mcz
==================== Summary ====================
Name: Tests-mt.382
Author: mt
Time: 18 September 2017, 9:24:02.443429 am
UUID: e9db6354-5602-3d4a-b944-ad65501bad8d
Ancestors: Tests-eem.381
Adds a test to verify the integrity of the environment's user interface themes wrt. scope.
=============== Diff against Tests-eem.381 ===============
Item was added:
+ ----- Method: UserInterfaceThemeTest>>test27ScopeIntegrity (in category 'tests') -----
+ test27ScopeIntegrity
+ "If application code manages to use Object >> #userInterfaceTheme without invoking the DNU dispatch directly afterwards, the theme's scope might get inconsistent. Even though this should usually never happen, check for it to be sure."
+
+ | issues |
+ issues := OrderedCollection new.
+ UserInterfaceTheme allThemes do: [:uit |
+ (uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]].
+ self assert: issues isEmpty description: 'Some user interface themes have an inconsistent scope state, which can interfere with GC.'.!
I just did a quick search on the web and it seems like ASN.1 has a
UTF8String type (with tag 12) that just contains the sequence of bytes of
the UTF-8-encoded string. Can you use that? See also this question on
stackoverflow: https://stackoverflow.com/q/28929809
In Squeak, you can convert between UTF-8-encoded byte strings and decoded
(Squeak-encoded) character strings with the help of UTF8TextConverter. Have
a look at its class-side methods. Also, there are conversion methods in
String, IIRC. Try to filter its instance-side methods by "utf8".
Does this answer your question or are you in search of something else?
Kind regards,
Jakob
Am 18.09.2017 03:49 schrieb "Alan Pinch" <alan.c.pinch(a)gmail.com>:
> I am trying to map utf8 into an ASN1 encoding, where the UTF8 is
> specified to perhaps extend past one byte in value. I am also interested
> in retaining this UTF8 characters in squeak to interoperate well. What
> would be my best approach to this, mapping to/from these bytes on a stream?
>
> Alan
>
>
>
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.382.mcz
==================== Summary ====================
Name: Tests-mt.382
Author: mt
Time: 18 September 2017, 9:24:02.443429 am
UUID: e9db6354-5602-3d4a-b944-ad65501bad8d
Ancestors: Tests-eem.381
Adds a test to verify the integrity of the environment's user interface themes wrt. scope.
=============== Diff against Tests-eem.381 ===============
Item was added:
+ ----- Method: UserInterfaceThemeTest>>test27ScopeIntegrity (in category 'tests') -----
+ test27ScopeIntegrity
+ "If application code manages to use Object >> #userInterfaceTheme without invoking the DNU dispatch directly afterwards, the theme's scope might get inconsistent. Even though this should usually never happen, check for it to be sure."
+
+ | issues |
+ issues := OrderedCollection new.
+ UserInterfaceTheme allThemes do: [:uit |
+ (uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]].
+ self assert: issues isEmpty description: 'Some user interface themes have an inconsistent scope state, which can interfere with GC.'.!
David T. Lewis uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-dtl.768.mcz
==================== Summary ====================
Name: Tools-dtl.768
Author: dtl
Time: 16 September 2017, 9:40:44.948741 pm
UUID: a6a1ba7b-4614-46de-974b-41ced829733d
Ancestors: Tools-dtl.767
Fix comments
=============== Diff against Tools-dtl.767 ===============
Item was changed:
----- Method: ObjectExplorer>>copyName (in category 'menus - actions') -----
copyName
+ "Copy the name of the current variable, so the user can paste it into the window below and work with it."
- "Copy the name of the current variable, so the user can paste it into the window below and work with is."
Clipboard clipboardText: self currentSelection key. !
Item was changed:
----- Method: ObjectExplorer>>copyValue (in category 'menus - actions') -----
copyValue
+ "Copy a description of the value of the current variable, so the user can paste it into the window below and work with it."
- "Copy the name of the current variable, so the user can paste it into the window below and work with is."
Clipboard clipboardText: self currentSelection value asStringOrText. !
David T. Lewis uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-dtl.767.mcz
==================== Summary ====================
Name: Tools-dtl.767
Author: dtl
Time: 16 September 2017, 8:52:24.336542 pm
UUID: a4cda952-0952-4ecf-a895-0fa604787356
Ancestors: Tools-cbc.766
For ObjectExplorer>>copyValue, use #asStringOrText to ensure that the value can be copied to the clipboard.
=============== Diff against Tools-cbc.766 ===============
Item was changed:
----- Method: ObjectExplorer>>copyValue (in category 'menus - actions') -----
copyValue
"Copy the name of the current variable, so the user can paste it into the window below and work with is."
+ Clipboard clipboardText: self currentSelection value asStringOrText. !
- Clipboard clipboardText: self currentSelection value. !
David T. Lewis uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cbc.766.mcz
==================== Summary ====================
Name: Tools-cbc.766
Author: cbc
Time: 15 September 2017, 1:32:51.722459 pm
UUID: 7fd4bc5e-35b0-954e-91f3-a1cd65adee00
Ancestors: Tools-eem.765
For Explorers, add a menu item 'Copy value' (similar to Copy name) that copies the value of the selected item, suitable for use elsewhere.
=============== Diff against Tools-eem.765 ===============
Item was added:
+ ----- Method: ObjectExplorer>>copyValue (in category 'menus - actions') -----
+ copyValue
+ "Copy the name of the current variable, so the user can paste it into the window below and work with is."
+
+ Clipboard clipboardText: self currentSelection value. !
Item was changed:
----- Method: ObjectExplorer>>mainTreeListMenu: (in category 'menus') -----
mainTreeListMenu: aMenu
<treeListMenu>
aMenu addStayUpItemSpecial.
aMenu addList: #(
('inspect (i)' inspectSelection)
('explore (I)' exploreSelection)
-
('method refs to this inst var' referencesToSelection)
('methods storing into this inst var' defsOfSelection)
('objects pointing to this value' objectReferencesToSelection)
('chase pointers' chasePointersForSelection)
('explore pointers' explorePointersForSelection)
-
('browse full (b)' browseFull)
('browse class' browseClass)
('browse hierarchy (h)' classHierarchy)
('browse protocol (p)' browseFullProtocol)
-
('references... (r)' browseVariableReferences)
('assignments... (a)' browseVariableAssignments)
('class refs (N)' browseClassRefs)
-
('copy name (c)' copyName)
+ ('copy value' copyValue)
('basic inspect' inspectBasic)).
Smalltalk isMorphic ifTrue: [
aMenu addList: #(
-
('viewer for this value (v)' viewerForValue))].
aMenu addList: #(
-
('monitor changes' monitorSelection)).
monitorList isEmptyOrNil ifFalse: [
aMenu addList: #(
('stop monitoring all' stopMonitoring))].
^ aMenu!