PRComponentSettings disappeared and...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

PRComponentSettings disappeared and...

Martial Boniou
Hi,

I am a bit lost since the PRComponentSettings vanished in Pier. Actually
I cannot export/import my old kernels because of an obsolete PRComponentSettings.
I think there is a way to remove the PRComponentSettings use in my
kernels but I don't know how to find/do this. Everytime a big change is
made, it could be nice to go thru the Instances of PRKernel to change
things (even if I know it's a lot of work).

Regards,

--
Martial


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and...

Martial Boniou
I found that the PUSecurity instances maintain the Settings in the arrays
#ownerPermissions and #groupPermissions. How can I remove them in each
decorations ?

--
Martial

Martial Boniou a écrit :
| Hi,
|
| I am a bit lost since the PRComponentSettings vanished in Pier. Actually
| I cannot export/import my old kernels because of an obsolete PRComponentSettings.
| I think there is a way to remove the PRComponentSettings use in my
| kernels but I don't know how to find/do this. Everytime a big change is
| made, it could be nice to go thru the Instances of PRKernel to change
| things (even if I know it's a lot of work).
|
| Regards,
|
| --
| Martial
|
|
| _______________________________________________
| 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
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and...

Lukas Renggli-2
> 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 ]

This resets just all the security settings. I am sure one could think  
of something more sophisticated that would just fix the obsolete  
references.

Lukas




>
> --
> Martial
>
> Martial Boniou a écrit :
> | Hi,
> |
> | I am a bit lost since the PRComponentSettings vanished in Pier.  
> Actually
> | I cannot export/import my old kernels because of an obsolete  
> PRComponentSettings.
> | I think there is a way to remove the PRComponentSettings use in my
> | kernels but I don't know how to find/do this. Everytime a big  
> change is
> | made, it could be nice to go thru the Instances of PRKernel to  
> change
> | things (even if I know it's a lot of work).
> |
> | Regards,
> |
> | --
> | Martial
> |
> |
> | _______________________________________________
> | 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
>

--
Lukas Renggli
http://www.lukas-renggli.ch




_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and...

Martial Boniou
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.

--
Martial

|
| This resets just all the security settings. I am sure one could think  
| of something more sophisticated that would just fix the obsolete  
| references.
|
| Lukas
|
|
|
|
| >
| > --
| > Martial
| >
| > Martial Boniou a écrit :
| > | Hi,
| > |
| > | I am a bit lost since the PRComponentSettings vanished in Pier.  
| > Actually
| > | I cannot export/import my old kernels because of an obsolete  
| > PRComponentSettings.
| > | I think there is a way to remove the PRComponentSettings use in my
| > | kernels but I don't know how to find/do this. Everytime a big  
| > change is
| > | made, it could be nice to go thru the Instances of PRKernel to  
| > change
| > | things (even if I know it's a lot of work).
| > |
| > | Regards,
| > |
| > | --
| > | Martial
| > |
| > |
| > | _______________________________________________
| > | 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
| >
|
| --
| 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
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and...

Lukas Renggli-2
> | > 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 ]).

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and...

Martial Boniou
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
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and... PRStriketroughFormat is obsolete

Martial Boniou
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
|


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PRComponentSettings disappeared and... PRStriketroughFormat is obsolete

Lukas Renggli-2
> 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"

Sometimes I need to change things like that. Unfortunately MC does  
not track class renames, therefor this problem. Thanks for the  
script. I now wonder how we could collect such scripts so that they  
get executed if necessary?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki