I don't know why I started thinking about this, but now I can't seem to stop.
In C# - and probably a lot of other languages, I remember that Delphi used to let you do this too - it's legal to write this syntax:
class WeirdClass
{
private void Hello(string name)
{
Console.WriteLine("Hello, {0}!", name);
}
public...
Ladies & Gentlemen,
I´m new to Java, forgive me if it´s obvious, but I haven´t found much about it.
I´d like to create dynamic properties (variables) for a class at runtime (define an object that can be altered at runtime by adding or changing properties and methods).
Reason: I want to store a data model in GAE that can be extended ...
Hi,
I am using a java properties file to store some config information, on Object creation I am loading this information, then at certain points in the objects lifetime I want to overwrite the values in the properties file so that next time an object of this type is instantiated it is configured with current information. the setProperty ...
Hi, I'm writing ASP.NET custom control, and I want it to have a few properties which should be visible only from code behind during run-time - I mean, these properties should not be visible both in a designer and in a aspx code of page containing this control. I've tried to use following attributes:
[DesignerSerializationVisibility(Des...
I am writing an Swing application that uses java properties file to store the application configuration. Currently the file needs to be edited manually
I am looking for a free Swing library that I can integrate into my application so the editing is more user friendly.
...
I am using CultureInfo.CurrentCulture when formating my strings using string.format
To quote this blog
This just has the implication that if
you are using CurrentCulture a lot, it
might be worth reading it into a
private variable rather than making
lots of calls to
CultureInfo.CurrentCulture, otherwise
you're using up cl...
Hello. I had thought I actually had a pretty good handle on the whole view controller model, but something just doesn't seem to making much sense for me. My main issue is with adding a custom UIView subclass as a property of a UIViewController subclass.
Whenever I assign a valid instance of a UIView subclass to that property, nothing h...
I have an application which displays properties dialogs for various GUI-accessible objects. Because there are a huge number of different kinds objects, there are also a huge number of different properties dialogs. Because we are lazy, we didn't want to hand-build each and every properties dialog; additionally, plugins might introduce new...
I have this code in one of my @PersistenceCapable classes:
@Persistent
private Blob data;
The Blob can be quite big, so I'd like to load it lazily since most of the times I don't need it. How can I annotate that property to avoid immediate loading? I could create another class that contains the Blob alone and then use a lazy one-to-on...
I've done plenty of Method Overloading, but now I have an instance where I would like to Overload a Property. The IDE in Visual Studio seems to allow it, since I can actually set up the two overloads, but I get an error saying it is not valid because they only differ in type. I think I'm missing something in my syntax?
I want to be ab...
How do i change order of properties in DBML file (L2S)
I really do not want delete and then re-drop my table from database
...
I'm writing a custom DataGridView object for a large project to hand out to a bunch of developers to make our app sections look consistent.
I want to set defaults for many of the properties of the DataGridView, and I can set many of them like this:
<System.ComponentModel.Browsable(True), System.ComponentModel.DefaultValue(DataGridViewA...
I've seen many examples online and in this forum of how to create properties in Python with special getters and setters. However, I can't get the special getter and setter methods to execute, nor can I use the @property decorator to transform a property as readonly.
I'm using Python 2.6.4 and here is my code. Different methods to use p...
I have an object that I set as the datasource for a gridview - this works fine, I get a nice table on the page with a column for each public property.
But - I always want to hide one of the columns (but still need it available as a public property.
I'm using a clunky hide-column-on-row-created fix for now, but am looking for a better s...
Hi, I want to add new property to 'myObj', name it 'string1' and give it a value of 'string2', but when I do it it returns 'undefined:
var myObj = new Object;
var a = 'string1';
var b = 'string2';
myObj.a = b;
alert(myObj.string1); //returns 'undefined'
alert(myObj.a); //returns 'string2'
In other words: How to create an object prope...
I wanted to get list of properties for an Microsoft indexing catalog. Is there a way? If yes how can it be done..?
I use C# 3.5
...
I have read in many places that exposing fields publicly is not a good idea, because if you later want to change to properties, you will have to recompile all the code which uses your class.
However, in the case of immutable classes, I don't see why you would ever need to change to properties - you're not going to be adding logic to the...
I am trying to determine what control called a Set property. Say textbox Pet is bound to a Property. I am using INotifyPropertyChanged but I am wondering if there is a way to get the actual control.
The sender in my PropertyChanged Event is the Class containing the properties and not the control that originally kicked of the chain of ...
Hi,
I'm working on an old app where there is a lot of inconsistency in the naming conventions used.
Is there a way to access object properties that ignores case sensitivity?
For example, I have an object called currentuser with the attribute Name.
Is there any way to retrieve that value like this?
$currentuser->name
Any advice ap...
Hey folks,
I made a utility debug class in a C# game I'm working on to be able to monitor and watch values of properties. Goes like this:
public static class Monitor
{
private static List<object> monitoredObjects;
public static void Initialize()
{
monitoredObjects = new List<object>();
}
public static void Watch(object ...