How to bound variable to windows/dialog

How to bound variable to windows/dialog

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

Re: How to bound variable to windows/dialog

Postby Antonio Linares » Sat May 22, 2010 5:44 pm

Frances,

Could you provide a small example of what you need ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to bound variable to windows/dialog

Postby James Bott » Sat May 22, 2010 9: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: Select all  Expand view
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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: How to bound variable to windows/dialog

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

Re: How to bound variable to windows/dialog

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

Re: How to bound variable to windows/dialog

Postby James Bott » Thu May 27, 2010 3: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests