ButtonBar in resource ?

Re: ButtonBar in resource ?

Postby James Bott » Tue Mar 24, 2015 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: ButtonBar in resource ?

Postby TimStone » Thu Mar 26, 2015 4: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
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ButtonBar in resource ?

Postby James Bott » Thu Mar 26, 2015 5:33 pm

Ok, you could create an object just to contain everything you want to pass.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: ButtonBar in resource ?

Postby nageswaragunupudi » Tue Apr 07, 2015 6:14 pm

Mr Tim

Please see
viewtopic.php?f=3&t=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
User avatar
nageswaragunupudi
 
Posts: 10316
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests