473,396 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

i love reflection:)

guy
just discovered that the combination of visual inheritance and reflection can
eliminate most of the databinding i would normally do, providing the design
is right!

and its only taken me 4 years lol

--guy--

Feb 26 '06 #1
7 1062
Guy,
just discovered that the combination of visual inheritance and reflection
can
eliminate most of the databinding i would normally do, providing the
design
is right!

and its only taken me 4 years lol

And your program is probably performing with the same speed as a VB6
program.

Cor
Feb 26 '06 #2
CMM
That's a little harsh, Cor. I can see how Databinding /w Reflection could
make VB much more RAD akin to MS Access and might remove a lot of the
tediousness with first time set up of forms. If Microsoft has tied the
TableAdaptor to the Dataset, they might as well go the whole 9 yards.

--
-C. Moya
www.cmoya.com
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Guy,
just discovered that the combination of visual inheritance and reflection
can
eliminate most of the databinding i would normally do, providing the
design
is right!

and its only taken me 4 years lol

And your program is probably performing with the same speed as a VB6
program.

Cor

Feb 26 '06 #3
In article <#n**************@TK2MSFTNGP14.phx.gbl>,
no************@planet.nl says...
Guy,
just discovered that the combination of visual inheritance and reflection
can
eliminate most of the databinding i would normally do, providing the
design
is right!

and its only taken me 4 years lol

And your program is probably performing with the same speed as a VB6
program.

Cor

I'm intrigued do you have an example you could share?
Feb 26 '06 #4
guy
hi,
cant give you the code as its in a number of methods in a couple of classes
but:-
in the base form...
load event get a hashtable of all the controls you might want to bind to
add an event handler that binds to the leave event or similar (1 handler for
all the controls) that handler can then use reflection to update the
appropriate property in the business object.
declare a business object of base type
write a display method that uses reflection to display all the properies in
the business object, call this from the event raised in the business object
(below)
ensure that when you name controls in the form they correspond to property
names in the business class, with + txt, lbl or whatever

in the base business class...
raie an event when any property you are interested in changes value

thats pretty much it (written at 3am so i may have missed a few bits!)

drop me an email to gu**********@hotmail.com and i will send you the code
when i have it fully tidied up

cheers

guy
"sp*****@spamsux.net" wrote:
In article <#n**************@TK2MSFTNGP14.phx.gbl>,
no************@planet.nl says...
Guy,
just discovered that the combination of visual inheritance and reflection
can
eliminate most of the databinding i would normally do, providing the
design
is right!

and its only taken me 4 years lol

And your program is probably performing with the same speed as a VB6
program.

Cor

I'm intrigued do you have an example you could share?

Feb 27 '06 #5
So you're not really using DataBinding, but just updating the appropriate
Property when a control changes?
And how does it work when one of the property's of your business object
changes, and the Form must be updated?

Pieter

"guy" <gu*@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
hi,
cant give you the code as its in a number of methods in a couple of
classes
but:-
in the base form...
load event get a hashtable of all the controls you might want to bind to
add an event handler that binds to the leave event or similar (1 handler
for
all the controls) that handler can then use reflection to update the
appropriate property in the business object.
declare a business object of base type
write a display method that uses reflection to display all the properies
in
the business object, call this from the event raised in the business
object
(below)
ensure that when you name controls in the form they correspond to property
names in the business class, with + txt, lbl or whatever

in the base business class...
raie an event when any property you are interested in changes value

thats pretty much it (written at 3am so i may have missed a few bits!)

drop me an email to gu**********@hotmail.com and i will send you the code
when i have it fully tidied up

cheers

guy

Feb 27 '06 #6
"CMM" <cm*@nospam.com> wrote in message
news:uA*************@TK2MSFTNGP15.phx.gbl...
That's a little harsh, Cor. I can see how Databinding /w Reflection could
Actually, I think it was a compliment.
make VB much more RAD akin to MS Access and might remove a lot of the
tediousness with first time set up of forms. If Microsoft has tied the
TableAdaptor to the Dataset, they might as well go the whole 9 yards.

--
-C. Moya
www.cmoya.com


--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Feb 27 '06 #7
guy
Hi Pieter,
no i am not using data binding (except for a few things) it is something i
wanted to move awaw from. If a property in my business object changes i use
an event to update the form.

--guy--

"Pieter" wrote:
So you're not really using DataBinding, but just updating the appropriate
Property when a control changes?
And how does it work when one of the property's of your business object
changes, and the Form must be updated?

Pieter

"guy" <gu*@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
hi,
cant give you the code as its in a number of methods in a couple of
classes
but:-
in the base form...
load event get a hashtable of all the controls you might want to bind to
add an event handler that binds to the leave event or similar (1 handler
for
all the controls) that handler can then use reflection to update the
appropriate property in the business object.
declare a business object of base type
write a display method that uses reflection to display all the properies
in
the business object, call this from the event raised in the business
object
(below)
ensure that when you name controls in the form they correspond to property
names in the business class, with + txt, lbl or whatever

in the base business class...
raie an event when any property you are interested in changes value

thats pretty much it (written at 3am so i may have missed a few bits!)

drop me an email to gu**********@hotmail.com and i will send you the code
when i have it fully tidied up

cheers

guy


Feb 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: A. Wiebenga | last post by:
Hi all! I am a student at the Hogeschool van Arnhem en Nijmegen in Holland. I am currently involved in a research project regarding Reflection. Purpose of the research project is to document...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
2
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
8
by: Robert W. | last post by:
I've almost completed building a Model-View-Controller but have run into a snag. When an event is fired on a form control I want to automatically updated the "connnected" property in the Model. ...
0
by: Shawn Hogan | last post by:
Hi everyone, I've been trying to execute a control's private event code via reflection from another class with the goal of potentially doing some unit testing. The examples below are trying to...
9
by: Kuberan Naganathan | last post by:
Hello all Does anyone know of a good way to use reflection in c++? I don't mean simply using rtti or dynamic casting. I'm talking about java/c# style reflection where an actual instance of...
17
by: raylopez99 | last post by:
What good is C# Reflection, other than to find out what types are in an assembly? And to dynamically invoke methods in an assembly (.dll or .exe)? Also, bonus question, can you use Reflection...
0
by: Gustavo Arriola | last post by:
Hola a todos! Estoy intentando ejecutar un método usando Reflection. El código es el siguiente: public static void SoapHandler(Exception Error) { try { Type assemblyType;
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.