properties

Can I modify a value in setting.setting file?

I am working on a Windows form application with C#,and it would be really helpful if I could modify a value in "setting.setting" file in the program properties. In fact I want to put connection string for SQL database in this file and get it when needed so I need to change it if the connection changed. ...

Multiple values in java.util.Properties

It seems that java.util.Properties assumes one value per propery key. That is, foo=1 foo=2 is not expected, Is there a class for this kind of multi-value property sheet, which also provides the load method? ...

Java: shortest way to reverse Properties

I java a java.util.Properties object and I want to obtain another one with the same pairs but keys are converted to values and viceversa. If there are collision (i.e. there are two equal values) then just pick as value an arbitrary key. What is the shortest way to do it. Feel free to use libraries, commons-collections, or whatever. ...

WPF: assign child element to property in XAML

Hi I want to do the following in xaml: I have a property FocusTarget in my control class which I want to assign an UIElement from the current class. Is this possible in XAML? <my:BaseControl x:Class="SectionControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200...

Enumerating through an object's properties (string) in C#

Let's say I have many objects and they have many string properties. Is there a programatic way to go through them and output the propertyname and its value or does it have to be hard coded? Is there maybe a LINQ way to query an object's properties of type 'string' and to output them? Do you have to hard code the property names you w...

Confusion with header and Implementation files in Objective-C

Hi Guys, First off, please forgive the stupidness of this question but Im not from a C/C++ background. I'm a little unclear about what the difference in roles between the .h and .m files when it comes to properties. I understand the concept of interfaces, and I see that in part the .h file is an interface for the implementation, but ...

unrecognized selector sent to instance with a drawer

Hi, i'm trying to program a drawer function into Smultron (an open source code editor) but i'm having a bit of trouble with it. I keep on getting an error that says: 2009-09-20 12:43:06.067 Smultron[4481:a0f] -[SMLProject directoryDrawer]: unrecognized selector sent to instance 0x2003ea6c0 Now in SMLProject on interface builder I conn...

do properties work on django model fields?

I think the best way to ask this question is with some code... can I do this? (edit: ANSWER: no) class MyModel(models.Model): foo = models.CharField(max_length = 20) bar = models.CharField(max_length = 20) def get_foo(self): if self.bar: return self.bar ...

How to define properties in __init__

I whish to define properties in a class from a member function. Below is some test code showing how I would like this to work. However I don't get the expected behaviour. class Basket(object): def __init__(self): # add all the properties for p in self.PropNames(): setattr(self, p, property(lambda : p) ) def PropNames...

VB.Net Properties - Public Get, Private Set

I figured I would ask... but is there a way to have the Get part of a property available as public, but keep the set as private? Otherwise I am thinking I need two properties or a property and a method, just figured this would be cleaner. ...

Do we need to check the encoding scheme when reading properties file?

Today one of my testers came to me and said my program had failed her test. All she did was actually open up all my properties files and save them as Unicode format. Questions: Is there an industry practice to check every properties file encoding type? How do you deal with this problem? I've never seen any java project running en...

Add a dropdown for an enum in custom component

I'm creating a .net Webtest Custom Extraction Rule. I want my users to be able to select an enum value from a dropdown list in the Property Edit view in Visual Studio. I Can manage to customize the DisplayName,Description,DefaultValues of integer/string properties without problem. However I can't manage to make ENUM values appear in the...

Set properties from .properties file in .jar on JVM startup

How can I setup the JVM to automatically load a .properties file in .jar on the classpath on JVM startup? I do not want to configure the properties on the commandline (with -D) but have them in a .properties file. Is there a way to configure this with the help of Maven? ...

Override Java properties from packages

I am using several packages which are configured by using configuration properties for example org.apache.ws.security.crypto. Normally a single configuration file suffices but I now have a need to override one or more of the properties whenever they are used by code which is called from a particular object instance. I am far from a java...

How to easy find unused public methods/properties

I have a .Net(C#) solution. The solution contains bunch of projects. The projects were implemented not by me. It is not a framework, it means that I need to have amount of public methods/properties as less as possible. My task is to identify methods and properties which are not used, but exist in the projects. Well, I can find private me...

How do I jump to a section of a properties file?

Hi, the title really says it all. I have a properties file that has lots of different properties in it for different things: ui.datasource.st.name=MyTest ui.datasource.st.port=111 ui.datasource.st.ip=1.1.1.1 ui.outputtype.snapshot=Snapshot ui.outputtype.spreadsheet=Spreadsheet - xls The file is a lot bigger than this an I want to j...

How to create Public String property with drop-down list of options?

Is it possible to attach a List of strings to a String property so that the user can select one of the strings from the Properties window? Should I implement ICollection or something of that sort? ...

Adding properties to an existing object retreived using SubSonic

I think this is more of a polymorphism question but it applies to SubSonic table objects... Here's the thing (and I love this one): TblUser userObj = new TblUser(1); Which fills userObj's properties with all of PK=1's goodies. Now, I'd like to add more properties to the existing user object, for example, an ArrayList property of say,...

How do I Access File Properties on Windows Vista with Python?

The question is as simple as in the title, how do I access windows file properties like date-modifed, and more specifically tags, with Python? For a program I'm doing, I need to get lists of all the tags on various files in a particular folder, and I'm not sure on how to do this. I have the win32 module, but I don't see what I need. Tha...

C# - Get values of static properties from static class

I'm trying to loop through some static properties in a simple static class in order to populate a combo box with their values, but am having difficulties. Here is the simple class: public static MyStaticClass() { public static string property1 = "NumberOne"; public static string property2 = "NumberTwo"; public static string...