properties

Property Refuses to Synthesize

I've been going through the screencasts here to learn how to write a table-based iPhone application, and it's been going pretty smoothly so far. Presently I'm halfway through the third episode, and it's starting to hit a snag. In order to remove temporary hard-coding for the top layer of the table, the tutorial creates an NSMutableDici...

C# property, is it possible to get around defining get without defining set (no backing variable)?

Lets say you have a Class with 300 properties with no backing variables, each of those properties returns a decimal/double. Example: public decimal MathValue { get; set; } Now you decided that each one of those values should be rounded. I am looking for the simplest way to refactor this without having to rewrite all of those proper...

loading .properties in spring-context.xml and persistence.xml

Hi, is there a way to reference a .properties file in a spring-context.xml and a JPA persistence.xml? I think I've seen somewhere an example of this in spring context files, though I can't remember where that was. Maybe someone knows this? About the persistence.xml I am actually unsure if this works at all. My aim is to change some pr...

how to remove unnecessary properties from user control?

hi all, i want to remove unnecessary properties from user control. But I do not know what way? ...

Control Properties in Visual Basic 6

Is there a way to ask for a control property in a loop?? I need somethig like this: For each p in control.properties if p = "Value" then msgbox "I Have Value Property" elseif p = "Caption" then msgbox "I Have Caption Property" end if next It could be done somehow? ...

java.util.logging.config

Is there a way to set the location of the properties file withough specifying a JVM param such as -Djava.util.logging.config.file=log.properties ? ...

How to pass properties by reference in c#?

I am not sure if I have asked the question correctly. Please correct me if I am wrong. Anyways, we would like to use a variable's value on a different phases of the page's life cycle. So for example, public partial class TestUserControl: UserControl{ public TestUserControl(){ Objects = new List<object>(){ Prope...

How do I create a generic property in VB.NET?

I'd like to do something like this: Private _myCollection As IList(Of T) Public Property MyProperty(Of T)() as IList(Of T) Get Return Me._myCollection End Get Set(ByVal value As String) Me._myCollection = value End Set End Property Basically, I want to have a collection of items that may be of any type...

Why could an Expression's Body in C#.net not use properties of type int, double or bool?

I have a function: private string GetPropertyName(Expression<Func<object, object>> f) { if ((f.Body as MemberExpression) != null) { return (f.Body as MemberExpression).Member.Name; } return ""; } And it is used this way: string x1 = GetPropertyName(x => Property1); string x2 = GetPropertyName(x => Property2); str...

c#: why have empty get set properties instead of using a public member variable?

Possible Duplicate: C#: Public Fields versus Automatic Properties Duplicate? I think not: This question is not the same as "Why use properties instead of public field". A property with a specified getter and setter is far different than a public field. My question was, is a property WITHOUT a getter and setter,...

Objective-C accessor declarations (readonly, readwrite, etc)

In the book, "Cocoa Design Patterns," the author sometimes declares a property in the @interface as readonly: // .h @property (readonly, copy) NSArray *shapesInOrderBackToFront; and then later adds an unnamed category to the implementation (.m) file like this: // .m @interface MYShapeEditorDocument () @property (readwrite, copy) NSAr...

Getting "Property value is not valid" message when Control is in Design Mode (VS 2008)

I am getting dialog box "Property value is not valid" when the Control is in Design Mode (Visual Studio 2008) and I try to change the Property's Value. Here is the property in question: <Description("Gets/Sets the visibillity of the SaveButton of Control")> _ Property ShowSaveButton() As Boolean Get Return _SaveVisible ...

Does an abstract property create a private backing field?

Simple question: does an abstract property create a private backing field? Example: public abstract Name { get; set; } Will this create a private backing field? I want to force any class that derives this property to use their own backing field, not one that's created by the compiler. ...

web.config explanation of profile properties

hi, I have a List<> as part of a users profile stroed in the web.config like so <properties> <clear/> <add name="EditorUploads" type="System.Collections.Generic.List`1[[System.String]]"/> </properties> Although this code works, I don't know why. I can't find any documentation on what the `1 means anywhe...

How to create MVC HtmlHelper table from list of objects

I am trying to create a specific HtmlHelper table extension to reduce the spaghetti code in my View. Taking a list of domain objects I would like to display a table that is a little bit more intelligent in using the properties of the domain object as columns. In addition, I would like to disable showing of some properties as columns. An...

Properties file not working with Struts2 and Glassfish

I have a properties file in my application which is built using S2. The properties files resides in WEB-INF/classes and are mentioned in struts.properties as: struts.custom.i18n.resources=myproperty1,myproperty2 to use the properties i just do the following in my JSP's <s:text name="my.property.title"/> this setup works fine on th...

Is it possible to use Ninject with a static property?

I have a static SessionFactory class that initializes an NHibernate session factory. Because this process is expensive (~5 sec.), I want it to be static so it's only done once, at the beginning of runtime. The configuration can take a database parameter parameter like so: public static IPersistenceConfigurer DbConfig { get; set; } pub...

C++/CLI shorthand properties

Hello, How does a developer do the equivalent of this in managed c++? : c# code public String SomeValue { get; set; } I've scoured the net and found some solutions, however it is hard to distinguish which is the correct (latest, .NET 3.5) way, given the colourful history of getters/setters and managed c++. Thanks! ...

Different ways to use properties file in j2ee app

I have a j2ee app using Struts2. I have a gloabl properties file which is declared in struts.properties which resides in WEB-INF/classes. It has the following setting: struts.custom.i18n.resources=mypropertyfile mypropertyfile also resides in WEB-INF/classes Say for example it contains the following: pdf.test.title=PDF Test then...

Getting an array of properties for an object in Objective-C

Is it possible to get an array of all of an object's properties in Objective C? Basically, what I want to do is something like this: - (void)save { NSArray *propertyArray = [self propertyNames]; for (NSString *propertyName in propertyArray) { [self doSomethingCoolWithValue:[self valueForKey:propertyName]]; } } Is this p...