I have a user control with a WebDateTimeEdit server control on it (essentially a TextBox). I'd like to be able to set some of the server control's properties by way of the user control's markup or programatically. for example I have this defined on my user control:
public string CssClass
{
get { return this.WebDateTimeEdit1.CssClas...
When you look at some Objective-C code, you often see class properties defined as non-atomic. Why? Does it give you some performance boost when you're not working with threads, or is there some other reason?
...
I am familiar with obtaining the contents of a properties file given the name of the file, and obviously MyClass.class.getResource('*.properties') will not work, but how can I obtain a list of ALL the properties files located in the same package as my class?
...
C# properties (I mean get and set methods) are a very useful feature. does java have something similar to C# properties too. I mean how we can implement something like the following C# code in java:
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
thank you in advance
...
I am trying to use autoimplemented properties.
It shows me error
public OpenMode OpenFor
{
get;//must declare a body because it is not marked as abstract, partial or external. Why so
set
{
if (value == OpenMode.Add)
{
btnAddGuest.Text = "Save";
btnU...
I am using the properties view in RCP, i.e org.eclipse.ui.views.properties.PropertySheet.
I want to be able to refresh the content of these properties programmatically. It seems RCP is geared towards the use case where this changes only when a selection changes.
Is there any way I can fire a dummy event to get this to refresh (without ...
In the code base I was maintaining I found this exact class, pasted below. In logPath property, gets does some work. I would think that it is better to do the work in set - that way it will be done only once. However, partly because this is how the class is written, partly because it is an xml-mapped property, and partly because I am afr...
I have a base class like this:
public class Trajectory{
public int Count { get; set; }
public double Initial { get; set { Count = 1; } }
public double Current { get; set { Count ++ ; } }
}
So, I have code in the base class, which makes the set-s virtual, but the get-s must stay abstract. So I need something like this:
......
I just upgraded my prototyping tuple to a record. Someday it may become a real class. In the meantime, I want to translate code like this:
type Example = int * int
let examples = [(1,2); (3,4); (5,6)]
let descs = Seq.map (fst >> sprintf "%d") examples
to this:
type Example = {
Field1 : int
Field2 : int
Description : string
}
le...
The original title was
"How to generate enum from properties file using ant?"
I want to iterate over all properties and generate enum class that have every property.
Im thinking about writing custom task, but I think i would need to put it in extra jar :|
im using maven and i want to do it in generate-sources phase.
...
Hi,
I have a two nodes environment using the
same database. In the database there
is a resource table like
RESOURCE_ID,
CODE,
NODE
The content of the NODE column can be 1 or 2 depending on which node can use it.
As I need to deploy the same ear to the two nodes, I would like to map this table like this:
<hibernate-mapping>
<cla...
Hi all,
I would like to configure an object's properties at runtime either via a properties file, possibly XML (even though it can be a little more verbose). The properties may be nested, so I think I would use something like Apache's Bean Utils.
I was wondering what other formats are out there instead of properties and xml.
Thanks,
...
I defined a property in the constructor of my class the following way:
class Step(val message:String = "")
When I try access to message value from Java code y get a visbility error. Why?
...
Apple, for memory management issues, recommend defining outlets on properties, not in the attribute declaration. But, as far as I know, declaring properties exposes the class to external classes, so this could be dangerous.
On UIViewController we have the main view definition and the logic, so MVC is slightly cheated in this cases.
Wha...
In my Core Data model (on iPhone SDK 3.1) I have several entities that are associated with the same instance of an image. The image itself is also stored as managed object. In order to save disk space, I'm trying to create 1 db file for the images and another db file for all other objects.
Reading Apple's documentation and googling for ...
Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine.
/// <summary>
/// Auto complete settings
/// </summary>
[System.ComponentModel.DesignerSerializationVisibility (System.ComponentModel.DesignerSerializationVisibility.Content),
PersistenceMode(Persiste...
When you add a label to the form from the toolbox, its text defaults to the item's name (label1, label2, etc). How can I make this happen with a custom control? So far, I have the following, which allows me to change the text through the property window:
private string _text;
[BrowsableAttribute(true)]
public override string Text
{
...
I'm looking for a way to read document properties in C#. I've heard about dsofile.dll, but it seems like an old COM wrapper, and was wondering if there is something more modern for the .NET framework/C#. What I'm actually reading is not an office document file, but a Solidworks .SLDDRW file, that has Custom properties. You can view an...
How would I access the properties of an object stored in an array?
something like:
[myArray objectAtIndex:0].intProperty = 12345;
...
I'm trying to create a custom property for my web part, but can't get it to show up in Sharepoint. Here's my current code :
[Serializable]
[XmlRoot(Namespace = "MyWebPart")]
[DefaultProperty("Text")]
public class MyWebPart : WebPart
{
...
[Category("My Web Parts Properties")]
[DefaultValue(defaultPropertyValue)]
[WebPart...