properties

Setter is called before constructor

Hi, I am debugging a code and one strange thing occurs. There is a string property say MyProperty. When I add breakpoint at the setter of the property and at the default constructor ( The only constructor ) the setter is called first. I dont know what is going on at other level of the code but this seems strange to me in any case. All th...

iPhone: View that is a Property Fails to Appear after Adding a @synthesize Directive for the Property.

I have a mainwindow.xib which has a tabbar controller. The first tab bar has a view, that loads from "View1.xib". In my View1.xib, I drag the UI element on it. It has this in .h: #import <UIKit/UIKit.h> @class View1Controller; @interface View1Controller : UIViewController { IBOutlet UIView *view; IBOutlet UIButton *startButton...

c# properties private set;

I know it only allows the class to set it, but what is the point? How do I solve the problem of having readonly ids? Say I have a person class public class Person { public string Name { get; set; } public int Id { get; private set; } public int Age { get; set; } } And this is in a Entities.dll, used ...

Accessing javascript function properties before they are defined?

I was reading through this thread: http://stackoverflow.com/questions/61088/hidden-features-of-javascript and found this post: http://stackoverflow.com/questions/61088/hidden-features-of-javascript/61260#61260 I was playing around with the code in firebug and I found that this bit of code seems to work fine: var fn = function(x) { c...

Recurse through properties of a class

Take this sample class as an example: [AttributeUsage(AttributeTargets.All, AllowMultiple=true)] public class BugFixAttribute : System.Attribute { public int BugId { get; private set; } public string Programmer { get; private set; } public DateTime Date { get; private set; } public string Comments { get; set; } ...

How to make a mysite profile property display in a different way?

Hello, We have a string in AD which is actually storing a date in the YYYYMMDD format, which when you map it in sharepoint to a profile property, just looks plain ugly, e.g. 20091130. Our AD people are refusing to change the format of it in AD, so we were wondering if there was a way (javascript perhaps?) of changing it so that it at le...

java Properties - to expose or not to expose?

This might be an age old problem and I am sure everyone has their own ways. Suppose I have some properties defined such as secret.user.id=user secret.password=password website.url=http://stackoverflow.com Suppose I have 100 different classes and places where I need to use these properties. Which one is good (1) I create a Util class t...

Objective-C. I have typedef float DuglaType[3]. How do I declare the property for this?

I have: typedef float DuglaType[3]; @interface Foo : NSObject { DuglaType _duglaType; } How do I correctly declare the property? I tried: // .h @property DuglaType duglaType; // .m @synthesize duglaType = _duglaType; But this spews errors. What is the secret handshake for C++ typedefs to play nice with Obj-C properties? Tha...

C# GridView: Specifying CSS classes for specific rows

I am creating a SharePoint web part in C# and part of it outputs a GridView control to the page. While I can get fairly extensive control over the way it is displayed by setting the CSS class of the GridView itself, what I would really like to do is be able to specify classes to certain specific td elements. I'm not sure how to go about ...

storing and retrieving a list of systems, ips, and usernames

I have a properties file which currently contains system names and ip addresses. What would be the best way for me to store usernames with it as well. Can you use more then one element or key in a properties file? Thanks for any help and suggestions. ...

Dynamically retrieve values of index properties in C#

I am trying to create a SortedList of property names and values for any object. The two methods below iterate an object's properties storing its respective values in a sorted list (if there is a better mechanism for accomplishing this please recommend it). With my current implementation I am running into issues with Index Properties. Ob...

Java: How do I update a View when a Model's Collection is added to?

So I'm working on rewriting a program for a professor, and I have some questions related to the Model-View-Controller pattern. The program is called GraphViewer and is used to design and view graphs (as in Graph Theory, not Statistics). So far I have planned the structure thus: Models VertexModel - Has id, location, color, and a col...

Ruby: add custom properties to built-in classes

Question: Using Ruby it is simple to add custom methods to existing classes, but how do you add custom properties? Here is an example of what I am trying to do: myarray = Array.new(); myarray.concat([1,2,3]); myarray._meta_ = Hash.new(); # obviously, this wont work myarray._meta_['createdby'] = 'dreftymac'; myarray._meta_['lastupda...

Escaping equal sign in properties files

Hi guys, How do i escape the equals ('=') sign in java properties file? i would like to put something like table.whereclause=where id=100 . thanks. Josh ...

Java: which configuration framework to use?

Hi, I need to decide which configuration framework to use. At the moment I am thinking between using properties files and XML files. My configuration needs to have some primitive grouping, e.g. in XML format would be something like: <configuration> <group name="abc"> <param1>value1</param1> <param2>value2</param2> ...

How can I get to the value of my WPF UserControl DependencyProperty from UI Automation Framework?

Hi, I'm having trouble getting access to my WPF UserControl DependencyProperty values through the UI Automation Framework. I've used James McCaffreys article in MSDN as a starting point (Automating IO Tests in WPF Applications, MSDN March 2009), but I can only see properties etc in standard controls such as buttons. I'm assuming ther...

Using custom and built-in properties in Boost::Graph

Hi, I am building a graph class based on the following suggestion: http://stackoverflow.com/questions/671714/modifying-vertex-properties-in-a-boostgraph Unfortunately, I realized an unexpected behavior. When using my own vertex-properties (for simplicity please ignore the edge properties), the built-in properties seem not to be used. S...

Problem setting class properties

I keep getting a null exception at the ; below. The ApiUsername & ApiPassword have values so I don't undestand if I just set this up wrong or what. The Credentials property is a certain type which has the Username and Password properties that need to be set. So I have the auto-propery defined: public CustomSecurityHeaderType SoapCallC...

c#: Converting a Get / Set from vb.net to c#

Hi there, Can anyone help. I have the following in vb.net and need to convert it to c#. Seemed rather simple at first but I need to pass in the NamedObject variable as welll which is supported in vb.net but not in c#.. What are my options. Here is the vb.net - notice the NamedObject Public Property Datos(ByVal NamedObject As Str...

how change property value in file by Ant

Example input: SERVER_NAME=server1 PROFILE_NAME=profile1 ... Example output: SERVER_NAME=server3 PROFILE_NAME=profile3 ... This file will use in applicationContext.xml. I've tried <copy file="${web.dir}/jexamples.css_tpl" tofile="${web.dir}/jexamples.css" > <filterchain> <replacetokens> <token key="...