Forums

Using the Object Explorer

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Using the Object Explorer

Postby torial » Tue Feb 02, 2010 9:27 pm

I was wondering if someone could give me some tips on how to use the object explorer. First, I guess, I'm assuming that it is something that is external to my code, so I don't have to make changes to it, but at worst compile it in. Is this assumption correct?

Here's the command switch I tried:
Code: Select all
cobra -ref:System.Windows.Forms -ref:System.Drawing  ObjectExplorer-WinForms.cobra "$(FilePath)"


Thanks.
torial
 
Posts: 229
Location: IA

Re: Using the Object Explorer

Postby Charles » Wed Feb 03, 2010 12:19 am

Yes, you have to compile it in (or compile it into a DLL and reference that).

You also have to augment your program to create it. You might do this anywhere in your program, possibly as part of an if-statement or the target of a button if your program itself has a GUI.

Or you might create it at the end of your .main.

See CobraMain-ObjectExplorer-WinForms.cobra for an example.

Here is a simpler example:
form = ObjectExplorer()
form.text = 'My WinForms Object Explorer'
form.addKeyValue('a list', [1, 2, 3])
form.addKeyValue('a set', {'a', 'b', 'c'})
form.show
Application.run(form)

Let me know if that works for you.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 23 guests