1

Topic: How there is an information binding in two DW through retrieval argument?

Hello! In advance I apologize for basic questions and some confusion. I am the full beginner, I read and I understand an educational DB under book Getting Started delivered with PowerBuilder 10.5.
There the standard system is under construction of a normal window on which two are allocated DW, whose DW-objects obtain the data from one table. The first DW-object has the tabular idea, the second - Freeform so at navigation on the first DW in the second the data should be replaced, displaying them in more details. And they are replaced! Though I in any way will not understand, how it managed to be made...
In SQL which delivers the data for the second, detailed DW, it is defined retrieval argument (on a key field of the table). But I will not understand, where I had time to establish connection of this argument with relocation on the first DW. We tell, in Lazarus it would be necessary to write a script for relocation event on the first window where value of a key field would be traced, then it would be appropriated retrieval argument and the command on update of the second window moved.
Here I only read a phrase: "When you put this DataWindow object into the tutorial application, you write a script that passes the required argument to the DataWindow automatically".
(In the beginning understood as "When you place this DW-object [object with retrieval argument] in educational application, you write a script which transfers demanded argument to object DW automatically".)
Rummaged all example - I do not see, where this argument is installed and where I wrote this script... Perhaps it is a question what is a script it is written AUTOMATICALLY, at an object location to application?
I in some confusion ...

2

Re: How there is an information binding in two DW through retrieval argument?

Apprehension wrote:

Rummaged all example - I do not see, where this argument is installed and where I wrote this script... Perhaps it is a question what is a script it is written AUTOMATICALLY, at an object location to application?
I in some confusion ...

Reconsidering a magic full-sphere I can assume
1. At window loading (event open) is established connection between two  type
dw_form.shareData (dw_list)

3

Re: How there is an information binding in two DW through retrieval argument?

pand;
Variant 2
At change of a line in the list (event rowfocuschanged)
There is a line of update of the form
dw_form. Retrieve (object.key_id [newrow])
Further the magic full-sphere misted over. More I see nothing.
Now Dim2000 fleeces reaches - tells more precisely.
P.S. Result  code scraps which write

4

Re: How there is an information binding in two DW through retrieval argument?

Apprehension wrote:

In SQL which delivers the data for the second, detailed DW, it is defined retrieval argument (on a key field of the table).

Means   a variant

Apprehension wrote:

But I will not understand, where I had time to establish connection of this argument with relocation on the first DW.
Rummaged all example - I do not see, where this argument is installed and where I wrote this script... Perhaps it is a question what is a script it is written AUTOMATICALLY, at an object location to application?
I in some confusion ...

Automatically  how much to me it is remembered nothing writes.
That you could write..... Someone from  can and tells, to me it is difficult.
There is still a variant if you use library pfc and at window discovery
Initialize service Linkage

5

Re: How there is an information binding in two DW through retrieval argument?

Here that I tore out (functions and window events in which these are allocated two Dw):
dw_master - DW with tabular object
dw_detail - DW with freeform-object ("tape"?) where the detailed information only on table single line is deduced.
CLASS: w_master_detail_ancestor [w_pbtutor_basesheet]
EVENT: open () returns long [pbm_open]
dw_master.settransobject (sqlca)
dw_detail.settransobject (sqlca)
this. EVENT ue_retrieve ()
(There is an EVENT of the ANCESTOR, but there there is nothing connected with )
EVENT: ue_retrieve ()
IF dw_master. Retrieve () <>-1 THEN
dw_master. SetFocus ()
dw_master. SetRowFocusIndicator (Hand!)
END IF
EVENT: ue_insert ()
dw_detail. Reset ()
dw_detail. InsertRow (0)
dw_detail. SetFocus ()
EVENT: ue_update ()
IF dw_detail.update () = 1 then
COMMIT using SQLCA;
MessageBox ("Save", "Save succeeded")
else
ROLLBACK using SQLCA;
end if
EVENT: ue_delete ()
dw_detail. DeleteRow (0)
[Obviously, last event is written with an error as the program behaved not how is declared. I consider that is correct dw_master. DeleteRow (0)]
Actually, that's all, that I found.

6

Re: How there is an information binding in two DW through retrieval argument?

Actually, DW non-standard - they undertake from the library delivered in the distribution kit specially for an example, but their new functional is restricted only to error handling (us, , learn to close in the beginning at an error current transaction, and then to inform the user the bad news smile

7

Re: How there is an information binding in two DW through retrieval argument?

Apprehension;
dw_master
dw_detail
Are inherited from a window w_pbtutor_basesheet or are created at a current window
If are inherited that look window events w_pbtutor_basesheet
Most likely behavior dw are described in it

8

Re: How there is an information binding in two DW through retrieval argument?

DV-shki dw_master and dw_detail non-standard also are inherited from the user class u_dwstandard, defined in library which is delivered on the distribution kit as a part .
But in this class some events of error handling are redefined only
Example:
EVENT: dberror (...)
this. EVENT uevent_dberr_initial ()
this. POST EVENT uevent_dberr_message AND
(sqldbcode, sqlerrtext, row, buffer)
RETURN 1
uevent_dberr_initial Are not filled yet (will be further on , apparently, in it we close transaction), and uevent_dberr_message simply deduces the message.
So and here I found nothing... The class u_dwstandard is inherited from datawindow.
Perhaps at someone is similar ? ^ __ ^ Ilija simply not there looked? sad

9

Re: How there is an information binding in two DW through retrieval argument?

12/2/2016 13:34, Apprehension writes:
> We tell, in Lazarus it would be necessary to write a script for relocation event
> On the first window where value of a key field, then it would be traced
> It would be appropriated retrieval argument and the command on update moved
> The second window.
Here the most obvious variant looks approximately as smile.
> Rummaged all example - I do not see, where this argument is installed and where I
> Wrote this script... Perhaps it is a question that is a script it is written
> AUTOMATICALLY, at an object location in application?
writes nothing smile.
I would begin with place search where it is caused dw_detail. Retrieve (). Simply
Search in all project.

10

Re: How there is an information binding in two DW through retrieval argument?

pand wrote:

1. At window loading (event open) is established connection between two  type
dw_form.shareData (dw_list)

pand wrote:

a variant 2
At change of a line in the list (event rowfocuschanged)
There is a line of update of the form
dw_form. Retrieve (object.key_id [newrow])

If to eliminate point "communication through an astral" so it and is smile.

pand wrote:

Now Dim2000 fleeces reaches - tells

more precisely
I, can, and told, if though time saw this most  wink.

11

Re: How there is an information binding in two DW through retrieval argument?

To deliver break point in event retrieveend. If there is nothing to deliver - to import there type expression i = 1. To launch under .
To check up call stack (a call stack). There the sequence of a call should be visible.

12

Re: How there is an information binding in two DW through retrieval argument?

! Found through a window . Unfortunately (or, in our business, - fortunately), miracles do not happen, and there was all the same a carelessness.
Really, event rowfocuschanged for dw_master has been changed! Like looked, but, probably, not quite it was still mastered with the interface.
long ll_itemnum
ll_itemnum = this.object.data [currentrow, 1]
IF dw_detail.retrieve (ll_itemnum) =-1 then
MessageBox ("Retrieve", "Retrieve error-detail")
end if
Thanks big for answers - were interesting!)

13

Re: How there is an information binding in two DW through retrieval argument?

12/5/2016 13:16, Apprehension writes:
> Really, event rowfocuschanged for dw_master has been changed!
Absolutely standard reception smile.