dynamic

Silverlight 2: C# INotifyPropertyChanged on dynamically created object?

This is the same Question as one I asked earlier BUT that one was in reference to normal C#. This is Silverlight 2, and I don't have ICustomTypeDescriptor So here is the question again: I have, say a few switch panels (for those that like analogies). Each of these switch panels has switches that have a Name(string) can be in state(bool...

How do create a Dynamic class in C# 4?

I want to create an object in C# and have it do interesting things based on the name of the non-existent method that gets. In ruby, this is method_missing. In Perl, this is AUTOLOAD. I can't seem to find the way into System.Dynamic in C#. ...

Dynamic source code in C++

How to process dynamic source code in C++? Is it possible to use something like eval("foo")? I have some functions that need to be called depending on user's choice: void function1 (); void function2 (); ... void functionN (); int main (int argv, char * argv []) { char * myString = new char [100]...

How to typecast an id to a concrete class dynamically at runtime?

Hi everyone, I have several dataSources I use for one UIViewController. My view controller uses KeyValue Observing in order to follow the state of certain properties at runtime. When I swap dataSources, I need to stop observing those properties. The problem is, I'm not sure of the class of the dataSource at runtime, therefor something l...

Instantiating anonymous object using C# object initializer syntax stored in string

Using the C# object initializer syntax I can instantiate an anonymous object like this: object empData = new { name = "bob", age = 30, salary = 100000 }; But what if I have the initializer stored in a string, e.g.: string init = "{ name = \"bob\", age = 30, salary = 100000 }"; Whats the best way of converting this string into an in...

Creating dynamic data entry forms

Hi, I have a small project where I would like to generate dynamic data entry forms with a little bit of logic behind them. A simple use case might be a Football resulting form, so you have a button for a goalscorer, and when clicked the user will be prompted for a player. The form will then send a message (probably to a webservice, but...

Dynamic two or more levels sub-menu generation in vb6

Friends, Tell me how to generate more than 1 levels of sub-menu in VB6 at runtime? Explain in brief? Any specific controls are there? But i dont want to use external controls! ...

all of a sudden...dynamic created imagebutton's click event wont fire.

hi i have a page that dynamic create a table of contacts, if the contact got an email i also create an image button with a click event. i have a similar function in the rest of the page that works perfectly. and i used this before without any problems. protected void CreateContactsList(IQueryable<AA_BranschFinder.Login.vyWebKontaktpers...

jQuery - Sortable with divs

Is it possible to sort div layers? Examples only show list items being sorted. I currently use one function to control dynamically created divs (based on a MySQL result). This one function keeps the movable layers in one div. ...

Easy one? Access an object's property by using a variable in C#

Possible Duplicate: Property Name and need its value Hi, This one should be easy for most people. I'd like to access a normal variable in an object (let's say example) by using a variable value. E.g.: I have a an array with a list of variable names and I want to get the information from the object by using them. Obviously this...

Dynamically adding content to a UI with javascript squashes content below in IE7 and 8

Hi there, can anyone help? I have a simple html file which i am filling via javascript, in firefox all the content below autosizes hence the more content i add the content below (in another div) moves down but in IE it doesn't. I am using overflow set to visible this is the html (part of) - its the id="extras" i am adding to, i am ad...

Dynamic form submission using javascript - how to elegant code?

Here is the problem: My page displays a set of items. Each item has a check box associated to it (which is part of a form). User might check any of these check boxes and press 'Delete' button. The same page also has a 'Upload' button which would upload an excel sheet of items. At the moment, my form action sumbits to say : "xyzAction"...

How do I work with dynamic multi-dimensional arrays in C?

Does someone know how can I use multi-dimesional arrays using C? Is that possible? Thanks a lot... ...

In python, how can you unload generated classes

I am working on a library that loads files (hfd5 - pytables) into an object structure. The actual classes being used for the structure is loaded as a string from the hdf5 file, and then loaded in this fashion: class NamespaceHolder(dict): # stmt is the source code holding all the class defs def execute(self, stmt): exec ...

Flex 3 Tooltip

I am using a custom advanced auto-complete component. Selected items do not have a tooltip by default, but I would like to use the label as my tooltip. The arraylist allQuestions is the dataprovider to my component. <components:AdvancedAutoComplete id="addQuizQuestions_txt" width="800" height="300" dataProvider="{allQuestions}" labelF...

Dynamically Add Div Table Rows in VB.NET

Hi, Im a VB.NET beginnger, can anyone tell me how I can dynamically add a div table row or how I can loop a section of html? thanks. ...

Mysql Create Table with dynamic database name

Hi All, I am creating database at runtime and I want to create the tables in that database at the same time. can anyone give me any thought on how to do that? For Example - I have created one database named 'mydb' and now in the same proess i am trying to create the table i am using the mysql stored procedure for the same. my proc inp...

CSS on a separate file or not?

Which is a better option: to store CSS on a separate file or on the same page? Let's forget the fact that changing the CSS on a file makes it to apply all HTML pages directly. I am using dynamic languages to generate the whole output - so that does not matter. A few things I can think of: 1) CSS on a separate file generates less bandwi...

Dynamic C#.NET Webservice

I am using a class in a C# ASP.NET project to allow a script written in some random scripting language to expose webservice methods dynamically - in other words, the script should be able to expose a method of any name with any signature (as long as it's valid, anyway) to the outside world through this SOAP interface (able to add and rem...

What's the best source of information on the DLR (.NET 4.0 beta 1)?

I'm currently researching the 2nd edition of C# in Depth, and trying to implement "dynamic protocol buffers" - i.e. a level of dynamic support on top of my existing protocol buffer library. As such, I have a DlrMessage type derived from DynamicObject. After a little bit of playing around I've managed to get it to respond to simple proper...