The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
[Originally posted by kananga]

Richard, Rik or Mr Brooks,

Greetings! One year old Powerbuilder developer, two
month old PFC developer. My new employer recently sent
me to Object-Oriented and PFC Powerbuilder training
classes for which I am thankful. Now I am "a-hacking"
away trying to apply what I have learned and working to
learn more and more.

I am the proud owner of your "PFC Programmer's Reference
Manual". We are using PB 6.0 in our shop here so I do
have to keep in mind the differences in function names
between your then beta copy and the actual 6.0 released
names. But that's okay.

My interest is in the datawindow linkage service. Between
the various sources I have read (alot from online) the
prevailing theory seems to be to place the linkage scripts
on the window open, pfc_preopen or pfc_postopen events
versus the individual dw constructor events. Since I have
had problems with the constructor scripting, it's no
surprise that I am for the "all in one location" school
of thought.

That's fine except for when you are having problems because
everyone else is doing things differently. If you can, I
want you to take a look-see and tell me what you think,

The setup: 1 window with 2 datawindow objects (all PFC)
w_action5 :: w_sheet
dw_aperson1; u_dw_app1 :: u_dw; d_actn_person
dw_actnlog1; u_dw_app1 :: u_dw; d_actn_log1

nameid PK

logid PK
nameid FK

Event firing order
1 constructor (dw_aperson1)
2 constructor (dw_actnlog1)
3 pfc_preopen (w_action5)
4 pfc_retrieve (dw_aperson1)
5 pfc_retrieve (dw_actnlog1)
6 open (w_action5)
7 pfc_postopen (w_action5)
8 pfc_open (w_action5) (no fire)

"pfc_preopen, w_action5"
dw_actnlog1.inv_linkage.of_SetStyle &
IF dw_aperson1.of_Retrieve( ) = -1 THEN
MessageBox("Error","Retrieve error")
this.dw_aperson1.SetFocus( )

"pfc_retrieve, dw_aperson1"
Return this.Retrieve()

"pfc_retrieve, dw_actnlog1"
Return this.Retrieve()

That's it! The window works in the sense that both
dw's populate but when you select a different row
on the master dw the detail dw does nothing.

According to the PFC Library Object Reference on
n_cst_dwsrv_linkage this should be enough for automatic
"re-retrieval ???" of the detail dw based on the new
row selected. How naive am I and where else do I need
to place script? RowfocusChanged? ItemChanged?
I think I am on the right track but definitely missing
something important.

I would appreciate any help. Thanks.

Ka'Nanga sends... smilie

* Wk: 404 562-8345 US EPA (Region 4)
* Wk: 404 562-8052 FAX
* Hm: 770 437-9875
* EMail1: (home)
* EMail2: (jokes & rumors)
* EMail3: (office)
* Web pg: