eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ResourceSpecEditor':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ResourceSpecEditor


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--ToolApplicationModel
            |
            +--ResourceSpecEditor

Package:
stx:libview2
Category:
Interface-Framework
Version:
rev: 1.55 date: 2017/08/29 18:00:47
user: cg
file: ResourceSpecEditor.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Thomas Zwick, eXept Software AG

Description:


Abstract super class for the MenuEditor, HierarchicalListEditor, 
and the TabListEditor.
It provides common behavior for initializing, loading, saving, and
asking for modifications of the resource specs (#menu, #hierarchicalList, 
#tabList) for the concrete subclasses.

[instance variables:]
    specClass       <Symbol>                class implementing the resource spec
    specSelector    <Symbol>                selector returning the resource spec
    aspects         <IdentityDictionary>    dictionary with the attributes of the resource spec
    modified        <Boolean>               flag whether the resource spec was modified
    hasSaved        <Boolean>               flag whether the resource spec was saved
    tabSelection    <Integer>               index of the tab selection


Related information:

    MenuEditor
    HierarchicalListEditor
    TabListEditor

Class protocol:

accessing
o  codeGenerationComment
returns a comment for the method code generated by myself

o  codeGenerationCommentForClass: generatingClass
returns a comment for the method code generated by generatingClass

o  resourceType
returns the type of resource of the method generated by the Resource Spec Editor;
concrete subclasses has to reimplement this method

** This method raises an error - it must be redefined in concrete classes **

aspects
o  aspects
returns the aspects for the attributes of the resource spec components;
concrete subclasses might reimplement this method in order to return an array

help spec
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

instance creation
o  openModalOnClass: aClass andSelector: aSelector
opens modal the Resource Spec Editor on aClass and aSelector

o  openOnClass: aClass andSelector: aSelector
opens the Resource Spec Editor on aClass and aSelector

queries
o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.

o  isVisualStartable
return true, if this application can be started via #open.
(to allow start of a change browser via double-click in the browser)

o  resourcePackage

startup & release
o  preSnapshot
before a snapshot; updates the channels,
because the clipboard has removed


Instance protocol:

accessing
o  alternativeSpecSelectors
returns an alternative method selector of the resource spec

o  clearModified

o  isEmbeddedInBrowser

o  isEmbeddedInBrowser: something

o  modified
returns whether the resource spec was modified

o  modified: aBoolean
sets the resource spec modified as aBoolean

o  setModified

o  specClass
return the class where the resource spec is implemented

o  specClass: aClassOrClassName
sets the class (or name) where the resource spec is (or should be) implemented

o  specClassName
return the classes name where the resource spec is implemented

o  specSelector
returns the method selector of the resource spec

o  specSelector: aSelector
sets the method selector of the resource spec.
That is the spec method being edited (i.e. #helpSpec, #windowSpec, #menuSpec, etc.)

aspects
o  aspectAt: aKey put: aValueHolder

o  aspectFor: aKey
returns the aspect for a aKey or nil

o  autoAcceptOnSelectionChange

o  canPasteHolder
returns whether the application can paste; as value holder

o  enableMovingInAboveHolder
returns whether the selected item can move into the previous item as child;
as a value holder

o  enableMovingInHolder
returns whether the selected item can move into next item as child; as value holder

o  enableMovingOutHolder
returns whether the selected item can move out from its parent item; as value holder

o  enableMovingUpOrDownHolder
returns whether the selected item can move up or down; as value holder

o  tabModel
returns the value holder for the tab selection

o  valueOfEnableMovingIn
returns whether the selected item can move into next item as child; as value holder

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  valueOfEnableMovingInAbove
returns whether the selected item can move into the previous item as child;
as a value holder

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  valueOfEnableMovingOut
returns whether the selected item can move out from its parent item; as value holder

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  valueOfEnableMovingUpOrDown
returns whether the selected item can move up or down; as value holder

** This is an obsolete interface - do not use it (it may vanish in future versions) **

building
o  buildFromClass: aClass andSelector: aSelector

o  buildFromResourceSpec: aResourceSpec
concrete subclass has to reimplement this method
in order to build its resource spec from aResourceSpec

o  loadFromClass: aClass andSelector: aSelector

o  loadFromResourceSpec: aResourceSpec
concrete subclass has to reimplement this method
in order to build its resource spec from aResourceSpec

** This method raises an error - it must be redefined in concrete classes **

change & update
o  update: something with: aParameter from: changedObject
one of my aspects has changed; update modified channel for the commit buttons

o  updateAllToolInstances
updates the channels of all other instances of my class

o  updateChannels
updates my channels

help
o  defaultInfoLabel
returns the default label for the info bar

initialization
o  initialize
initialize the flags and the aspects

private
o  askForItemModification
asks for resource item modification

o  askForListModification
asks for resource modification

o  askForModification
asks first for item and then for resource modification

o  extractClassAndSelectorFrom: aString
extracts class and selector from a resource string. On success
an association with the key a class and the selector as value
is returned. Otherwise nil is returned

o  updateHistory
updates the history, if there was loaded a resource spec

o  xxresourceMessage: aString
extracts the specClass and the specSelector from aString

queries
o  hasSaved
returns true if the resource spec was saved

o  isModified

o  isNotStandAlone
returns true if the editor was NOT started from or in another tool;
i.e. is embedded in another tool, such as the inspector

o  isStandAlone
returns true if the editor was started from or in another tool;
i.e. is not embedded in another tool such as the inspector

selection
o  selectionChangeAllowed: newSelection

o  tabSelection
returns selected tab index or 0

startup & release
o  closeRequest
asks for permission before closing

o  loadFromMessage: classAndSelector
builds by evaluating aString the resource spec for editing

o  openModalOnClass: aClass andSelector: aSelector
sets the specClass and specSelector and opens modal the interface

o  openModalOnResourceSpec: aListSpec
builds first from specClass and specSelector the resource spec for editing,
then opens modal the interface

o  openOnClass: aClass andSelector: aSelector
sets the specClass and specSelector and opens the interface

o  postBuildWith: aBuilder
after creating the views and before opening,
adds myself to the instances dictionary in the settings

o  postOpenWith: aBuilder
after opening, builds from specClass and specSelector the resource spec for editing

o  uninitialize
uninitializes; removes myself from the instances dictionary in the settings

user actions
o  accept
invoked by the OK button; disables the commit buttons and sets myself modified
usage example(s):
toggle to force inputFields to accept

o  doBrowseClass
opens a System Browser on the specClass and specSelector

o  doEditImage
opens a Image Editor on the resource retriever and the icon selector

o  doLoad
opens a Resource Selection Browser in order to get a resource message

o  doNew
first ask for modification; then clean specClass and specSelector,
but only, if the editor is opened as stand alone;
finally make a build of a resource spec containing no items

o  doSave
before saving ask for modification; if no specClass and specSelector
is defined, do save as

o  doSaveAs
first ask for modification;
then open a ResourceSelectionBrowser;
after that extract the resource message;
finally do save and make a new build



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 02:58:48 GMT