properties

Best Qt Widget to use for properties window?

I want a widget like the properties window in Visual Studio or NetBeans. It basically has two columns: the name of the property on the left, and the value on the right. The value needs to be able to be restricted to certain types, like 'bool' or 'float' (with valid ranges), but should also support more complex types (perhaps requiring a ...

Objective C - Using an accessor if It does nothing different

In objective c, if the using the getter and directly accessing the ivar do exactly the same thing, no lazy loading code in the getter, all it does is returns the ivar, would you still use the accessor or access the ivar directly since there is no difference? Why? EDIT: I'm talking about inside the class. ...

When using reflection to get at properties, How can I limit my search to just the subclass I'm interested in?

After successfully getting a list of specific types out of an assembly using reflection, I now want to get at the public properties of each of those. Each of these types derives from at least one base class. I notice when I get properties on a type that I get properties from the base classes as well. I need a way to filter out base c...

More private than private? (C#)

Sometimes you have a private field that backs a property, you only ever want to set the field via the property setter so that additional processing can be done whenever the field changes. The problem is that it's still easy to accidentally bypass the property setter from within other methods of the same class and not notice that you've d...

Enforce Object Property to be serializable

I am building a class and in the interface for my class(es) I have a property declared object MyObject { get; set; } What I want to do is force whatever is stored in MyObject to be serializable. Is there a good way to do this? Normally, I'd use where : ISerializable, but for serialization you use an attribute, not inheritance, or at...

Reading properties file from JAR directory

I’m creating an executable JAR that will read in a set of properties at runtime from a file. The directory structure will be something like: /some/dirs/executable.jar /some/dirs/executable.properties Is there a way of setting the property loader class in the executable.jar file to load the properties from the directory that the jar is...

How to prevent requests to server when loading properties that are already in applet jar file?

I maintain an applet that helps users to upload photos to our service. The applet jar file has a few .properties files: >> jar -tf applet.jar | grep prop res/messages.properties res/messages_ca.properties res/messages_es.properties ... These are loaded during applet initialization. messages = ResourceBundle.getBundle("res.messages");...

Access Reports - Hiding Fields, Labels, and other elements based on data

I've been trying to format a report to provide a listing for prospectives vendors that shows a piece of equipment's model number, serial number, range, asset number, and calibration frequency. The concept is based on that this proposal, if accepted, would later become a purchase order - so fields such as if the work is to be performed i...

Using LINQ Dynamic Query Library with Dictionary<string, object> and .AsQueryable()

In one of my previous questions about using dynamically built up strings (where clauses) and using them in LINQ, I was guided towards the LINQ Dynamic Query Library Dynamic LINQ. The first issue was that it only applies to IQueryable, this however can be overcome by using the .AsQueryable() extension method on any IEnumerable. The prob...

Adding properties for many widgets

I have a graphics engine, for which I have to make an editor. Editor aims to create xml file which describes how screen is constructed from layers etc. There is a lot of classes like SimpleText, Rectangle, Layer in the engine. Some of them share set of the same methods like GetWidth but many are specific to the given widget. I would li...

C# Indexer Usage

To have an indexer we use the following format: class ClassName { DataType[] ArrayName = new DataType[Length]; public DataType this[int i] { get { return ArrayName[i]; } } } For the sake of simplicity I used the format, even though we can go for a custom indexer also. According to my understanding, we are kee...

generic function with a "has property X" constraint?

I have a third-party, closed source application that exports a COM interface, which I am using in my C#.NET application through Interop. This COM interface exports many objects that all show up as System.Object until I cast them to the appropriate interface type. I want to assign an property of all of these objects. Thus: foreach (objec...

What does this mean ? public Name {get; set;}

I see this quiet often in C# documentation. But what does it do? public class Car { public Name { get; set; } } ...

How can I find all the members of a Properties.Resources in C#

I have some resources in a C# Assembly which I address by byte[] foob = Properties.Resources.foo; byte[] barb = Properties.Resources.bar; ... I would like to iterate through these resources without having to keep an index of what I have added. Is there a method that returns all the resources? ...

Pulling values from a Java Properties file in order?

I have a properties file where the order of the values is important. I want to be able to iterate through the properties file and output the values based on the order of the original file. However, since the Properties file is backed by, correct me if I'm wrong, a Map that does not maintain insertion order, the iterator returns the val...

UISwitch inside custom UITableViewCell not available

I have a UISwitch inside a custom UITableViewCell (the subclass of which I call RootLabeledSwitchTableCell). The cell contains a UILabel and UISwitch next to each other. I have a @property called keychainSwitch that points to the switch inside this custom cell: @interface RootLabeledSwitchTableCell : UITableViewCell { IBOutlet UIL...

Stackoverflow exception thrown from overridden property from abstract base class

Hi all, I have a base class with the following (trimmed for brevity) declaration: public abstract class MyBaseClass { public int RecordId { get; private set; } public string ObjectName { get; set; } public abstract string Status { get; set; } public GetMyObject(int id) { MyObject myObject = context.GetObjectById(id)...

C# Winforms Message Box Properties

in C# winforms when we display a message box it has no title in the title bar and no title in its button that is in the task bar. What if i want to set title and icon for a message box. one option is that create a form that appears and behaves like a message box and i show and hide it when i want. yes that can be done but i want to mo...

Setting java system properties to a java application.

Hi, What i'm trying to do, eventually, is to start TOMCAT with certain java system properties set (in this case jmx setup): -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false` ) Problem is I don't think i'm doing it right...

immutable properties of an object in C#

I'm looking for a way to sort a list of object (of any type possible) so that whatever happens to the objects, as long as they are not destructed, the order keeps the same (so the hashCode isn't a good idea because in some classes it's changing over a time), for that reason I was thinking to use the address of the object in the memory bu...