In the yesterday fix in Pier, Lukas corrected the syntax error
PRStriketroughFormat to PRStrikethroughFormat. Like the PUSecurity
filtering proposed by Lukas in this thread, the following short script
could help anyone who's got a kernel with the old format:
| a f index |
#(#PRStriketroughFormat #PRStrikethroughFormat )
pairsDo: [:badGroup :newGroup | PRDocumentGroup
allSubInstancesDo: [:e |
f := e children.
index := 0.
[(index := index + 1) <= f size]
whileTrue: [a := f at: index.
a class isOsbolete
ifTrue:
[('*' , badGroup asString match: a class asString)
ifTrue:
[f at: index
put; ((Smalltalk at: newGroup
ifAbsent: [PRParagraph]) new setChildren: a children copy)]]]]]
"end of script"
I hope Lukas will add those kind of messages to permutate the obsolete
PRFormat (even if it's happened one time).
Cheers,
--
Martial
Martial Boniou a écrit :
| Lukas Renggli a écrit :
| | > | > I found that the PUSecurity instances maintain the Settings in the
| | > | > arrays
| | > | > #ownerPermissions and #groupPermissions. How can I remove them
| | > in each
| | > | > decorations ?
| | > |
| | > | Did you try something like?
| | > |
| | > | PUSecurity allInstancesDo: [ :e | e remove ]
| | >
| | > That's what I just was doing. Unfortunately it's the only way for
| | > instance.
| |
| | That would be preserve all the security settings ...
| |
| | PUSecurity allInstancesDo: [ :e |
| | e ownerPermissions: (e ownerPermissions
| | reject: [ :f | f command isObsolete ]).
| | e groupPermissions: (e groupPermissions
| | reject: [ :f | f command isObsolete ]).
| | e otherPermissions: (e otherPermissions
| | reject: [ :f | f command isObsolete ]).
| |
|
| That works.
| I was searching a thing like that. One must add a "f command isNil" to
| filter all bad built PUPermission. Maybe it would be cool to add such a
| test for each Pier upgrade. I did this:
|
| (PUSecurity instVarNames
| select: [:p | '*Permissions' match: p])
| do: [:me | PUSecurity allInstancesDo: [:ea |
| ea perform: (me , ':') asSymbol
| with: ((ea perform: me asSymbol) reject:
| [:c | c command isNil or:
| [c command isObsolete]])]].
|
| Thanks,
|
| --
| Martial
|
| | Lukas
| |
| | --
| | Lukas Renggli
| |
http://www.lukas-renggli.ch
| |
| |
| |
| | _______________________________________________
| | SmallWiki, Magritte, Pier and Related Tools ...
| |
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
|
|
| _______________________________________________
| SmallWiki, Magritte, Pier and Related Tools ...
|
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
|