properties

How to create a Objective C class for Buffer

I am getting buffer with its length in a function (void)putEncodedData:(void *)data ofSize:(unsigned)size I want to create a custom class for this buffer data with name AudioData with variables data,size . How to set its @property attribues ? Please help me. Thanks in advance ...

How to avoid recursive dependency properties

Hi friends: I have a class LineG inherited from a shape which will draw a simple line between two points.. I did that simply by adding two dependency properties StartPointProperty and EndPointProperty... Lastly I want to add another functionality which is MidPoint, so when I draw the line there will be a midPoint in the middle of the li...

Cocoa/ObjC: Are there any performance drawbacks to my style of allocing objects for property iVars?

I use properties pretty much anytime my classes need iVars. For retained properties, I have grown accustomed to a specific way of using the accessor methods to alloc/initialize the actual iVars: - (void)anInitOrAccessorMethod { self.property = [[AClass alloc] init]; [self.property release]; } Anytime I need to set a non-autoreleas...

Use of properties in python like in example C#

Hi there, I currently work with Python for a while and I came to the point where I questioned myself whether I should use "Properties" in Python as often as in C#. In C# I've mostly created properties for the majority of my classes. It seems that properties are not that popular in python, am I wrong? How to use properties in Python? r...

In Objective-C, how do you set up properties of properties, i.e. of a class set up as another class property?

I have been trying to set up an instance property of a class which is itself a class that contains instance variables. I would like to access these as properties. In C#, this is easy to do with the pre-set get and set variables: public class TheOverallClass { private ClassName _propertyName; public ClassName PropertyName { ...

Is there a way to inherit properties from multiple classes in C#?

Possible Duplicate: Multiple Inheritance in C# In the following example, I want the Shirt to automatically inherit the properties of both the Material and Pigment classes. Is this even possible in C#? public class Material { public enum FabricTypes { Cotton, Wool, Polyester, Nylon } public FabricTypes Fabric { get; se...

Compress Log4j files

Is it possible to compress log files (I doing it via RollingFileAppender )? ...

jboss: accessing file resource through java code?

I am reading properties file from java DAO implementation for loading properties object as in code given below this.getErrorproperties().load( new FileInputStream(new File("").getAbsolutePath() + "/conf/error/error.properties")); While testing it works fine but when i try to deploy applicat...

property not visible outside of interface on iPhone app

I have a view controller, which creates 2 view controllers inside it. Inside each of these child controllers I wanted to create a property, which would be public, and accessible from the parent controller. I am using the following method TableViewController.h @interface TableViewController : UITableViewController { NSInteger proj...

C# object initializers and collections

I'm trying to set up a class so that it's possible to initialize it using an object initializer, but it contains some collections. Ideally I'd like client code to be able to do: MyClass myObj = new MyClass { Name = "Name", Contents = new[] { "Item1", "Item2" } } However, where Contents needs to be a BindingList<string>...

.checked=true not working with jquery $ function

hi all... i want to select a checkbox when a button is clicked. <form action="" method="post" id="form2"> <input type="checkbox" id="checkone" value="one" name="one" /> <input type="button" value="Click me" id="buttonone"/> </form> when i tried the following, the checkbox was not getting selected $('#buttonone').click(functi...

Objective-C : Properties question

As far as I understand when you use properties the compiler still converts them to accessor methods during compilation. I got a little irritated when I read you need OSX 10.5 or later to use properties. Why is that so? If in the compiled application are in fact still accessor methods I see no need for OSX 10.5. Or is there something els...

Overriding inherited properties’ getters and setters in Python

I’m currently using the @property decorator to achieve “getters and setters” in a couple of my classes. I wish to be able to inherit these @property methods in a child class. I have some Python code (specifically, I’m working in py3k) which looks vaguely like so: class A: @property def attr(self): try: retur...

Objective-C : Just another stupid properties question

In Objective-C properties you can set alternative names fpr the accessors. @property(setter=nameWrite:,getter=nameRead,copy) NSString *name; I am thinking real hard but I don't know any situation I would ever do that. It is not KVC standard and I see no advantage at all. What is the use of it? ...

Ant propertyfile replacing value issue

Hello, I'm trying to change values in my application.properties file and I'm running into issues with an extra "\" character when trying to substitute url addresses. It doesn't happen when I'm replacing regular text. Here's the section of the properties file I'm attempting to modify: # Web Info web.url=http://www.testaddress.com web.u...

When does grails.config.locations get processed in Grails?

I am using grails 1.2.1 and would like to specify external configuration (properties) files for the war file for my application. I understand from documentation that the proper way to do this is to specify the grails.config.locations list in the Config.groovy file. When I do that, however, the properties that should be set are not av...

Java Swing properties (addPropertyChangeListener)

Is there a published list of property names for Swing components? From looking at the source code for javax.swing.table.TableColumn, I can find calls to firePropertyChange with property names like "modelIndex", "identifier", "headerValue", etc. as hardcoded Strings, not as String constants. As far as I can tell, the only way to know wha...

Finding sub properties of javascript object

My code ise this: var cem = { "name": "cem topkaya" }; f_PropertyBul(cem); function f_PropertyBul(obj) { for (var prop in obj) { document.writeln(obj + " prop: " + prop + " propertyIsEnumerable:" + obj.propertyIsEnumerable(prop) + "<br/>"); if (obj.propertyIsEnumerable(prop)) { f_PropertyBu...

When should uiviewcontrollers be declared as properties

Well this has been bugging me for quite a while so now i'll ask When should uiviewcontrollers be declared as properties? I noticed that in many examples uiviewcontrollers that are being pushed and popped on a uinavigation controller are not declared as properties. I took that forward and now every uiviewcontroller i use inside my code ...

Which object did send a "release" message to my property ?

Hi everyone ! There's something i don't seem to get about properties and memory management with iOS ! In my AppDelegate, i want a NSString * property : - i've declared it this way in the .h file : @property (nonatomic, copy) NSString *myString; - and synthetized it in the .m One of my method use the property like this : myString = ...