properties

Maintaining Mouse Control in Embedded swfs (i.e. parent / child ) Flash cs4 AS3

Hello to all, I have an issue that is driving me nuts. I have an AS3 application that performs a calculation based upon user's input to determine a result. The purpose is to predict the results of a horse's coat color based on the genetics. The results are given in a 3d model swfs that are loaded into the "shell's" UILoader Component and...

How do I test if a property exists on a object before reading its value?

I'm attempting to read a property on a series of Sprites. This property may or may not be present on these objects, and may not even be declared, worse than being null. My code is: if (child["readable"] == true){ // this Sprite is activated for reading } And so Flash shows me: Error #1069: Property selectable not found on fla...

Timer running status in windows forms

In Windows Forms, How to check whether the timer is running or stopped? ...

Expression Blend: How to create User Control with dynamic headline?

Hi, I created a UserControl and added a "label" asset. I gave this label a default content property. If I include this UserControl in my projekt, how can I achieve to edit the content property in the properties window? I want to have a behaviour like the TabItem: There is a "Header" option under Properties->CommonProperties where you can...

How to change the type return by DataGridViewCellCollection to fit Custom DatagridViewCell

Hello, I have a problem with my custom DataGridViewCell, indeed i tried to write to a custom property of my datagridviewcell but i cannot because it's not accesible. This is my code: namespace MonthCalendarLibrary { public class MonthCalendarCell : DataGridViewImageCell { public DateTime date { get; set; } pub...

Is using YIELD a read-only way to return a collection?

I'm writing an interface which has a collection property which I want to be read only. I don't want users of the interface to be able to modify the collection. The typical suggestion I've found for creating a read only collection property is to set the type of the property to IEnumerable like this: private List<string> _mylist; public I...

C# Reflection and Getting Properties

I have the following dummy class structure and I am trying to find out how to get the properties from each instance of the class People in PeopleList. I know how to get the properties from a single instance of People but can't for the life of me figure out how to get it from PeopleList. I am sure this is really straightforward but can ...

How to make a private property?

I tried to make a private property in my *.m file: @interface MyClass (Private) @property (nonatomic, retain) NSMutableArray *stuff; @end @implementation MyClass @synthesize stuff; // not ok Compiler claims that there's no stuff property declared. But there's a stuff. Just in an anonymous category. Let me guess: Impossible. Other sol...

Properties in User-Control Ctor are duplicated to the hosting form

An annoying behavior of Visual Studio (2008)'s designer is to duplicate any property of a control, which is set inside the control's constructor code to the InitializeComponent() method of the hosting form. For example, if I create a new user control and write the following line in its Ctor: this.Text = "Hard Coded Name"; then this sa...

How to mock a property setter on a PartialMock using Rhino Mocks

I'd like to prevent the real setter code being invoked on a property on a partial class. What is the syntax for this? My current code to stub out the getter (I'd like to also stub out the setter): var user = MockRepository.GeneratePartialMock<User>(ctor params...); user.MyProperty = "blah"; Something like this? user.Stub(u => u.MyP...

VS2005 C#: is there a special visual-studio way to create properties or can the the code just be typed out?

Using C# in VS2005, is there special way to create properties in the IDE or can you just type out the getters and setters? ...

Should properties in C# perform a lot of work?

When a property is read from or is assigned to, one would not expect it to perform a lot of work. When setSomeValue(...) and getSomeValue(...) methods are used instead, one should not be that surprised that something non-trivial might be going on under the hood. However, now that C# gave the world Properties, it seems silly to use getter...

How can we create a parameterized properties in C#

How can I create a parameterized properties in C#. public readonly string ConnectionString(string ConnectionName) { get { return System.Configuration.ConfigurationManager.ConnectionStrings[ConnectionName].ToString(); } } ...

Loading Properties with Spring (via System Properties)

My problem is as follows: I have server.properties for different environments. The path to those properties is provided trough a system property called propertyPath. How can I instruct my applicationContext.xml to load the properties with the given propertyPath system property without some ugly MethodInvokingBean which calls System.getP...

Properties in Remoting

Server: Host h = new Host(); h.Name = "JARR!!"; TcpChannel channel = new TcpChannel(8080); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType(typeof(Host), "Server", WellKnownObjectMode.Singleton); Client: TcpChannel chan = new TcpChannel(); ChannelServices.Register...

How do I get access to Weblogic's properties in Java code

Is it possible in Java code (ejb) to read (some of) Weblogic's internal configuration properties, like: Domain name, Domain home, Admin Server name, Port number, Server name, Host name, Config version, Weblogic acount name, etc.? And if yes, how? ...

Caching Web UserControl by Propety is not working (Grr!)

Here's my control's code behind: <PartialCaching(60, Nothing, "UsrCtl_WebUserControl.CacheString", Nothing, True)> _ Partial Class UsrCtl_WebUserControl Inherits System.Web.UI.UserControl Private _CacheString As String Public Property CacheString() As String Get Return _CacheString End Get Set(ByVal value As String) _Ca...

Load properties file in JAR?

I'm having trouble when one of the jars that my web app depends on tries to load a properties file from within the jar. Here is the code in the jar. static { Properties props = new Properties(); try { props.load(ClassLoader.getSystemResourceAsStream("someProps.properties")); } catch (IOException e) { ...

Maven Mojo & SCM Plugin: Add file to ignore list / set SVN property

Hi there. I'm using maven-scm-plugin from within an own Maven Mojo via an injected ScmManager object and am trying to figure out how to add a file to the SCM ignore list. The methods that ScmManager provides don't seem to support this. An ideal solution would work in all SCM systems that maven-scm-plugin supports. I'm not sure though i...

Detect if an object property is private in PHP

I'm trying to make a PHP (5) object that can iterate through its properties, building an SQL query based only on its public properties, not its private ones. As this parent object method is to be used by child objects, I can't simply choose to skip the private properties by name (I won't know what they are in the child objects). Is the...