Norton Allen <firstname.lastname@example.org> 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?
- Create the basic building blocks of your application as
widgets in a PhAB picture module (or modules).
- Open the picture module(s) as a database (or databases) in
your application initialization function.
- 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…
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
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
QSSL Training Services