|
-
Jun 16th, 2005, 10:36 AM
#1
Thread Starter
Hyperactive Member
Looking for some creative feedback...
Hey all,
Maybe someone here can give me some suggestions, I am trying to design a dynamic class editor that builds itself at runtime and will automatically reflect any changes or new variables added or removed from a class without having to tweak the editor code.
A buddy of mine has done this in a Java enviroment for a project of his and I really would like to do it for my projects. He has added in textboxes and labels in his constructors and builds a form dynamically at runtime.
So I am trying to get some ideas on a good way to do this. I have been thinking about making the editor load the class, then loop through each property in the class and create and bind the controls to the class properties, then line the labels/textboxes in a linear fashion down a scrollable form??
I'm not sure if there is a better way to do this, I'm hoping maybe someone has done something simular and would like to share their knowledge..
thanks..
Hinder
-
Jun 16th, 2005, 12:59 PM
#2
Frenzied Member
Re: Looking for some creative feedback...
is there a chance your friend would share his java code? that sounds interesting.
-
Jun 16th, 2005, 05:21 PM
#3
Thread Starter
Hyperactive Member
Re: Looking for some creative feedback...
 Originally Posted by Andy
is there a chance your friend would share his java code? that sounds interesting.
aye I have it, but I'm not real fluent in java so it's a bit forien to me. You can goto this site and download the server/editor source code. In the GUIBuilder->GUIComponents->GUIDetailPane file. I'm studying it but making it work in .Net is another story.
So nobody else has any feedback on making something of this nature?
Hinder
-
Jun 16th, 2005, 08:32 PM
#4
Frenzied Member
Re: Looking for some creative feedback...
i've been told that java and c# are very similar. so, there should be no major problem getting the syntax from java to vb down fairly easy. I'll give it a shot. I'm interested in learning java and this may either help or scare me away LOL
-
Jun 16th, 2005, 09:15 PM
#5
Re: Looking for some creative feedback...
FYI: I beleive there will be something similar in Visual Studio 2005 (due in Nov)
The System.CodeDom and Microsoft.VisualBasic.VBCodeProvider/VBCodeGenerator, (and the C# versions) will probably come in handy.
Currently CodeDom only supports writing code, and not parsing it, Interpreting already generated classes will be a pain...
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Jun 19th, 2005, 09:42 PM
#6
Thread Starter
Hyperactive Member
Re: Looking for some creative feedback...
Well I have been working on the dynamic editor and it is working quite nicely. Here's a screenie of it.

Now it isn't pretty but it gets the job done. It can load ANY custom class and dynamically create a form, bind the controls to the class properties and even handles nested arrays as long as custom class objects are stored in the nested arrays as opposed to system objects (strings, integers, etc..)
Makes for not having to mess with creating a custom editor for every class you need to have editable access too...
Hinder
Last edited by Hinder; Jun 19th, 2005 at 09:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|