Leveraging PhAB?

Is there any way to leverage the utility of PhAB by generating
part of an interface with a program, then touching up the
appearance manually? I have an application where I’ll need to
regularly create screens with 100 or so widgets. There will
be a handful of types, and they’ll all have unique names and
will be based on information in some source file somewhere.
Ideally I’d like a program to be able to create the application’s
base window with all the widgets, then use PhAB to make it pretty
and generate the code. Is this possible or must all input to
PhAB be manual?

-Norton Allen

Norton Allen <allen@huarp.harvard.edu> wrote:

Is there any way to leverage the utility of PhAB by generating
part of an interface with a program, then touching up the
appearance manually? I have an application where I’ll need to
regularly create screens with 100 or so widgets. There will
be a handful of types, and they’ll all have unique names and
will be based on information in some source file somewhere.
Ideally I’d like a program to be able to create the application’s
base window with all the widgets, then use PhAB to make it pretty
and generate the code. Is this possible or must all input to
PhAB be manual?

Sadly (unless you’re importing modules from another PhAB app.),
you’re stuck doing the entry yourself by hand.

Can I suggest that you might get to a (somewhate) similar
endpoint with the following scheme?

  1. Create the basic building blocks of your application as
    widgets in a PhAB picture module (or modules).
  2. Open the picture module(s) as a database (or databases) in
    your application initialization function.
  3. Have setup functions for window and/or dialog modules do
    the widget creation (using the prototypes you’d
    established in the picture modules) based on
    instructions (in some format you decide yourself) held
    in a text file. The function ApCreateWidget() would get
    a lot of use here… :slight_smile:

Note that since the vast majority of your widget instances in
this scenario would be created dynamically from the picture
modules, you’d not be able to depend on ABW_ to reference
your widgets. You’d have to store pointers, or traverse the
widget family tree, in order to be able to reference any given
widget.

With this scheme, you’re not doing a lot of entering via PhAB,
and since you’d have to write code to create widgets under your
original scheme too, you’re not loosing much there either. The
thing that this really doesn’t get you is the ability to tweak
the look of the app. without constantly rewriting your
configuration files, and then regenerating your app. For that
realtime WYSI(usually)WYG, you’d have to use PhAB itself.

Longterm, I’ve heard faint, occasional rumblings of publishing
details of PhAB’s module interface, or perhaps allowing some sort
of conversion API. I wouldn’t want to bet on it, though.

Sorry not to be able to give you good news. Hope this suggests a
useful alternative.


Norbert Black
QSSL Training Services

On 19 Jun 2001 18:33:13 GMT, Norbert Black <nblack@qnx.com> wrote:

Norton Allen <> allen@huarp.harvard.edu> > wrote:
Is there any way to leverage the utility of PhAB by generating
part of an interface with a program, then touching up the
appearance manually? I have an application where I’ll need to
regularly create screens with 100 or so widgets. There will
be a handful of types, and they’ll all have unique names and
will be based on information in some source file somewhere.
Ideally I’d like a program to be able to create the application’s
base window with all the widgets, then use PhAB to make it pretty
and generate the code. Is this possible or must all input to
PhAB be manual?

I am ashamed to admit that I resort to editing the .wgtw files
directly sometimes, in order to do the repetitive type of editing that
PhAB is not geared for. E.g. assigning unique names to
widgets. It’s risky, because PhAB will exit without much help
when you get it wrong.
I haven’t tried creating widgets in this way yet, just changing
the existing attributes of existing widgets.

For a one off, you may try doing this…
But you will be on your own ;^)

OK, at least it’s good to know I’m not missing something obvious.
Thanks for the inputs.

-Norton