Objects in Dialog

Post Reply
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Objects in Dialog

Post by fraxzi »

How to know if user changed any get object's value within the dialog?

Any working sample please....


Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Objects in Dialog

Post by richard-service »

fraxzi wrote:How to know if user changed any get object's value within the dialog?

Any working sample please....


Regards,
Hi

Try to use Valid command to control GET Object value.

Regards,

richard
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Post by fraxzi »

Thanks for the reply :)

I resorted to old fashioned solution.... I put function after 'ON CHANGE' on every GET objects... and enable the save button if there are changes...


I was hoping that there is a function which has return (boolean) if any object's value was changed within the said dialog.


Thank you!
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

>I resorted to old fashioned solution.... I put function after 'ON CHANGE' on every GET objects... and enable the save button if there are changes...

I think this is the only way to do it.

>I was hoping that there is a function which has return (boolean) if any object's value was changed within the said dialog.

Even if there was such a function, you would still have to call it from the ON CHANGE clause of each control.

Still this method is not foolproof as the user could change something, then change it back to the original data and the Save button would still be enabled. I know, you are thinking that they could just press the Cancel button, and that is true but there is a visual indication that something has changed, when it hasn't.

Regards,
James
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Post by fraxzi »

You are absolutely right Mr. James! 8)
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Frances,

You could try this:

if AScan( oDialog:aControls, { | o | Upper( o:ClassName() ) == "TGET" .and. o:oGet:changed .and. ( o:oGet:VarGet() != o:oGet:Original ) } ) != 0

MsgInfo( "Gets changed" )

endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Post by fraxzi »

Thanks Mr. Antonio! :D

That's a brilliant approach 8)


Regards,
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Post Reply