RE: [icf-dev] Applying Entry to Smart Data Fields

Posted by LegacyUser on 05-Jun-2003 08:11

Thanks Richard, I tried your suggestion and changed the combo to a valid

entry and ran ValueChanged. The combo was updated to show the correct entry

but the focus is still on the second field in the viewer.

Tony T.

-Original Message-

From: Richard Lausecker

Sent: 04 June 2003 15:01

To: dev@dynamics.possenet.org

Subject: AW: Applying Entry to Smart Data Fields

Maybe you can do the following:

IF VALID-HANDLE (hMediaTypeObj) THEN DO:

.

ASSIGN hLookup:SCREEN-VALUE = STRING (gdMediaTypeObj).

RUN valueChanged IN hMediaTypeObj.

END.

Where hMediaTypeObj is derived from AllFieldNames and AllFieldHandles.

You could use a function like this to get the handle of the underlying

field:

FUNCTION getFieldHandle RETURNS WIDGET-HANDLE

( INPUT pcFieldName AS CHARACTER ) :

/*

Purpose: Get the Handle of a specific Widget

Notes:

--*/

DEFINE VARIABLE iFieldPosition AS INTEGER NO-UNDO.

IF gcAllFieldNames = '':U OR gcAllFieldHandles = '':U THEN

ASSIGN gcAllFieldNames = DYNAMIC-FUNCTION ('getAllFieldNames':U IN

TARGET-PROCEDURE)

gcAllFieldHandles = DYNAMIC-FUNCTION ('getAllFieldHandles':U

IN TARGET-PROCEDURE).

ASSIGN iFieldPosition = LOOKUP (pcFieldName, gcAllFieldNames).

RETURN (IF iFieldPosition 0 THEN WIDGET-HANDLE (ENTRY (iFieldPosition,

gcAllFieldHandles)) ELSE ?).

END FUNCTION.

HTH, Richard.

-Ursprüngliche Nachricht-

Von: Tony Troth

Gesendet: Mittwoch, 04. Juni 2003 15:40

An: POSSE Group

Betreff: Applying Entry to Smart Data Fields

Does anyone know how I can apply entry to a Dynamic Combo in the following

scenario...

I have a dynamic viewer with some fill-in fields and a dynamic combo box on

top of a fill-in field. The dynamic combo is the first field on the viewer

and, as such, requires focus on initialisation of the routine. The dynamic

viewer is on a container which does not have an SDO and, therefore, no data

links, etc.

When the routine is executed the focus is on the first non dynamic field.

Because there is no SDO associated with this viewer I have enabled the combo

by running "EnableField" and then I have applied "Entry" to the handle of

the combo. This still doesn't put focus onto the combo.

Any ideas?

Tony Troth.

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

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

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

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

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

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

All Replies

This thread is closed