Capture Smart Toolbar Mode

Mtas

New Member
I have a smartframe with SDO, Viewer and smart toolbar. On the toolbar apart from the normal add, delete, save button I have two other buttons which allow data entry. What i want to do is if the user changes something in the viewer thus resulting in the Save, cancel button being activated in the smart toolbar, disable the other two buttons which allow data entry.

What event would be best to use to capture data change. I dont want to do it on value-change of each fill-in or combo box I have. Any help will be appreciated.

Cheers.
 
Greetings,

Simple, set up a logical var. Then in the local-enable-fields (ADM 1 term) set ur flag, then do the reverse in the local-disable-fields (ADM 1 term). This flag will let you know when the fields are available for update eg somebody has selected the update / add / button on the toolbar.
Then you can just check your flag in the appropriate place.
Regards
 
Will not work. Not worried about the add mode, i want to capture update mode. The user will change something in the viewer, say a value in the combo box, appropriate buttons are enabled/disabled in toolbar but enable/disable fields is not fired in the viewer. I am using progress 9.1c (ADM2).
 
Hi,

Can't remember the exact function, but try sticking message boxes in the following two - hopefully one of those should fire on change.

(in SDViewer)

UpdateRecord
ValueChanged (this applies to whole SDV, I think, not just individual fields)


Lee
 
Update record fires when you hit the save button on the toolbar and could not find a value change event for the SD viewer I think they only exist for indvidual fields.
 
Sorry, I should have been clearer: it's an overridden procedure, not function or event:


SDV>New Procedure>Override>ValueChanged.


Note: I think ValueChanged is only fired when the Widgets representing underlying SDO fields are changed. ie. you will have to manage added (non-SDO) widgets yourself. Test this though, 'cos I can't remember offhand.

regards,

Lee
 
Firstly, make sure you are looking at SDViewer, not SWindow, etc. (sorry to state the obvious).


If that fails,

I'm outside my area of expertise here, but...

Check you have following code in your ADM2/viewer.i procedure, and that it is in your propath:
(eg. C:\Program Files\Progress\src\adm2\viewer.i)


/* Capture update keystrokes and signal the start of an update, so that
* checkModified can work and to control the state of Panels. */
ON VALUE-CHANGED OF FRAME {&FRAME-NAME} ANYWHERE
RUN valueChanged IN THIS-PROCEDURE.

/* Application code that defines vbalue-changed should run valueChanged
* as above, but for backwards compatibility we also support
* VALUE-CHANGED triggers that APPLY 'U10' TO THIS-PROCECURE.*/
ON 'U10':U OF THIS-PROCEDURE
RUN valueChanged IN THIS-PROCEDURE.


RUN start-super-proc("adm2/viewer.p":U).



And there should be a corresponding 'ValueChanged' procedure in viewer.p.

Also viewprto.i should have 'ValueChanged' definition, I think.


If not, I think you are not picking up correct/most recent ADM2 (I am on 9.1D07).


Finally, when you find the override, make sure everything appropriate is enabled and linked correctly.

If you still have problems, try PEG forums as well, as you may get more useful response there.

Lee
 
Back
Top