Axiant Inheritance Question

Steve Franklin steve_franklin@yahoo.com
Thu, 31 May 2001 21:53:24 -0500


Thank you for the explanation.  That is the best description I have read
yet.

-----Original Message-----
From: Whittall, Conrad [mailto:Conrad.Whittall@Cognos.COM]
Sent: Thursday, May 31, 2001 7:08 PM
To: 'Steve Franklin'; powerh-l@lists.swau.edu
Subject: RE: Axiant Inheritance Question


Hi Steve,

What you have described is exactly what I would expect to happen.

When you migrated your original code, and did not have your Axiant
application already inheriting a Style Section, this meant that there were
no available "styles" for the fields, labels and buttons created in your
Axiant screen form to inherit from. Hence, with no style to be based on each
object simply inherits the style "built-in" to Axiant (rather than defined
in some user-modifiable Section).

When you later created a suitable Style Section, and explicitly set your
already-migrated Axiant screen program to now inherit that section, each of
the objects within that program's form was still left without a "model"
object style to inherit from...in other words, the "Inherits From" property
would remain blank (which is a valid value for this property, indicating
that it should use the Axiant defaults). Since there could be many different
field styles, many different label styles, and many different button styles
in a single Style Section there is no simple way that we could tell Axiant
which one to pick when a Style Section is first inherited by the screen
program.

The preferred way to do this is to always ensure that the Application into
which you migrate your PowerHouse source programs has some existing sections
defined in the Default Sections tab of the Application object.

I would suggest that of all of the possible inherited sections that can be
defined on the Default Sections tab of an Application only the Data Access
Section should be considered optional (although even this can be useful if
you want to have a standard set of DEFINE expressions, TEMPORARY items and
even FILE, CURSOR and ACCESS statements included in every screen program
within an application).

Even if the sections that you initially inherit don't yet properly define
exactly what you (or your users) want, this will at least ensure that the
appropriate inheritance links are established within the Axiant screen
programs created (either through migration or import of existing code, or by
creating new programs within Axiant). Inheritance links will also be
established from each of the form object (edit fields, labels, buttons,
etc.) that are created from your QDESIGN screen layout specifications.

Once the inheritance links are in place it is quite easy to change the
properties of the objects in the inherited sections (Styles, Menus,
Toolbars, Events, etc.) in order to change the appearance and/or behavior of
every program that inherits those sections throughout an application.

It is entirely possible to have a hierarchy of Style Sections (or any other
kind of Section) inheriting from one another. Perhaps with some top-level
Sections defining the basic characteristics for all of the applications that
you will deal with within the repository, and then lower-level Sections
inheriting from those high-level Sections and applying "specialization" of
properties.

For example, you could change a "Form Style" in order to modify the
background color of each screen form and at the same time insert a company
logo into the form background.

Different applications can inherit from different Sections (as defined in
the Default Sections tab) either by naming the Sections differently or
putting them into different Libraries within the repository. If a particular
property of some object in a Section is not specialized (i.e. customized or
overridden) at a lower level then Axiant will follow the inheritance path to
the higher-level "parent" object in order to determine the value for that
property...and will do this through multiple levels of inheritance until it
finds a value to use.

One point to remember about inheritance in Axiant is that it is all name
based. Meaning that if you change the name of an inherited Section then all
of the programs that inherit that Section will no longer be able to find
it...there are no internal pointers to link to the inherited section -- just
the name.

This does mean that if you have created a stunning new Style Section called
"Style 2001" and all of your existing programs are currently inheriting a
Style Section called "Default Style Section" you can simply rename "Default
Style Section" to "Old Default Style Section" and rename "Style 2001" to
"Default Style Section" -- and all of your programs will now inherit from
your new section rather than the original one. The same net result can
probably also be achieved through using the Edit | Find Object... dialog and
then using the Change dialog to specifically set the name of the inherited
Style Section to "Style 2001". This applies to all inherited Sections not
just Style Sections.

Inheritance is a very powerful feature of the Axiant development
environment, but it does take a little while and some experimentation to
discover exactly how powerful it can be in your own situation.

Best regards,
Conrad

Conrad Whittall
Marketing Manager, Application Development Tools
Cognos Incorporated, 3755 Riverside Drive, Ottawa, Ontario, K1G 4K9, Canada

Developer productivity never goes out of style!

For details of the Cognos PowerHouse family of high-productivity
development tools for Web, Windows and terminal-based business
applications, and to request your own free copy of our new product
demo CD, simply click here http://www.cognos.com/powerhouse.


-----Original Message-----
From: Steve Franklin [mailto:steve_franklin@yahoo.com]
Sent: Tuesday 22 May 2001 14:32
To: powerh-l@lists.swau.edu
Subject: Axiant Inheritance Question


Does anyone have a good description of how inheritance is suppose to work?
I set up a style sheet under the Default Section Library.  This was done
after the screens were migrated.  Now I have to go into each screen to
specify the inherited style section.  I would expect to do this since I
created the style sheet after migrating.  What I did not expect to have to
do was go into each field, label, button, etc. and specify the specific
style from  my Style Section I already specified in the form.  What did I do
wrong?

Steve Franklin
Stw Inc.
(952) 432-2203
Email: steve_franklin@yahoo.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com