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...
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...
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...
hi all, i want to remove unnecessary properties from user control. But I do not know what way?
...
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?
...
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 ?
...
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...
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...
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...
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,...
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...
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
...
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.
...
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...
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...
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...
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...
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!
...
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...
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...