Store: how to delete Pkg version ?

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

Store: how to delete Pkg version ?

Mark Pirogovsky-3
Hello All,

By accident I have created whole bunch of new packages and bundles for
my application.  Is there any easy and safe way to delete the latest
versions of those packages and bundle from our repository ?

TIA

--Mark

P.S. my VW version is 7.3.1

Reply | Threaded
Open this post in threaded view
|

AW: Store: how to delete Pkg version ?

Georg Heeg
Mark,

Bless them "broken" and run the Store Garbage Collector.

Georg

-----Ursprüngliche Nachricht-----
Von: Mark Pirogovsky [mailto:[hidden email]]
Gesendet: Montag, 6. Februar 2006 09:36
An: Vwnc
Betreff: Store: how to delete Pkg version ?

Hello All,

By accident I have created whole bunch of new packages and bundles for
my application.  Is there any easy and safe way to delete the latest
versions of those packages and bundle from our repository ?

TIA

--Mark

P.S. my VW version is 7.3.1


Reply | Threaded
Open this post in threaded view
|

Re: AW: Store: how to delete Pkg version ?

Mark Pirogovsky-3
Great,
DO you know how safe that is ?

--Mark

Georg Heeg wrote:

> Mark,
>
> Bless them "broken" and run the Store Garbage Collector.
>
> Georg
>
> -----Ursprüngliche Nachricht-----
> Von: Mark Pirogovsky [mailto:[hidden email]]
> Gesendet: Montag, 6. Februar 2006 09:36
> An: Vwnc
> Betreff: Store: how to delete Pkg version ?
>
> Hello All,
>
> By accident I have created whole bunch of new packages and bundles for
> my application.  Is there any easy and safe way to delete the latest
> versions of those packages and bundle from our repository ?
>
> TIA
>
> --Mark
>
> P.S. my VW version is 7.3.1
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

AW: AW: Store: how to delete Pkg version ?

Georg Heeg
Mark,

We did this a couple of times. We did not encounter any problem. To double
the safeness you may want what we did: Backup you database before you run
the garbage collect.

Georg

-----Ursprüngliche Nachricht-----
Von: Mark Pirogovsky [mailto:[hidden email]]
Gesendet: Montag, 6. Februar 2006 10:16
An: Georg Heeg
Cc: 'Vwnc'
Betreff: Re: AW: Store: how to delete Pkg version ?

Great,
DO you know how safe that is ?

--Mark

Georg Heeg wrote:

> Mark,
>
> Bless them "broken" and run the Store Garbage Collector.
>
> Georg
>
> -----Ursprüngliche Nachricht-----
> Von: Mark Pirogovsky [mailto:[hidden email]]
> Gesendet: Montag, 6. Februar 2006 09:36
> An: Vwnc
> Betreff: Store: how to delete Pkg version ?
>
> Hello All,
>
> By accident I have created whole bunch of new packages and bundles for
> my application.  Is there any easy and safe way to delete the latest
> versions of those packages and bundle from our repository ?
>
> TIA
>
> --Mark
>
> P.S. my VW version is 7.3.1
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Store: how to delete Pkg version ?

Travis Griggs
In reply to this post by Mark Pirogovsky-3

On Feb 6, 2006, at 9:35, Mark Pirogovsky wrote:

> Hello All,
>
> By accident I have created whole bunch of new packages and bundles  
> for my application.  Is there any easy and safe way to delete the  
> latest versions of those packages and bundle from our repository ?
>

You could do something like described here:

http://www.cincomsmalltalk.com/userblogs/travis/blogView?
showComments=true&entry=3315590342

I think Alan's even added this in the Store Workspace.

--
Travis Griggs
Objologist
"It's [a spec] _the_ single worst way to write software, because it  
by definition means that the software was written to match theory,  
not reality" - Linus Torvalds



-----------------------------------------
DISCLAIMER: This email is bound by the terms and conditions
described at
http://www.key.net/disclaimer.htm

Reply | Threaded
Open this post in threaded view
|

Re: Store: how to delete Pkg version ?

Mark Pirogovsky-3
Thanks to all who answered.

Travis your observation is correct about
 > The (primitive) Store garbage
 >collection tools don't really allow this easily. They'll remove
 >everything before a certain date, but not after.

I have made couple of changes to the GarbageCollector UI (See attached)
  so it will allow dates before or after and pkg version <=, =, or >= .
I was going to add the USer as well but did not have time.

I hope something like that would be included into the base.

regards,

--Mark


Travis Griggs wrote:


> You could do something like described here:
>
> http://www.cincomsmalltalk.com/userblogs/travis/blogView?
> showComments=true&entry=3315590342
>
> I think Alan's even added this in the Store Workspace.
>
> -- Travis Griggs Objologist "It's [a spec] _the_ single worst way to
> write software, because it  by definition means that the software was
> written to match theory,  not reality" - Linus Torvalds

<?xml version="1.0"?>

<st-source>
<!-- Changes in change set my test -->
<time-stamp>From VisualWorks®, 7.3.1 of April 20, 2005 on February 7, 2006 at 2:58:58 pm</time-stamp>


<class>
<name>GarbageCollectSpecEditor</name>
<environment>Store</environment>
<super>UI.ApplicationModel</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>availablePundles garbage date blessingLevel blessingLevelMenu pundleAvailability beforeDate moreOrLess </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Store-UI</category>
<attributes>
<package>Store-UI</package>
</attributes>
</class>

<methods>
<class-id>Store.GarbageCollectSpecEditor class</class-id> <category>interface specs</category>

<body package="Store-UI" selector="windowSpec">windowSpec
        "Tools.UIPainter new openOnClass: self andSelector: #windowSpec"

        &lt;resource: #canvas&gt;
        ^#(#{UI.FullSpec}
                #window:
                #(#{UI.WindowSpec}
                        #label: 'Garbage Collection'
                        #min: #(#{Core.Point} 385 189 )
                        #bounds: #(#{Graphics.Rectangle} 639 538 1133 946 ) )
                #component:
                #(#{UI.SpecCollection}
                        #collection: #(
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Core.Point} 23 48 )
                                        #label: 'Packages' )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Graphics.LayoutOrigin} 17 0.5 48 0 )
                                        #label: 'Garbage' )
                                #(#{UI.GroupBoxSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 7 0 3 0 -7 1 -38 1 ) )
                                #(#{UI.InputFieldSpec}
                                        #layout: #(#{Graphics.Rectangle} 105 12 210 37 )
                                        #name: #date
                                        #model: #date
                                        #callbacksSpec:
                                        #(#{UI.UIEventCallbackSubSpec}
                                                #focusOutSelector: #disturb
                                                #valueChangeSelector: #disturb )
                                        #isReadOnly: false
                                        #type: #date )
                                #(#{UI.MenuButtonSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 354 0 14 0 0 0.977733 39 0 )
                                        #name: #blessingLevelButton
                                        #model: #blessingLevel
                                        #callbacksSpec:
                                        #(#{UI.UIEventCallbackSubSpec}
                                                #valueChangeSelector: #disturb )
                                        #menu: #blessingLevelMenu )
                                #(#{UI.SequenceViewSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 23 0 76 0 -18 0.5 -98 1 )
                                        #name: #availablePundlesView
                                        #flags: 15
                                        #model: #availablePundles
                                        #callbacksSpec:
                                        #(#{UI.UIEventCallbackSubSpec}
                                                #valueChangeSelector: #disturb
                                                #requestValueChangeSelector:
                                                #okSelection: )
                                        #multipleSelections: true )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{UI.AlignmentOrigin} -10 0.25 -68 1 0.5 0.5 )
                                        #name: #addToGarbage
                                        #model: #addToGarbage
                                        #label: 'Add to garbage'
                                        #defaultable: true )
                                #(#{UI.SequenceViewSpec}
                                        #layout: #(#{Graphics.LayoutFrame} 17 0.5 78 0 -22 1 -98 1 )
                                        #name: #garbageView
                                        #flags: 15
                                        #model: #garbage
                                        #callbacksSpec:
                                        #(#{UI.UIEventCallbackSubSpec}
                                                #valueChangeSelector: #disturb ) )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{UI.AlignmentOrigin} 0 0.75 -68 1 0.5 0.5 )
                                        #name: #removeItem
                                        #model: #removeItem
                                        #label: 'Remove'
                                        #defaultable: true )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{UI.AlignmentOrigin} -127 0.5 -6 1 1 1 )
                                        #name: #acceptButton
                                        #model: #accept
                                        #label: 'Accept'
                                        #isDefault: true
                                        #defaultable: true )
                                #(#{UI.ActionButtonSpec}
                                        #layout: #(#{UI.AlignmentOrigin} 67 0.5 -6 1 0 1 )
                                        #model: #cancel
                                        #label: 'Cancel'
                                        #defaultable: true )
                                #(#{UI.LabelSpec}
                                        #layout: #(#{Core.Point} 227 12 )
                                        #label: 'Blessing:' )
                                #(#{UI.CheckBoxSpec}
                                        #layout: #(#{Core.Point} 13 12 )
                                        #name: #beforeDat
                                        #model: #beforeDate
                                        #label: 'Before Date' )
                                #(#{UI.RadioButtonSpec}
                                        #layout: #(#{Core.Point} 290 4 )
                                        #name: #RadioButton1
                                        #model: #moreOrLess
                                        #label: '&lt;='
                                        #select: #&lt;= )
                                #(#{UI.RadioButtonSpec}
                                        #layout: #(#{Core.Point} 290 19 )
                                        #name: #RadioButton2
                                        #model: #moreOrLess
                                        #label: ' ='
                                        #select: #= )
                                #(#{UI.RadioButtonSpec}
                                        #layout: #(#{Core.Point} 290 35 )
                                        #name: #RadioButton3
                                        #model: #moreOrLess
                                        #label: '&gt;='
                                        #select: #&gt;= ) ) ) )
        "@__markp 02/07/2006 02:43:43 pm"</body>
</methods>


<methods>
<class-id>Store.GarbageCollectSpecEditor</class-id> <category>aspects</category>

<body package="Store-UI" selector="beforeDate">beforeDate
        ^beforeDate isNil
                ifTrue: [beforeDate := true asValue]
                ifFalse: [beforeDate]

        "@__markp 02/07/2006 02:10:43 pm"
        "@__markp 02/07/2006 02:10:49 pm"</body>

<body package="Store-UI" selector="moreOrLess">moreOrLess
 

        ^moreOrLess isNil ifTrue: [moreOrLess := #&lt;= asValue] ifFalse: [moreOrLess]

        "@__markp 02/07/2006 02:44:48 pm"</body>
</methods>


<methods>
<class-id>Store.GarbageCollectSpecEditor</class-id> <category>private</category>

<body package="Store-UI" selector="calculateSelections">calculateSelections
        "Caclulate which bundles/packages are slated for GC."

        | masterList timeStamp bless doBefore comparison |
        doBefore := self beforeDate value.
        comparison := self moreOrLess value.
        masterList := Set new.
        timeStamp := DBObject timeStampFromDate: self date value.
        bless := self blessingLevel value == nil
                                ifTrue: [99999]
                                ifFalse: [self blessingLevel value].
        self garbage list do:
                        [:pundle |
                        masterList
                                addAll: ((pundle class allVersionsWithName: pundle name) select:
                                                        [:p |
                                                        | img |
                                                        ((img := p getImagePundle) == nil or: [img dbTrace ~~ p primaryKey]) and:
                                                                        [(doBefore
                                                                                ifTrue: [p timeStamp &lt; timeStamp]
                                                                                ifFalse: [p timeStamp &gt; timeStamp])
                                                                                        and: [p blessingLevelNumber perform: comparison with: bless]]])].
        ^masterList

        "@__markp 02/07/2006 02:12:30 pm"</body>
</methods>



</st-source>
Reply | Threaded
Open this post in threaded view
|

[7.4][Pollock]Programatically setting or clearing RadioButton

Carl Gundel
I'm having a hard time programatically setting the state of
RadioButtons under Pollock.  I try to set the value of its model, but
that doesn't seem to work.  The radiobutton is always set to on.  Come
to think of it, I'm about to try this with checkboxes too.  Am I going
to run into the same problem there?

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com

Reply | Threaded
Open this post in threaded view
|

Re: [7.4][Pollock]Programatically setting or clearing RadioButton

Samuel S. Shuster <sames@interaccess.com>
Carl,

> I'm having a hard time programatically setting the state of  
> RadioButtons under Pollock.  I try to set the value of its model,  
> but that doesn't seem to work.  The radiobutton is always set to  
> on.  Come to think of it, I'm about to try this with checkboxes  
> too.  Am I going to run into the same problem there?

Maybe.

Each RadioButton needs a selectValue. This is typically a Symbol.

A RadioButton is only "on" when it's selectValue equals the value of  
the model.

So, here is what should work:

radio1 selectValue: #underTable.
radio2 selectValue: #onTable.
radio3 selectValue: #inTable.
sharedValue := radio1 model.
radio2 model: sharedValue.
radio3 model: sharedValue.

... (at this point, all should be off)

sharedValue value: #onTable.
...
sharedValue value: #inTable.

etc.