On 2011-02-08 05:54, Robert Jacques wrote:
On Sat, 05 Feb 2011 13:14:42 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-04 05:07, Jonathan M Davis wrote:
[snip]
Most of the good examples of runtime reflection that I'm aware of
require user-
defined attributes. But there are libraries in
On Sat, 05 Feb 2011 13:14:42 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-04 05:07, Jonathan M Davis wrote:
[snip]
Most of the good examples of runtime reflection that I'm aware of
require user-
defined attributes. But there are libraries in Java (and presumably C#)
that do
stuff
runtime reflection. Then you can query the
database,
also using runtime reflection:
Post.find_by_name_and_body(some title, the body)
Will find the first row where title and body matches the given
values.
FWIW, python example of Calling method by name (using no exotic feature):
class C:
def
On 2011-02-04 05:07, Jonathan M Davis wrote:
On Thursday 03 February 2011 19:29:15 Robert Jacques wrote:
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborgd...@me.com wrote:
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %uf...@jhgjhb.com wrote:
I know is
On 2011-02-04 17:17, Adam Ruppe wrote:
Jacob Carlborg wrote:
The class Post maps to the database table posts, no configuration is
necessary. Then you can use the column names in the table as fields to
set and get data, like this:
post = Post.new
post.title = some title
post.body = the body
On 2011-02-04 04:29, Robert Jacques wrote:
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %u f...@jhgjhb.com wrote:
I know is possible to create an object from its name. It's possible to
Jacob Carlborg wrote:
The class Post maps to the database table posts, no configuration is
necessary. Then you can use the column names in the table as fields to
set and get data, like this:
post = Post.new
post.title = some title
post.body = the body
post.save # will update the database
method by name (using no exotic feature):
class C:
def __init__(self, x):
self.x = x
def write (self, thing):
print %s == %s ? %s \
%(self.x,thing, self.x==thing)
def runMethodWithArgs (object, name, *args):
method = getattr(object, name)
method(*args)
c
On 2011-02-02 21:11, Robert Clipsham wrote:
On 02/02/11 20:00, Jacob Carlborg wrote:
On 2011-02-02 20:42, Robert Clipsham wrote:
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at
On 2011-02-02 22:51, Stanislav Blinov wrote:
On 02/02/2011 11:11 PM, Robert Clipsham wrote:
On 02/02/11 20:00, Jacob Carlborg wrote:
On 2011-02-02 20:42, Robert Clipsham wrote:
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method
03.02.2011 12:54, Jacob Carlborg пишет:
On 2011-02-02 22:51, Stanislav Blinov wrote:
AFAIK, D2's TypeInfo and friends do have an interface for runtime
reflection (methods offTi() and getMembers()), though a quick glance
shows they're not implemented, i.e. return null all the time.
I think
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %u f...@jhgjhb.com wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be possible?
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %u f...@jhgjhb.com wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is
On Thursday 03 February 2011 19:29:15 Robert Jacques wrote:
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %u f...@jhgjhb.com wrote:
I know is possible to create an object from its name.
On Thu, Feb 3, 2011 at 10:07 PM, Jonathan M Davis jmdavisp...@gmx.comwrote:
On Thursday 03 February 2011 19:29:15 Robert Jacques wrote:
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-03 05:52, Robert Jacques wrote:
On Wed, 02 Feb 2011 12:55:37 -0500, %u
On Thursday 03 February 2011 20:23:25 Andrew Wiley wrote:
On Thu, Feb 3, 2011 at 10:07 PM, Jonathan M Davis jmdavisp...@gmx.comwrote:
On Thursday 03 February 2011 19:29:15 Robert Jacques wrote:
On Thu, 03 Feb 2011 08:49:54 -0500, Jacob Carlborg d...@me.com wrote:
On 2011-02-03 05:52,
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be possible?
string classname, methodname;
// Ask the user for class and method.
auto obj = Object.factory(classname);
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be possible?
string classname, methodname;
// Ask the user for class and method.
auto obj
On 2011-02-02 20:42, Robert Clipsham wrote:
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be possible?
string classname, methodname;
//
On 02/02/11 20:00, Jacob Carlborg wrote:
On 2011-02-02 20:42, Robert Clipsham wrote:
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be
On 02/02/2011 11:11 PM, Robert Clipsham wrote:
On 02/02/11 20:00, Jacob Carlborg wrote:
On 2011-02-02 20:42, Robert Clipsham wrote:
On 02/02/11 17:55, %u wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at
On 2/2/11, Stanislav Blinov stanislav.bli...@gmail.com wrote:
AFAIK, D2's TypeInfo and friends do have an interface for runtime
reflection (methods offTi() and getMembers()), though a quick glance
shows they're not implemented, i.e. return null all the time.
Talk about posting this after I've
On Wed, 02 Feb 2011 12:55:37 -0500, %u f...@jhgjhb.com wrote:
I know is possible to create an object from its name. It's possible to
call a method from that object if the name is only known at runtime?
Would something like the following be possible?
string classname, methodname;
// Ask the
23 matches
Mail list logo