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.63 date: 2023/06/28 15:28:55
user: cg
file: ResourceSpecEditor.st directory: libview2
module: stx stc-classLibrary: libview2

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

copyright

COPYRIGHT (c) 1997-1998 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

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

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

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 must be redefined in concrete classes (subclassResponsibility) **

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 specs
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

** This method must be redefined in concrete classes (subclassResponsibility) **

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

** This method must be redefined in concrete classes (subclassResponsibility) **

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  askForUnsavedModifications

o  cancel
remove all changes and reload selected column values

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 01:39:08 GMT