[icf-dev] Dynamic browse trouble

Posted by LegacyUser on 06-Aug-2002 08:31

I am running into some trouble with a dynamic browse I'm working on. I've

been beating my head against this one, and it's time to ask for some

help....

1) In a procedure in the browse's custom-super-procedure, I'm trying to get

some data from the SDO that the browse is connected to, so I put in a call

for

"cDataSource = DYNAMIC-FUNCTION('getDataSource':U IN TARGET-PROCEDURE)."

When I run this line, I'm getting an error message that the function

getDataSource wasn't found. Looking at the list of calls available in a

static browse (from the 'insert call' button of the section editor), it

appears that getDataSource should be perfectly valid.

2) I'm also having some trouble trying to trap when the user double-clicks

on a record in the browse. Currently, when I double-click, it tries to

launch a container. How can I get the browse to run an internal procedure

when the user double-clicks, rather than trying to launch a container??

Thanks--

James

James Burts james@klas.com

Keystone Systems, Inc. 919-782-1143

Manager of Software Development Raleigh, NC

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

All Replies

Posted by LegacyUser on 06-Aug-2002 08:48

To trap double-click on a browse (dynamic at least), I use the following

trigger :

MOUSE-SELECT-DBCLICK on F-Main and i put the following code :

ANYWHERE DO:

IF SELF:TYPE = 'BROWSE':U THEN

/* code example

*/

APPLY "go" TO FRAME .

END.

-Message d'origine-

De : James Burts

Envoyé : mardi 6 août 2002 15:32

À : dev@icf.possenet.org

Objet : Dynamic browse trouble

I am running into some trouble with a dynamic browse I'm working on. I've

been beating my head against this one, and it's time to ask for some

help....

1) In a procedure in the browse's custom-super-procedure, I'm trying to get

some data from the SDO that the browse is connected to, so I put in a call

for

"cDataSource = DYNAMIC-FUNCTION('getDataSource':U IN TARGET-PROCEDURE)."

When I run this line, I'm getting an error message that the function

getDataSource wasn't found. Looking at the list of calls available in a

static browse (from the 'insert call' button of the section editor), it

appears that getDataSource should be perfectly valid.

2) I'm also having some trouble trying to trap when the user double-clicks

on a record in the browse. Currently, when I double-click, it tries to

launch a container. How can I get the browse to run an internal procedure

when the user double-clicks, rather than trying to launch a container??

Thanks--

James

James Burts james@klas.com

Keystone Systems, Inc. 919-782-1143

Manager of Software Development Raleigh, NC

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

Posted by LegacyUser on 06-Aug-2002 08:59

Hi James.

1)This procedure is a persistent trigger?.

Be sure that TARGET-PROCEDURE is the DynBrowser handle using MESSAGE

TARGET-PROCEDURE:FILE-NAME.

2)You could add a super-procedure for the dynBrowser and create the

initializeObject procedure with the following code:

DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.

RUN SUPER.

ASSIGN hBrowse = DYNAMIC-FUNCTION('getBrowseHandle':U IN

TARGET-PROCEDURE).

ON LEFT-MOUSE-DBLCLICK OF hBrowse PERSISTEN RUN brValueChanged IN

TARGET-PROCEDURE.

Add your own code in the brValueChanged internal procedure in the super

procedure.

Marcelo.

--

Marcelo Ferrante

Senior Technical Support Engineer

Progress Software Corporation

Technical Support for Latin American

Phone : (781)280-2759

E-Mail: mferrant@progress.com

"The most beautiful thing we can experience is the mysterious.

It is the source of all true art and science. He to whom this emotion

is a stranger, who can no longer pause to wonder and stand rapt in awe,

is as good as dead: his eyes are closed." Albert Einstein.

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

Posted by LegacyUser on 06-Aug-2002 09:19

Marcello-

Thank you for your suggestions on the problems I was having.

You were correct about checking what the TARGET-PROCEDURE was. I had

overlooked a call that was doing "run ipFoo in THIS-PROCEDURE". It was

then making TARGET-PROCEDURE point to my custom super, rather than the real

target.

Your suggestion for handling the double-click issue also looks like it

should work without a hitch. I don't expect any trouble getting this to

work.

Thanks--

James

James Burts james@klas.com

Keystone Systems, Inc. 919-782-1143

Manager of Software Development Raleigh, NC

--On Tuesday, August 06, 2002 9:59 AM -0400 Marcelo Ferrante

wrote:

Hi James.

>

1)This procedure is a persistent trigger?.

Be sure that TARGET-PROCEDURE is the DynBrowser handle using MESSAGE

TARGET-PROCEDURE:FILE-NAME.

>

2)You could add a super-procedure for the dynBrowser and create the

initializeObject procedure with the following code:

>

DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.

>

RUN SUPER.

>

ASSIGN hBrowse = DYNAMIC-FUNCTION('getBrowseHandle':U IN

TARGET-PROCEDURE).

>

ON LEFT-MOUSE-DBLCLICK OF hBrowse PERSISTEN RUN brValueChanged IN

TARGET-PROCEDURE.

>

Add your own code in the brValueChanged internal procedure in the super

procedure.

>

>

Marcelo.

--

Marcelo Ferrante

Senior Technical Support Engineer

Progress Software Corporation

Technical Support for Latin American

Phone : (781)280-2759

E-Mail: mferrant@progress.com

>

"The most beautiful thing we can experience is the mysterious.

It is the source of all true art and science. He to whom this emotion

is a stranger, who can no longer pause to wonder and stand rapt in awe,

is as good as dead: his eyes are closed." Albert Einstein.

>

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

>

To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org

For additional commands, e-mail: dev-help@icf.possenet.org

This thread is closed