Open a PtWindow via PtTree selection?

Working in 6.3 SP1, I have a PhAB-built base window that uses its
opening setup function to create the structure for a PtTree widget.
The PtTree has one callback and it’s associated with the
Pt_CB_TREE_SELECTION resource. The callback can determine which tree
item was selected from the cbinfo contents, say itemA which is of type
(PtTreeItem_t *).

I want to pop up an associated PhAB-defined window (e.g. ABW_winA).
This would seem to be a basic, ordinary, run-of-the-mill PhAB
operation but, despite reading through lots of the online
documentation, I can’t make it work. PtRealizeWidget(ABW_winA) does
not do the job when called from the PtTree callback code.

The available windows seem proper because I can select one to be an
“opening” callback for the base window and, voila, it appears at
start-up.

What dirt-simple fact of PhAB life am I missing?

rlb wrote:

Working in 6.3 SP1, I have a PhAB-built base window that uses its
opening setup function to create the structure for a PtTree widget.
The PtTree has one callback and it’s associated with the
Pt_CB_TREE_SELECTION resource. The callback can determine which tree
item was selected from the cbinfo contents, say itemA which is of type
(PtTreeItem_t *).

I want to pop up an associated PhAB-defined window (e.g. ABW_winA).
This would seem to be a basic, ordinary, run-of-the-mill PhAB
operation but, despite reading through lots of the online
documentation, I can’t make it work. PtRealizeWidget(ABW_winA) does
not do the job when called from the PtTree callback code.

The available windows seem proper because I can select one to be an
“opening” callback for the base window and, voila, it appears at
start-up.

What dirt-simple fact of PhAB life am I missing?

ApCreateModule().

(The “widgets” in a PhAB module are not really widgets. They’re
basically recipes for widgets. An ABW variable points to the widget
that was most recently created from the recipe – or is NULL if one
hasn’t been created yet. And passing NULL to PtCreateWidget() is a
no-op…)

So I need to create internal links in PhAB that will identify each of
the several windows (e.g. ABM_winA). Then, when I discover that
PtTree itemA has been selected, I can call ApCreateModule(ABM_winA,
…, …).

Problem:
In PhAB I select one of my windows, click on Project | Internal Links
and specify a window, a location and setup code then press Apply and
Done. Moving on to the rest of the windows and repeating the
procedure, I find that only the last Internal Link data applies and
it applies to all the windows.

I’ve seen the mention that only one internal link per
module is allowed. But, to my novice way of thinking,
each PtWindow is a module that should be identifiable through an
ABM_xxx manifest. Instead, this procedure is acting like PtTree is
THE module and is accepting only the last internal link inputs.

“rlb” <robert.bottemiller@fmcti-dot-com.no-spam.invalid> wrote in message
news:dgnqeq$234$1@inn.qnx.com

So I need to create internal links in PhAB that will identify each of
the several windows (e.g. ABM_winA). Then, when I discover that
PtTree itemA has been selected, I can call ApCreateModule(ABM_winA,
…, …).

Problem:
In PhAB I select one of my windows, click on Project | Internal Links
and specify a window, a location and setup code then press Apply and
Done. Moving on to the rest of the windows and repeating the
procedure, I find that only the last Internal Link data applies and
it applies to all the windows.

After you have created the first internal link and hit Apply, do you click
on on the Module List on the left? If not, then instead of adding the
second internal link, you’re changing the first. When you open the Internal
Links dialog, the first link on the list is selected, rather than –
that makes it easy to wipe out an existing internal link when you want to
create a new one. The UI takes some getting used to…

I’ve seen the mention that only one internal link per
module is allowed. But, to my novice way of thinking,
each PtWindow is a module that should be identifiable through an
ABM_xxx manifest. Instead, this procedure is acting like PtTree is
THE module and is accepting only the last internal link inputs.

Your PtTree has nothing to do with it. It’s not even a module.

An internal link is basically a C structure that specifies a module (i.e. a
recipe for a window, or possibly some other container, with a number of
widgets in it), a setup function, and an initial position. This structure
is identifiable through its ABM manifest named after the module and can be
used to create the widgets described by the recipies in the module. PhAB
does not know or care that your PtTree is the widget whose callback is using
the internal link. That would require parsing your C code and finding the
ApCreateModule() call that you give the ABM manifest to. PhAB doesn’t know
how to parse C code.


begin 666 Internal Links.PNG
MB5!.1PT*&@H-24A$4@```28```"," (```!>5I.Q`````7-21T(`KLX< MZ01G04U!"QCPO\804````@8TA230>B8("$#Z````@.@'4P M#J8 .I@!=PG+I1/ ``$VU)1$%4>%[MG0N,5<49@’>!H!027R0VJ+55
M:YN:BT/JBENK;6I-8’55S+PUJ5-EJ+%=3:5DULL6E]U@2;76.L%IN@%86"
MB%J>@H(KRBZOA65A!1=<$)%%!.[=O?^=V=GYW7FS#GW/.[Y)Y.;.3/__#/G
M/
.=?\Z<<^I7K=N756 ,&7E>??AJ4+%Z^-EGGUVP8,&:IA4!]%%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