Overide of Update problem (Smart)

Paul Gale

New Member
Hi,

(Version 9.1D using smart objects )

I've got a deadline approaching and can't find this what will no doubt turn out to be a simple answer. :blush:

I have a smart window with a browser and a hidden viewer. If I select Add on the toolbar i've overidden the Add Record procedure (in Viewer) to call a sepearte program to do my maintenance. This works fine. If I press Update .. i've overidden the Enable fields procedure (in Viewer) to call this same progarm (passing the details from my hidden viewer.) When I return from this program .. my smart Toolbar only has the Cancel key active .. (I can press cancel to continue but not right !!) I understand that I need to replicate some default behaviour .. Could some kind soul point me in the right direction ?

Many thanks

Paul Gale
 
It is so that the default behaviour is since a few service packs that you can't save what hasn't changed yet.
Therefore you must Progress let think that some widget has changed indeed :
In the enableFields override of the smartviewer :

APPLY "VALUE-CHANGED" TO SomeField.

Good luck.
 
I've tried this .. still the same .. my code is posted below.

any other suggestions out there ? please !!

Paul

/*------------------------------------------------------------------------------
Purpose: Super Override enableFields
Parameters:
Notes:
------------------------------------------------------------------------------*/
DEFINE VARIABLE h-dataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE operator-id AS CHARACTER NO-UNDO.
DEFINE VARIABLE h-container AS HANDLE NO-UNDO.
h-container = getcontainersource ().
operator-id = DYNAMIC-FUNCTION("getUserProperty" IN h-container,"operator-id").
/* "0" = screen select of schecule, other value allows window selection */
RUN maintenance/wfmCreateRelationship.w (rowobject.schedule-code:SCREEN-VALUE IN FRAME {&FRAME-NAME}, rowobject.cluster-code:SCREEN-VALUE,
rowobject.hub:SCREEN-VALUE, operator-id).
APPLY "VALUE-CHANGED" TO rowobject.schedule-code.
h-dataSource = getDataSource ().
DYNAMIC-FUNCTION ('openQuery' IN h-dataSource).

/* RUN SUPER. */

END PROCEDURE.
 
Hi

I had similar Problems, try and see if this helps

DEF VAR crowstate AS CHAR NO-UNDO.
DEF VAR hcontainer AS HANDLE NO-UNDO.

DO WITH FRAME {&FRAME-NAME}:


cRowState = 'RowUpdated':U.
{get ContainerSource hContainer}.

IF VALID-HANDLE(hContainer) THEN
DO:

{Set DataModified YES}.

END.
END.
 
Cheers Mike,

well that was interesting now my CANCEL , RESET and SAVE buttons are active ..What I realy need are my ADD, UPDATE and DELETE buttons to be active.. I think All I need to find is the actions that simulates the CANCEL button... as when I press this my toolbar appears as I want it ...

Anybody else able to help out ? Go on you will send me home a happy chap :-)

Paul
 
Good news .. the person I sit opposite knew the answer ..(he is the sort to sit with his head down listening to music). (Happy team !!)


here is the code ..

Overide the update mode routine ..

IF pcMode = "UpdateBegin" THEN DO:

My call to programes, etc

RETURN NO-APPLY.

END.
ELSE /* anything else but add record selected */
RUN SUPER( INPUT pcMode).
Thanks to those that helped. :-)
 
Back
Top