How to delete a resource on a Shell?

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

How to delete a resource on a Shell?

Shaping-3
It is probably simple, but I don't see it.  I installed a resource on the
wrong Shell, and cannot delete it.  Is there a special trick?

Regards,

Shaping


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Chris Uppal-3
Shaping wrote:

> It is probably simple, but I don't see it.  I installed a resource on the
> wrong Shell, and cannot delete it.  Is there a special trick?

The Resource Browser is the tool you need (the one with an icon that looks like
a white shaver plug, or US power plug).

    -- chirs


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Shaping-3
> The Resource Browser is the tool you need (the one with an icon that looks
> like
> a white shaver plug, or US power plug).

That makes sense, but I still don't see a way to select and delete from the
context menu.  What did I miss?

Also, I would expect any listing in the package browser, even a resource,
when double-click, to appear in a browser in context (in a list or
hierarchy, as with the CHB).  This does not happen with a resource.  You get
the VC opened on the one resource, not on a list of all classes and their
resources, which is what the Resource Browser does.  Why not just put
another filter tab in the CHB for resources?  This approach seems less
surprising.  We could have a presenter class tree on the left with each
class' underlying resources.  We might be able to fit the VC in between that
view and the three right-side views (plus the toolbox--four views).  Is this
too crowded in practice?  Has it been considered or tried?

Regards,

Shaping


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Chris Uppal-3
Shaping wrote:

> > The Resource Browser is the tool you need (the one with an icon that
> > looks like
> > a white shaver plug, or US power plug).
>
> That makes sense, but I still don't see a way to select and delete from
> the context menu.  What did I miss?

Odd.  For me the /context/ menu in the Resource Browser reads:
    Edit
    Show
    Package...
    ------------
    Delete
What do you see ?

How about the Big Red X toolbar item, that should delete too.

I've just noticed that the RB seems to have a small buglette.  The 'Delete'
option on the 'Resouces' window menu is permanently disabled, which is because
the command is miscoded to #removeResource rather than #deleteResource.

> Also, I would expect any listing in the package browser, even a resource,
> when double-click, to appear in a browser in context (in a list or
> hierarchy, as with the CHB).  This does not happen with a resource.  You
> get the VC opened on the one resource, not on a list of all classes and
> their resources, which is what the Resource Browser does.

I'm sorry, I don't know what you mean.  If I double click on a resource in the
Resource Browser then it opens a VC on that resource, just the same as the PB.
Which is what I'd expect to happen ?


> Why not just
> put another filter tab in the CHB for resources?

A dedicated tab for managing a class's resources.  That is a /good/ idea.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Shaping-3
>> > The Resource Browser is the tool you need (the one with an icon that
>> > looks like
>> > a white shaver plug, or US power plug).
>>
>> That makes sense, but I still don't see a way to select and delete from
>> the context menu.  What did I miss?
>
> Odd.  For me the /context/ menu in the Resource Browser reads:
>    Edit
>    Show
>    Package...
>    ------------
>    Delete
> What do you see ?
>

Remove from Package
------
Browse
Show
-----
View List
Details


> How about the Big Red X toolbar item, that should delete too.


The big X targets the ShellView (I guess that would be the saved resource,
not a class), but it doesn't actually delete anything, anyway.

>
> I've just noticed that the RB seems to have a small buglette.  The
> 'Delete'
> option on the 'Resouces' window menu is permanently disabled, which is
> because
> the command is miscoded to #removeResource rather than #deleteResource.

Correct.

>
>> Also, I would expect any listing in the package browser, even a resource,
>> when double-click, to appear in a browser in context (in a list or
>> hierarchy, as with the CHB).  This does not happen with a resource.  You
>> get the VC opened on the one resource, not on a list of all classes and
>> their resources, which is what the Resource Browser does.
>
> I'm sorry, I don't know what you mean.  If I double click on a resource in
> the
> Resource Browser then it opens a VC on that resource, just the same as the
> PB.
> Which is what I'd expect to happen ?

You need a larger /context/ (list, tree) in order to have something to
delete /from/.  One does not usually delete an object from the pane in which
one is editing the object's details.  This is too fine a view for /gross/
operations.  When deleting, one usually operates on the name of a thing--an
abbreviated representation--not its most detailed manifestation, such as a
method text (for a method) or a graphic-plus-attribute-panes (for a
resource).


Shaping


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Chris Uppal-3
In reply to this post by Chris Uppal-3
I wrote:

> > Why not just
> > put another filter tab in the CHB for resources?
>
> A dedicated tab for managing a class's resources.  That is a /good/ idea.

Here's a very simple implementation of the idea as a plugin tab for the CHB,
etc.

It's small enough that I think it should be OK just to append the package
inline at the end of this message, if it gets too mangled to work, then drop me
a line and I'll email it to anyone who wants it (or a more elaborate version
will make it only my website in due course).

Please feel free to modify/extend/fix it in any way you want -- I won't be
supporting it ;-)

    -- chris

========== CU Simple Resource Plugin.pac ==========
| package |
package := Package name: 'CU Simple Resource Plugin'.
package paxVersion: 0;
 basicComment: 'Copyright © Chris Uppal, 2005.
[hidden email]

*Very* simple pluigin for the CHB/SB that allows you to manage the selected
class''s resources.

See class comment of SimpleResourcePlugin for more.

The terms under which you may use this software are:
 You must not claim that you wrote it.
 You must not claim that you own it.
 You use it at your own risk.

I''d appreciate it if you didn''t distribute modified versions without at least
trying to tell me about the changes you thought worthwhile.

 -- chris'.

package basicPackageVersion: '1.00'.


package classNames
 add: #SimpleResourcePlugin;
 yourself.

package binaryGlobalNames: (Set new
 yourself).

package globalAliases: (Set new
 yourself).

package allResourceNames: (Set new
 add: #SimpleResourcePlugin -> 'Default view';
 yourself).

package setPrerequisites: (IdentitySet new
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\IDE\Base\Development System';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\Base\Dolphin';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\MVP\Views\Common Controls\Dolphin Common Controls';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\MVP\Base\Dolphin MVP Base';
 yourself).

package!

"Class Definitions"!

ClassBrowserPluginAbstract subclass: #SimpleResourcePlugin
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 classInstanceVariableNames: ''!

"Global Aliases"!


"Loose Methods"!

"End of package definition"!

"Source Globals"!

"Classes"!

SimpleResourcePlugin guid: (GUID fromString:
'{39E4706F-CB19-4681-AE68-288E0416593C}')!
SimpleResourcePlugin comment: 'Copyright © Chris Uppal, 2005.
[hidden email]

*Very* simple pluiggin for the CHB/SB that allows you to manage the selected
class''s resources.

Install by adding SimpleResourcePlugin to the #plugins list of any of the class
browsers (through their ''Tools=>Options'' menu), or by evaluating methods in
the class-side ''installing'' category.

Deficiencies:
 - no way to create new resources from the list;
 - should show all resources in package when package(s) but no class is
selected in SB;
 - should have more operations (rename, drag-move, etc).'!
!SimpleResourcePlugin categoriesForClass!Browser-Plugins! !
!SimpleResourcePlugin methodsFor!

classFilter
 "private -- answer a <monadicValuavle> that evaluates to true for the
currently selected class"

 | target |

 target := self browser actualClass ifNotNil: [:it | it instanceClass].

 ^ target isNil
  ifTrue: [ [:it | false] ]
  ifFalse: [ [:it | it owningClass = target ] ].!

createComponents
 "private -- create presenters in order that they may be bound into MVP triads"

 self
  add: (ResourceListPresenter new) name: 'Resources';
  yourself.

 ^ super createComponents.
!

createSchematicWiring
 "private -- arrange triggering between our components"

 self browser when: #classSelected send: #onBrowserClassSelected to: self.

 ^ super createSchematicWiring.
!

displayOn: aStream
 "append our 'visual' name to the given stream, this is used to set the name in
the CHB's tabs collection"

 aStream nextPutAll: 'Resources'!

onBrowserClassSelected
 "called when the selected class has changed in our parent browser"

 self isCurrentCard ifTrue: [self updateFilters]!

onShownInBrowser
 "private -- called when this card is displayed in our parent browser"

 self updateFilters.!

onViewOpened
 "private -- set up whatever we can't do before the view is opened"

 | block listView |

 super onViewOpened.

 block := [:ctx | self ownerDrawResource: ctx. ctx := nil].
 listView := self resourcesPresenter view.
 listView customDrawBlock: block.
 listView allColumns do: [:each | each customDrawBlock: block].

!

ownerDrawResource: anNMLVCUSTOMDRAW
 "private -- called when Windows wants us to fill in the given NMLVCUSTOMDRAW
object
 for an item in the method category pane"

 | resid |

 resid := anNMLVCUSTOMDRAW item.
 resid isNil ifTrue: [^ self].

 (resid isLoose) ifTrue:
  [anNMLVCUSTOMDRAW forecolor: ClassBrowserAbstract looseMethodColor].
!

resourcesPresenter
 "private -- answer the presenter named 'Resources'"

 ^ self presenterNamed: 'Resources'.
!

updateFilters
 "private -- reset our resource presenter's filters to show only the selected
classes"

 ^ self resourcesPresenter filterBlock: self classFilter.
! !
!SimpleResourcePlugin categoriesFor: #classFilter!helpers!private! !
!SimpleResourcePlugin categoriesFor:
#createComponents!initializing!private!subpresenters! !
!SimpleResourcePlugin categoriesFor: #createSchematicWiring!event
handling!initializing!private!subpresenters! !
!SimpleResourcePlugin categoriesFor: #displayOn:!displaying!public! !
!SimpleResourcePlugin categoriesFor: #onBrowserClassSelected!event
handling!private! !
!SimpleResourcePlugin categoriesFor: #onShownInBrowser!event handling!private!
!
!SimpleResourcePlugin categoriesFor: #onViewOpened!drawing!event
handling!initializing!private! !
!SimpleResourcePlugin categoriesFor: #ownerDrawResource:!drawing!private! !
!SimpleResourcePlugin categoriesFor: #resourcesPresenter!private!subpresenters!
!
!SimpleResourcePlugin categoriesFor: #updateFilters!private!updating! !

!SimpleResourcePlugin class methodsFor!

addToAllBrowsers
 "add this class to all the available class browser tools.

  self addToAllBrowsers.
 "

 ClassBrowserAbstract withAllSubclasses do: [:each | self addToBrowser: each].!

addToBrowser: aBrowserClass
 "add this class (plugin) to the given browser tool's list of plugins"

 | existing |

 existing := aBrowserClass plugins.
 (existing includes: self) ifFalse: [existing add: self].!

beAvailablePlugin
 "private -- add ourself to the marker category for plugins."

 (ClassCategory name: 'Browser-Plugins') addClass: self.
!

initialise
 "private -- class-side initialisation

  self initialize.
 "

 "commented out until we know that it's safe !!
 self addToAllBrowsers.
"!

removeFromAllBrowsers
 "remove this class from all the available class browser tools.

  self removeFromAllBrowsers.
 "

 ClassBrowserAbstract withAllSubclasses do: [:each | self addToBrowser: each].!

removeFromBrowser: aBrowserClass
 "add this class (plugin) to the given browser tool's list of plugins"

 aBrowserClass plugins remove: self ifAbsent: [].!

uninitialise
 "private -- class-side tear-down

  self uninitialize.
 "

 self removeFromAllBrowsers.! !
!SimpleResourcePlugin class categoriesFor: #addToAllBrowsers!installing!public!
!
!SimpleResourcePlugin class categoriesFor: #addToBrowser:!installing!public! !
!SimpleResourcePlugin class categoriesFor:
#beAvailablePlugin!development!private! !
!SimpleResourcePlugin class categoriesFor: #initialise!private! !
!SimpleResourcePlugin class categoriesFor:
#removeFromAllBrowsers!installing!public! !
!SimpleResourcePlugin class categoriesFor:
#removeFromBrowser:!installing!public! !
!SimpleResourcePlugin class categoriesFor: #uninitialise!private! !

"Binary Globals"!

"Resources"!

(ResourceIdentifier class: SimpleResourcePlugin name: 'Default view') assign:
(Object fromBinaryStoreBytes:
(ByteArray fromBase64String:
'IVNUQiAxIEYCDAABAAAAVmlld1Jlc291cmNlAAAAAA4BJABTVEJSZXNvdXJjZVNUQkJ5dGVBcnJh
eUFjY2Vzc29yUHJveHkAAAAAcgAAAF4MAAAhU1RCIDEgTggMAAoAAABTVEJWaWV3UHJveHkAAAAA
mgAAAAAAAABSAAAAEAAAAERvbHBoaW4gTVZQIEJhc2VSAAAADQAAAENvbnRhaW5lclZpZXdiAAAA
DwAAAAAAAAAAAAAAYgAAAAIAAACCAAAABAAAAAAAAEQBAAIAoAEAAAAAAAAAAAAAAAAAAAcAAAAA
AAAAAAAAAAAAAACgAQAABgcMAEJvcmRlckxheW91dAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAA
AACaAQAAAAAAAJoAAAAAAAAAUgAAABcAAABEb2xwaGluIENvbW1vbiBDb250cm9sc1IAAAAIAAAA
TGlzdFZpZXdiAAAAHgAAAAAAAACgAQAAYgAAAAIAAACCAAAABAAAAE0QAEQBAAAAMAIAAEYDCQAC
AAAATGlzdE1vZGVsAAAAAMoAAAAAAAAA0AAAAGIAAAAAAAAAAAAAAA4CEQBTVEJTaW5nbGV0b25Q
cm94eQAAAACaAAAAAAAAAFIAAAAHAAAARG9scGhpblIAAAAMAAAAU2VhcmNoUG9saWN5ugAAAAAA
AABSAAAACAAAAGlkZW50aXR5AAAAAAAAAAAHAAAARgUEAAIAAABNZW51AAAAAAAAAAAQAAAAYg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AAAAAAAANAAAADQAgAAwgsAAAAAAADBAAAAwQAAAAAAAAAX
AAAA6gAAAAAAAAAAAQAAYgAAAAIAAAAwAgAAUgAAAAkAAABSZXNvdXJjZXMAAAAAMgsAAAAAAADK
AAAAAAAAANAAAABiAAAAAQAAAHILAAAAAAAAkAsAAGIAAAACAAAAwgsAAAAAAAALAAAACwAAAMIL
AAAAAAAAvQIAAPUBAACgAQAA0gwAAAAAAAByAAAALAAAACwAAAAAAAAAAAAAAP//////////////
//////8FAAAABQAAAGMBAAD/AAAAygAAAAAAAADQAAAAYgAAAAEAAAAwAgAAEA0AAAAAAAATAAAA
RgUEAAMAAABJY29uAAAAAAAAAAAQAAAADgIRAFNUQlNpbmdsZXRvblByb3h5AAAAAJoAAAAAAAAA
UgAAAAcAAABEb2xwaGluUgAAABgAAABJbWFnZVJlbGF0aXZlRmlsZUxvY2F0b3K6AAAAAAAAAFIA
AAAHAAAAY3VycmVudFIAAAARAAAAQ29udGFpbmVyVmlldy5pY28OAh8AU1RCRXh0ZXJuYWxSZXNv
dXJjZUxpYnJhcnlQcm94eQAAAABSAAAAEAAAAGRvbHBoaW5kcjAwNS5kbGwAAAAA'))!


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Chris Uppal-3
In reply to this post by Shaping-3
Shaping wrote:

> > Odd.  For me the /context/ menu in the Resource Browser reads:
> >    Edit
> >    Show
> >    Package...
> >    ------------
> >    Delete
> > What do you see ?
> >
>
> Remove from Package
> ------
> Browse
> Show
> -----
> View List
> Details

That's the context menu in the special "toolbox" view used as the component
palette by the View Composer.  If the real Resource Browser tool is showing
the same context menu then something's wrong with your system.


> > > Also, I would expect any listing in the package browser, even a
> > > resource, when double-click, to appear in a browser in context (in a
> > > list or hierarchy, as with the CHB).  This does not happen with a
> > > resource.  You get the VC opened on the one resource, not on a list
> > > of all classes and their resources, which is what the Resource
> > > Browser does.
> >
> > I'm sorry, I don't know what you mean.  If I double click on a resource
> > in the
> > Resource Browser then it opens a VC on that resource, just the same as
> > the PB.
> > Which is what I'd expect to happen ?
>
> You need a larger /context/ (list, tree) in order to have something to
> delete /from/.

Ah I see what you mean.  But I don't agree that it would be appropriate for the
double-clicking in the PB's resource list to open /another/ list of resources.
Opening the VC seems just right to me.

I've put together as a quick (1 hour) plugin IDE extension that adds a resource
list pane to the CHB, etc.  It's small enough to post directly, but too long to
append to this post, so I'll post it in a different message.  I hope you like
it ;-)

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell? [repost with edit]

Chris Uppal-3
In reply to this post by Chris Uppal-3
I wrote:

>  basicComment: 'Copyright © Chris Uppal, 2005.
> [hidden email]

Damn, damn, damn, damn, damn, damn, damn, damn, DAMN!

I didn't mean to include a valid email in that post.  Probably too late now, of
course, but I've attempted to cancel it.  Here's a repeat with edits.  I trust
the repeat won't inconvenience anyone.

    -- chris

====== repost =======

I wrote:

> > Why not just
> > put another filter tab in the CHB for resources?
>
> A dedicated tab for managing a class's resources.  That is a /good/ idea.

Here's a very simple implementation of the idea as a plugin tab for the CHB,
etc.

It's small enough that I think it should be OK just to append the package
inline at the end of this message, if it gets too mangled to work, then drop me
a line and I'll email it to anyone who wants it (or a more elaborate version
will make it only my website in due course).

Please feel free to modify/extend/fix it in any way you want -- I won't be
supporting it ;-)

    -- chris

========== CU Simple Resource Plugin.pac ==========
| package |
package := Package name: 'CU Simple Resource Plugin'.
package paxVersion: 0;
 basicComment: 'Copyright © Chris Uppal, 2005.

*Very* simple pluigin for the CHB/SB that allows you to manage the selected
class''s resources.

See class comment of SimpleResourcePlugin for more.

The terms under which you may use this software are:
 You must not claim that you wrote it.
 You must not claim that you own it.
 You use it at your own risk.

I''d appreciate it if you didn''t distribute modified versions without at least
trying to tell me about the changes you thought worthwhile.

 -- chris'.

package basicPackageVersion: '1.00'.


package classNames
 add: #SimpleResourcePlugin;
 yourself.

package binaryGlobalNames: (Set new
 yourself).

package globalAliases: (Set new
 yourself).

package allResourceNames: (Set new
 add: #SimpleResourcePlugin -> 'Default view';
 yourself).

package setPrerequisites: (IdentitySet new
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\IDE\Base\Development System';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\Base\Dolphin';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\MVP\Views\Common Controls\Dolphin Common Controls';
 add: '..\..\..\Program Files\Dolphin Smalltalk 5.1\Object
Arts\Dolphin\MVP\Base\Dolphin MVP Base';
 yourself).

package!

"Class Definitions"!

ClassBrowserPluginAbstract subclass: #SimpleResourcePlugin
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 classInstanceVariableNames: ''!

"Global Aliases"!


"Loose Methods"!

"End of package definition"!

"Source Globals"!

"Classes"!

SimpleResourcePlugin guid: (GUID fromString:
'{39E4706F-CB19-4681-AE68-288E0416593C}')!
SimpleResourcePlugin comment: 'Copyright © Chris Uppal, 2005.

*Very* simple pluiggin for the CHB/SB that allows you to manage the selected
class''s resources.

Install by adding SimpleResourcePlugin to the #plugins list of any of the class
browsers (through their ''Tools=>Options'' menu), or by evaluating methods in
the class-side ''installing'' category.

Deficiencies:
 - no way to create new resources from the list;
 - should show all resources in package when package(s) but no class is
selected in SB;
 - should have more operations (rename, drag-move, etc).'!
!SimpleResourcePlugin categoriesForClass!Browser-Plugins! !
!SimpleResourcePlugin methodsFor!

classFilter
 "private -- answer a <monadicValuavle> that evaluates to true for the
currently selected class"

 | target |

 target := self browser actualClass ifNotNil: [:it | it instanceClass].

 ^ target isNil
  ifTrue: [ [:it | false] ]
  ifFalse: [ [:it | it owningClass = target ] ].!

createComponents
 "private -- create presenters in order that they may be bound into MVP triads"

 self
  add: (ResourceListPresenter new) name: 'Resources';
  yourself.

 ^ super createComponents.
!

createSchematicWiring
 "private -- arrange triggering between our components"

 self browser when: #classSelected send: #onBrowserClassSelected to: self.

 ^ super createSchematicWiring.
!

displayOn: aStream
 "append our 'visual' name to the given stream, this is used to set the name in
the CHB's tabs collection"

 aStream nextPutAll: 'Resources'!

onBrowserClassSelected
 "called when the selected class has changed in our parent browser"

 self isCurrentCard ifTrue: [self updateFilters]!

onShownInBrowser
 "private -- called when this card is displayed in our parent browser"

 self updateFilters.!

onViewOpened
 "private -- set up whatever we can't do before the view is opened"

 | block listView |

 super onViewOpened.

 block := [:ctx | self ownerDrawResource: ctx. ctx := nil].
 listView := self resourcesPresenter view.
 listView customDrawBlock: block.
 listView allColumns do: [:each | each customDrawBlock: block].

!

ownerDrawResource: anNMLVCUSTOMDRAW
 "private -- called when Windows wants us to fill in the given NMLVCUSTOMDRAW
object
 for an item in the method category pane"

 | resid |

 resid := anNMLVCUSTOMDRAW item.
 resid isNil ifTrue: [^ self].

 (resid isLoose) ifTrue:
  [anNMLVCUSTOMDRAW forecolor: ClassBrowserAbstract looseMethodColor].
!

resourcesPresenter
 "private -- answer the presenter named 'Resources'"

 ^ self presenterNamed: 'Resources'.
!

updateFilters
 "private -- reset our resource presenter's filters to show only the selected
classes"

 ^ self resourcesPresenter filterBlock: self classFilter.
! !
!SimpleResourcePlugin categoriesFor: #classFilter!helpers!private! !
!SimpleResourcePlugin categoriesFor:
#createComponents!initializing!private!subpresenters! !
!SimpleResourcePlugin categoriesFor: #createSchematicWiring!event
handling!initializing!private!subpresenters! !
!SimpleResourcePlugin categoriesFor: #displayOn:!displaying!public! !
!SimpleResourcePlugin categoriesFor: #onBrowserClassSelected!event
handling!private! !
!SimpleResourcePlugin categoriesFor: #onShownInBrowser!event handling!private!
!
!SimpleResourcePlugin categoriesFor: #onViewOpened!drawing!event
handling!initializing!private! !
!SimpleResourcePlugin categoriesFor: #ownerDrawResource:!drawing!private! !
!SimpleResourcePlugin categoriesFor: #resourcesPresenter!private!subpresenters!
!
!SimpleResourcePlugin categoriesFor: #updateFilters!private!updating! !

!SimpleResourcePlugin class methodsFor!

addToAllBrowsers
 "add this class to all the available class browser tools.

  self addToAllBrowsers.
 "

 ClassBrowserAbstract withAllSubclasses do: [:each | self addToBrowser: each].!

addToBrowser: aBrowserClass
 "add this class (plugin) to the given browser tool's list of plugins"

 | existing |

 existing := aBrowserClass plugins.
 (existing includes: self) ifFalse: [existing add: self].!

beAvailablePlugin
 "private -- add ourself to the marker category for plugins."

 (ClassCategory name: 'Browser-Plugins') addClass: self.
!

initialise
 "private -- class-side initialisation

  self initialize.
 "

 "commented out until we know that it's safe !!
 self addToAllBrowsers.
"!

removeFromAllBrowsers
 "remove this class from all the available class browser tools.

  self removeFromAllBrowsers.
 "

 ClassBrowserAbstract withAllSubclasses do: [:each | self addToBrowser: each].!

removeFromBrowser: aBrowserClass
 "add this class (plugin) to the given browser tool's list of plugins"

 aBrowserClass plugins remove: self ifAbsent: [].!

uninitialise
 "private -- class-side tear-down

  self uninitialize.
 "

 self removeFromAllBrowsers.! !
!SimpleResourcePlugin class categoriesFor: #addToAllBrowsers!installing!public!
!
!SimpleResourcePlugin class categoriesFor: #addToBrowser:!installing!public! !
!SimpleResourcePlugin class categoriesFor:
#beAvailablePlugin!development!private! !
!SimpleResourcePlugin class categoriesFor: #initialise!private! !
!SimpleResourcePlugin class categoriesFor:
#removeFromAllBrowsers!installing!public! !
!SimpleResourcePlugin class categoriesFor:
#removeFromBrowser:!installing!public! !
!SimpleResourcePlugin class categoriesFor: #uninitialise!private! !

"Binary Globals"!

"Resources"!

(ResourceIdentifier class: SimpleResourcePlugin name: 'Default view') assign:
(Object fromBinaryStoreBytes:
(ByteArray fromBase64String:
'IVNUQiAxIEYCDAABAAAAVmlld1Jlc291cmNlAAAAAA4BJABTVEJSZXNvdXJjZVNUQkJ5dGVBcnJh
eUFjY2Vzc29yUHJveHkAAAAAcgAAAF4MAAAhU1RCIDEgTggMAAoAAABTVEJWaWV3UHJveHkAAAAA
mgAAAAAAAABSAAAAEAAAAERvbHBoaW4gTVZQIEJhc2VSAAAADQAAAENvbnRhaW5lclZpZXdiAAAA
DwAAAAAAAAAAAAAAYg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Nv
dXJjZUxpYnJhcnlQcm94eQAAAABSAAAAEAAAAGRvbHBoaW5kcjAwNS5kbGwAAAAA'))!


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Shaping-3
In reply to this post by Chris Uppal-3
>> > Odd.  For me the /context/ menu in the Resource Browser reads:
>> >    Edit
>> >    Show
>> >    Package...
>> >    ------------
>> >    Delete
>> > What do you see ?
>> >
>>
>> Remove from Package
>> ------
>> Browse
>> Show
>> -----
>> View List
>> Details
>
> That's the context menu in the special "toolbox" view used as the
> component
> palette by the View Composer.  If the real Resource Browser tool is
> showing
> the same context menu then something's wrong with your system.

"Real Resource Browser"?  Why have we two or the one and a likeness?  I
found the main Resource Browser.  Why don't we just use this, but with more
panes?

> Ah I see what you mean.  But I don't agree that it would be appropriate
> for the
> double-clicking in the PB's resource list to open /another/ list of
> resources.
> Opening the VC seems just right to me.

Yes, but we still need the list to delete from in the global view.  I prefer
to select resources in a tree/list, like we select classes, to see the finer
details, even the graphical ones?  Is this this a space-problem?  Maybe we
could have buttons/context menus to hide the tree when working.

Shaping


Reply | Threaded
Open this post in threaded view
|

CHB Resource Plugin (was: Re: How to delete a resource on a Shell? [repost with edit])

Shaping-3
In reply to this post by Chris Uppal-3
Nice start.  Thank you.

I envisioned, instead of the table, the entire Resource Browser in the
bottom pane.  Provide also an option to allow all classes to be displayed in
the left top pane or just those that have resources attached to them.  Edit
the resource in the bottom pane.  System asks you to save when you click
another class, as when coding.  Switch tabs to edit resource and  add
methods to Presenter and Views.  Consider autoenlarging lower pane, on
selection of Resource tab, to consume 90% or more of the browser, isolating
the selected Presenter at the top in the class/Presenter list.  Clicking any
other tab brings the panes back to their previous ratios.  Consider doing
this instead with a popup menu, if the movement of the tabs on clicking is
disturbing.  You can only view/edit one graphic/resource at a time in a
single CHB, anyway, and don't need to see hierarchical relationships, as
when viewing classes.

Shaping


Reply | Threaded
Open this post in threaded view
|

Re: CHB Resource Plugin (was: Re: How to delete a resource on a Shell? [repost with edit])

Chris Uppal-3
Shaping wrote:

> I envisioned, instead of the table, the entire Resource Browser in the
> bottom pane.

I think you mean an entire View Composer in the bottom frame ?


> Edit the resource in the bottom pane.  System asks you to save when you
> click another class, as when coding.

The problems with that would be screen space (I normally work with the VC
maximised as it is); and the "time factor".  Editing a method is usually a
quick job -- in-change-save, just a minute or two.  Editing a View Resource
tends to be a significantly longer task, making lots of individual changes or
additions.  I'd say that the "fluid" way that you can change selected class
with the CHB/SB would interact badly with the heavyweight nature of
constructing a UI.

It may only be what I'm used to, but to me it seems better to have
the VC as a standalone tool.

Actually, I've always thought that there was something a little bit odd about
the CHB/SB which is both a view of the class hierarchy /and/ of an individual
class.  It seems as if there should logically be two tools, one for
navigating/exploring the class tree (or class list arranged/filtered in any
other way) and another one for changing the definition of a single class.  I
don't deny that the CHB works well as it is, better than the two-tools approach
would, but it still seems a bit illogical to me.

Of course, you approach it from the other direction and add a class list/tree
to the VC.  OA have talked before about improving, or even rethinking, the VC
(I don't know if they are planning any changes in D6, or even really /planning/
any changes at all).  Maybe that's an idea they'd like...


> Consider autoenlarging lower pane, on
> selection of Resource tab, to consume 90% or more of the browser,

Auto-enlarging would be a nice feature to have.  Ideally built into the MVP
framework.  I don't know how to implement it, though.  I suspect it would
require some modifications to the general contract between Views and
LayoutManagers.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: How to delete a resource on a Shell?

Chris Uppal-3
In reply to this post by Chris Uppal-3
I wrote:

> I've put together as a quick (1 hour) plugin IDE extension that adds a
> resource list pane to the CHB, etc.  It's small enough to post directly,
> but too long to append to this post, so I'll post it in a different
> message.

BTW, for anyone who saw that and is wondering where the promised post is: I did
post it, and then realised that I'd left my email in clear, so I cancelled it
and reposted without the email.  Unfortunately that seems to have caused /both/
posts to disappear from many news-servers (not all, the TO Smalltalk server and
GigaNews both still seem to have it (both in fact)).

I won't post it a /third/ time, but if anyone wants a copy of this rather nifty
little extension (IMHO;-) then please say so or email me.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: CHB Resource Plugin (was: Re: How to delete a resource on a Shell? [repost with edit])

Shaping-3
In reply to this post by Chris Uppal-3
>> I envisioned, instead of the table, the entire Resource Browser in the
>> bottom pane.
>
> I think you mean an entire View Composer in the bottom frame ?

Yes, with a Resource tree above and to the left.

>
>
>> Edit the resource in the bottom pane.  System asks you to save when you
>> click another class, as when coding.
>
> The problems with that would be screen space (I normally work with the VC
> maximised as it is); and the "time factor".  Editing a method is usually a
> quick job -- in-change-save, just a minute or two.  Editing a View
> Resource
> tends to be a significantly longer task, making lots of individual changes
> or
> additions.  I'd say that the "fluid" way that you can change selected
> class
> with the CHB/SB would interact badly with the heavyweight nature of
> constructing a UI.

Launch time for the VC is 0.2 to 0.3 seconds on a P1800.
I tested several UI resources.

>
> It may only be what I'm used to, but to me it seems better to have
> the VC as a standalone tool.

That could work, but I still prefer the CHB to be central, the place where
you either
launch VC or see the embedded VC below (a user preference).

>
> Actually, I've always thought that there was something a little bit odd
> about
> the CHB/SB which is both a view of the class hierarchy /and/ of an
> individual
> class.  It seems as if there should logically be two tools, one for
> navigating/exploring the class tree (or class list arranged/filtered in
> any
> other way) and another one for changing the definition of a single class.
> I
> don't deny that the CHB works well as it is, better than the two-tools
> approach
> would, but it still seems a bit illogical to me.

The two levels of granularity are essential for the telescoping/microsoping
effect of the UI.
This is one way in which a UI generates perspective on the system.  I would
become disoriented
without it.

>
> Of course, you approach it from the other direction and add a class
> list/tree
> to the VC.  OA have talked before about improving, or even rethinking, the
> VC
> (I don't know if they are planning any changes in D6, or even really
> /planning/
> any changes at all).  Maybe that's an idea they'd like...

I would like to know what OA think of the optionally embedded VC idea.


>
>
>> Consider autoenlarging lower pane, on
>> selection of Resource tab, to consume 90% or more of the browser,
>
> Auto-enlarging would be a nice feature to have.  Ideally built into the
> MVP
> framework.  I don't know how to implement it, though.  I suspect it would
> require some modifications to the general contract between Views and
> LayoutManagers.

Can't a view be resized during run-time?  Can't we trigger off the Resource
tab
selection event and resize the lower pane before it is invalidated and
redrawn?


Shaping


Reply | Threaded
Open this post in threaded view
|

Re: CHB Resource Plugin

Chris Uppal-3
Shaping wrote:

> >  I'd say that the "fluid" way that you can change selected
> > class
> > with the CHB/SB would interact badly with the heavyweight nature of
> > constructing a UI.
>
> Launch time for the VC is 0.2 to 0.3 seconds on a P1800.
> I tested several UI resources.

It's not about launch-time (which can always be optimised anyway), but about
the amount of "state" that I (the user) have built up and which is discarded
(after a prompt, admittedly) when I switch classes.  In a method I have maybe a
couple of minutes worth of state (both actual work in the sense of code that
I've typed in, and in the working context that I've built up in my head); in
the VC it's more likely to be 20 minutes to an hour's worth.

(BTW, in one of my own tools which is a bit IDE-like, I've implemented a
"lock selection" toggle for cases where the user /may/ build up a lot of state
in an otherwise "fluid" context.  That's a bit of a hack in the UI, though,
which is only necessary because I've packed rather too much functionality into
one tool.)


> > > Consider autoenlarging lower pane, on
> > > selection of Resource tab, to consume 90% or more of the browser,
> >
> > Auto-enlarging would be a nice feature to have.  Ideally built into the
> > MVP
> > framework.  I don't know how to implement it, though.  I suspect it
> > would require some modifications to the general contract between Views
> > and LayoutManagers.
>
> Can't a view be resized during run-time?  Can't we trigger off the
> Resource tab
> selection event and resize the lower pane before it is invalidated and
> redrawn?

Sure, no problem with re-sizing a /specific/ view.  But a general solution
(which is what I'd like to see) would require that all (or most) LayoutManagers
understand what it means for a View to be "inflated", and have code to
implement that state.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: CHB Resource Plugin

Shaping-3
"Chris Uppal" <[hidden email]> wrote in message
news:42075a53$0$38046$[hidden email]...

> Shaping wrote:
>
>> >  I'd say that the "fluid" way that you can change selected
>> > class
>> > with the CHB/SB would interact badly with the heavyweight nature of
>> > constructing a UI.
>>
>> Launch time for the VC is 0.2 to 0.3 seconds on a P1800.
>> I tested several UI resources.
>
> It's not about launch-time (which can always be optimised anyway), but
> about
> the amount of "state" that I (the user) have built up and which is
> discarded
> (after a prompt, admittedly) when I switch classes.  In a method I have
> maybe a
> couple of minutes worth of state (both actual work in the sense of code
> that
> I've typed in, and in the working context that I've built up in my head);
> in
> the VC it's more likely to be 20 minutes to an hour's worth.

Yes, a graphical evolution is more complex, but I would simply expect all
state to be preserved where I last left it, including the panes that were
last visible and the listed items or graphical parts that were last
selected.  This doesn't seem unusual to me.

>
> (BTW, in one of my own tools which is a bit IDE-like, I've implemented a
> "lock selection" toggle for cases where the user /may/ build up a lot of
> state
> in an otherwise "fluid" context.  That's a bit of a hack in the UI,
> though,
> which is only necessary because I've packed rather too much functionality
> into
> one tool.)
>
>
>> > > Consider autoenlarging lower pane, on
>> > > selection of Resource tab, to consume 90% or more of the browser,
>> >
>> > Auto-enlarging would be a nice feature to have.  Ideally built into the
>> > MVP
>> > framework.  I don't know how to implement it, though.  I suspect it
>> > would require some modifications to the general contract between Views
>> > and LayoutManagers.
>>
>> Can't a view be resized during run-time?  Can't we trigger off the
>> Resource tab
>> selection event and resize the lower pane before it is invalidated and
>> redrawn?
>
> Sure, no problem with re-sizing a /specific/ view.  But a general solution
> (which is what I'd like to see) would require that all (or most)
> LayoutManagers
> understand what it means for a View to be "inflated", and have code to
> implement that state.

Yes, generalizing the idea as a protocol would be nice.

Shaping