Wrox Programmer Forums
|
BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8
This is the forum to discuss the Wrox book Professional C# 2008 by Christian Nagel, Bill Evjen, Jay Glynn, Morgan Skinner, Karli Watson; ISBN: 9780470191378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2009, 08:58 AM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing objects by recursive search

As a delphi programmer I got charmed by the fact that you can find objects using a recursive search for memory objects in two ways :
-using the control tree in the GUI - this stays working in dotnet
-using the memory ownership tree - in delphi you'd be talking about the Components tree - this appears not to stay working in dotnet.

In delphi this feature did allow me to flag controls by simply making them owner of an object. I'd create objects - say by the classname 'MyFlag', and let them be owned by controls that I want to find later.
I'd search the ownership tree for objects of type 'MyFlag', take their owner and was able to manipulate the control as needed.

In dotnet it appears to me that you can define a datamember inside an (control-)object and use the new operator to initialize it. This appears to me as to be the only way that you can avoid automatic cleanup by the dotnet memory manager.
Is there a way I can select all (control-)objects for which such a datamember has been initialized ?

Thank you for your attention - I hope such can be realized in a way I did not see.

The context in which this would be used is described next :
-in the context of insurance prime calculation panels calculation results must be hidden when retyping occurs. Flagging the calculated controls is a comfortable way to hide them groupwise and to make them reappear when necessary.
-We'd create 'Condition objects' to be processed by some processor that would decide by the contents of the 'Condition objects' and data conditions if a control should be visible or hidden.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing Search on business objects in NTier Architecture ? David johnsan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 April 22nd, 2009 03:10 PM
Accessing Google search with Java jvlaine Java Basics 3 December 15th, 2007 03:08 AM
Recursive Search of Registry mmcdonal VBScript 1 January 6th, 2006 10:36 AM
Accessing Drawing Objects from code isuru Excel VBA 0 August 29th, 2005 11:45 PM
Accessing application objects from session EJBs enghoe BOOK: Expert One-on-One J2EE Design and Development 0 January 7th, 2004 02:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.