FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to bound variable to windows/dialog
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
How to bound variable to windows/dialog
Posted: Sat May 22, 2010 12:59 AM

Dear Fiwinners,

How to make a dialog/window where variables are independently bound to that dialog/window?
Any sample? Idea?

FYI, Visual xHarbour has this feature.

Regards,
Frances

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to bound variable to windows/dialog
Posted: Sat May 22, 2010 05:44 PM

Frances,

Could you provide a small example of what you need ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to bound variable to windows/dialog
Posted: Sat May 22, 2010 09:28 PM
Frances,

I'm not sure what you mean by "bound" to the dialog or window. Why do you want to do this?

Maybe this will help. You could use the "cargo" data to hold an object. Create a class with all the variables you want then initialize that object and assign it to oDlg:cargo.

Code (fw): Select all Collapse
class TCargo
  data var1
  data var2
   method new()
endclass

method new()
   ::var1:=""
   ::var2:=""
endclass

oMyCargo:= TCargo():new()
oMyCargo:var1:="James"
oMyCargo:var2:="Frances"

oDlg:cargo:= oMyCargo

msgInfo( oDlg:cargo:var2 ) // returns "Frances"

You could use a database object instead of your own defined class if that wold work for you.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: How to bound variable to windows/dialog
Posted: Thu May 27, 2010 08:14 AM

Dear Mr. Antonio,

Yes I will create.. will post here.

Regards,
Frances

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
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: How to bound variable to windows/dialog
Posted: Thu May 27, 2010 08:22 AM
Dear James,

I thought of opening dialog (no wait) and another one (same dialog) ... but the variables are the same..
If I changed value of variable from dialog1 will also affect on the dialog2 since they are both declared on the same dialog..

The variable should be bound to dialog1 and not-related to dialog2.. but are just one-dialog opened as NOWAIT.. something like that..

I saw this in visual xharbour or this youtube http://www.youtube.com/watch?v=gHExFHNihZk

Regards,
Frances
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to bound variable to windows/dialog
Posted: Thu May 27, 2010 03:30 PM

Frances,

Sorry, I still don't understand what you are trying to do. What varaibles are you refering to, those in the TDialog class or those in GETs on the dialog, or something else?

Could you provide a small self-contained example code?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion