DB aware versions
#1
Posted 31 July 2007 - 02:40 PM
Do you have any plans for dataaware versions of your editors in the near future ?
Didier
#2
Posted 31 July 2007 - 02:49 PM
I have in plan, but I don't think that it can be done in near future.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 31 July 2007 - 02:52 PM
I have in plan, but I don't think that it can be done in near future.
Best regards
Ok, in that case I'll try and do some of them myself. May be you'll find them useful.
Didier
#4
Posted 31 July 2007 - 03:03 PM
If you got some results I will be happy to see them.
Biggest problem is because Delphi doesn't support multiple inheritance and that I will need to create new TNxDBCustomEdit and then inherit other DB editors again from this component
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 31 July 2007 - 03:37 PM
I'll give it a go and let you know how this works
Didier
#6
Posted 31 July 2007 - 03:39 PM
You will need to add same procedures to every component then
I will like to keep standard version separate from db-versions and this may be hard to archieve.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 01 August 2007 - 09:27 PM
You will need to add same procedures to every component then
I will like to keep standard version separate from db-versions and this may be hard to archieve.
Best regards
I gave it a go and seem to have a bit of a problem with updating the data once it's been entered, not sure why. I'll investigate more tomorrow but I might have to ask for some help. Would that be allright or are you too busy at present ?
Didier
#8
Posted 01 August 2007 - 09:44 PM
You may ask and I will try to help
I suggest also that you check VCL source to see how their db-editors are made.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 03 August 2007 - 11:38 AM
I am making good progress with some components. One thing beats me though I can't figure out which event is fired when you click on an item in a tNxComboBox. it seems that I'll need to override that event to properly update the underlying field but find it difficult to follow. Can you point me in the right direction ?
Didier
#10
Posted 03 August 2007 - 03:31 PM
I am glad to hear this
Maybe DoDropDownInput procedure is what you need. This procedure occur when you finish editing inside popup.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#11
Posted 03 August 2007 - 09:14 PM
I might have found a bug in tnxComboBox: Even if it is set to read Only, you can still change it's contents by selecting an item in the dropdown window.
That's blocking me to get a proper behavior in dbaware version. What do you reckon ?
I believe that
begin
{ note: first set ItemIndex then trigger
events (OnChange, OnCloseUp, OnSelect) }
ItemIndex := TNxPopupList(FPopupControl).ItemIndex;
inherited;
end;
Should become
begin
{ note: first set ItemIndex then trigger
events (OnChange, OnCloseUp, OnSelect) }
If Not Readonly then ItemIndex := TNxPopupList(FPopupControl).ItemIndex;
inherited;
end;
and that
begin
Text := Value;
end;
Should become
begin
If not ReadOnly then Text := Value;
end;
And finally should'nt
begin
end;
become
begin
inherited;
end;
?
I am not too sure about the last one, as I am getting confused between DsDropDown and dsDropDownList modes
Hope I am making sense
Didier
#12
Posted 04 August 2007 - 06:53 PM
I will check it today, and try to apply your changes and if they are fine, I will include them.
Thank you!
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#13
Posted 04 August 2007 - 07:51 PM
I will check it today, and try to apply your changes and if they are fine, I will include them.
Thank you!
Best regards
I am now running out of time (I have a prog to deliver on Monday morning, so need to stop playing around. I will resume work later. But probably changing a bit because the gRaph I made made me realise that by changing just tnxEdit I could have a host of object nearly completed in on swoop. ... tempting
and I'll probably work with an interface instead of adding the obects directly (not too sure yet) this way I could have only one set of objects dbaware and non-dbaware ... something the VCL cannot provide. (try to use a tdbedit w/o specifying a datasource/datafield and you'll get my meaning. if
could avoid that ... would be fantastic. but that's for another day
Didier
#14
Posted 04 August 2007 - 09:05 PM
I was try to use interfaces for making Db-aware editors, but it may be anoying implementing same procedures for each new db-edit. Example:
TNxComboBox = class
TNxDBComboBox = class(TNxComboBox, IDBEdit);
This IDBEdit will need to have DataField and DataSource properties, and one TDataLink object need to be created too. It will be tricky definitelly, but it is possible.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#15
Posted 04 August 2007 - 09:57 PM
I was try to use interfaces for making Db-aware editors, but it may be anoying implementing same procedures for each new db-edit. Example:
TNxComboBox = class
TNxDBComboBox = class(TNxComboBox, IDBEdit);
This IDBEdit will need to have DataField and DataSource properties, and one TDataLink object need to be created too. It will be tricky definitelly, but it is possible.
Best regards
I suppose you're right. That's definitely the drawback of interfaces. On the other hand it might allow constructs lile 'if not supports(idataaware) then behave like a normal nxEdit ... for example. I'll have a play asap.
Didier
#16
Posted 04 August 2007 - 10:00 PM
I have think about this too, about implementing DataField and DataSource into TNxCustomEdit and then simply publishe these properties for db-editors. But this also may give some problems
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#17
Posted 04 August 2007 - 11:18 PM
I have think about this too, about implementing DataField and DataSource into TNxCustomEdit and then simply publishe these properties for db-editors. But this also may give some problems
Best regards
Like what for example ?
I have a feeling that you would have to revisit some descendants. Am I right ?
Didier
#18
Posted 05 August 2007 - 12:34 AM
I have do this with NextInspector, every item already have FieldName. So far no problems with it.
But, I am allways aware that Borland/CodeGear will not include support for DB's (TField) in some versions of Delphi/BCB.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











