FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ButtonBar in resource ?
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: ButtonBar in resource ?
Posted: Tue Mar 24, 2015 04:22 AM
Rao,

The point is we can not define a buttonbar of a dialog within the same function (or method) that defines the dialog itself, whether from resource or source. The buttonbar has to be defined in the INIT clause of the ACTIVATE DIALOG command.


Yes, I understand that was your point.

My point was to show that you do not need to pass lots of variables to a function if you use an object. My point was separate from yours, and I apologize if you thought I was being critical of your solution. I was just showing a way that Tim's variable passing problem could be solved with the use of an object.

Tim said:
Each variable would have to be passed to the button bar control when it's a separate function, and that can be a lot of variables.

This can be solved this way:

ACTIVATE DIALOG oDlg ON INIT myFunction( oCustomer )

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: ButtonBar in resource ?
Posted: Thu Mar 26, 2015 04:13 PM

James,

I should have said "objects". In an Edit dialog there may be multiple data objects involved, and other variables may be in play ( arrays, etc ). They may also be changing status during the use of the edit control. Yes, they can be passed, but it has the potential for being more complex. When everything is in the one method, it's just easier.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: ButtonBar in resource ?
Posted: Thu Mar 26, 2015 05:33 PM

Ok, you could create an object just to contain everything you want to pass.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ButtonBar in resource ?
Posted: Tue Apr 07, 2015 06:14 PM

Mr Tim

Please see

viewtopic.php?f=3t=30518

If you are reorganizing your code into two methods of a class, please wait. You may save lot of time with this new development.

&

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion