SalWaitCursor( ) return value.

forum.wishlist (1998-2005) & forum.gupta.wishlist (2005-2010)
czavala
Honduras
Posts: 195
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

SalWaitCursor( ) return value.

Post by czavala » 30 Aug 2006, 22:25

 Posted by:  Conrado Zavala 

Hello,

Personally I consider that a return FALSE for SalWaitCursor( ) should be
something very rare. If it's so, could you change this behavior in order to
return the value that was passed as parameter? When I code my tendency is
to do the following:

Dialog Box: dlgProfile
...
Contents
Datafield: dfName
Message Actions
On SAM_Validate
If SalSendMsg ( hWndForm, PM_Find, 0, 0 )
...
Else
...
Return TRUE
...
Message Actions
On PM_Find
Call SalWaitCursor( TRUE )
If SalIsNull( dfName )
Call SalMessageBox( "dfName is empty", "Error", MB_Ok )
Call SalWaitCursor( FALSE )
Return FALSE
Else
...
Call SalWaitCursor( FALSE )
Return TRUE

I would rather to do the following:
Dialog Box: dlgProfile
...
Contents
Datafield: dfName
Message Actions
On SAM_Validate
If SalSendMsg ( hWndForm, PM_Find, 0, 0 )
...
Else
...
Return TRUE
...
Message Actions
On PM_Find
Call SalWaitCursor( TRUE )
If SalIsNull( dfName )
Call SalMessageBox( "dfName is empty", "Error", MB_Ok '
Return SalWaitCursor( FALSE )
Else
...
Call SalWaitCursor( FALSE )
Return TRUE

Thank You,

Conrado

Rainer Ebert

SalWaitCursor( ) return value.

Post by Rainer Ebert » 31 Aug 2006, 09:50

 Posted by:  Rainer Ebert 

I hope Gupta will not change the return behaviour of SalWaitCursor().

We use the return value to determine the previous state and to restore this
state later. E.g. in our global error handler, the wait cursor is turned off
while an error message is displayed. After this, the wait cursor is restored
to it's previous state. If the return value would be changed in your way,
our code would not work any more.

Rainer

Mirko
Italy
Posts: 1431
Joined: 04 Apr 2017, 08:56
Location: Geneva

SalWaitCursor( ) return value.

Post by Mirko » 31 Aug 2006, 14:12

 Posted by:  Mirko BONANNO 

Sorry Conrado but today it works the way it should and this behavior must
not change !!!

Make your own function MyWaitCursor and give it the behavior you want if you
really need it ;-)

Ciao
Mirko

czavala
Honduras
Posts: 195
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

SalWaitCursor( ) return value.

Post by czavala » 31 Aug 2006, 22:27

 Posted by:  Conrado Zavala 

Thanks,

Return to “gupta.wishlist”

Who is online

Users browsing this forum: [Ccbot] and 0 guests