"Leandro Andres Aguilar"<
[hidden email]> wrote:
> Hi ! i cannot find any information about how to get the selected Bundle in
> the systemBrowser.I need to add an option in the menu that gets the bundle
> and do some other actions with this bundle.Thanks,bye.
In the context of BrowserNavigator, which is where you likely want to extend, it is simply 'self pundles'. Below is a somewhat more involved example from my extension set. All it takes is this one extension method (BrowserNavigator>>moreRecentPublishedPackages) .
HTH,
Martin
moreRecentPublishedPackages
"Browse more recent package versions withing the context of the selected pundle."
<menuItem: 'More Recent Packages'
icon: nil
nameKey: #moreRecentPackages
menu: #(#pundleMenu Versions)
position: 60.75>
Store.DbRegistry doIfOnlineImage: [ | coll title |
self pundles isEmpty ifTrue: [ ^self ].
coll := Set new.
(self pundles inject: Set new into: [ :set :pundle |
set addAll: pundle leafIte!
ms; yourself ]
) do: [ :pkg || trace |
trace := pkg dbTrace.
coll addAll: (trace == nil
ifTrue: [ pkg class databaseClass allVersionsWithName: pkg name ]
ifFalse: [ pkg class databaseClass allVersionsWithName: pkg name after: trace ]) ].
title := self pundles inject: '' into: [ :t :p | t, ' ', p name].
coll isEmpty
ifTrue: [Dialog warn: 'No recent versions of', title]
ifFalse: [
Store.PublishedPundlesTool
openOnBundles: Set new
packages: (coll collect: [ :p | p name ])
title: 'Recent versions of', title ] ]
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc