Objects in Dialog

Objects in Dialog

Postby fraxzi » Sat May 17, 2008 2:14 am

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
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Objects in Dialog

Postby richard-service » Sat May 17, 2008 2:30 am

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
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Postby fraxzi » Sat May 17, 2008 2:54 am

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
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby James Bott » Sat May 17, 2008 3:13 am

>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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby fraxzi » Sat May 17, 2008 5:31 am

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
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Antonio Linares » Sat May 17, 2008 8:02 am

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
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fraxzi » Sat May 17, 2008 8:50 am

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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 58 guests