Is there any way to create a property like this C# property in Objective-C?
public int prop { get; protected set;}
Essentially, I want to make it possible to get the value from outside the class, but to only be able to set the value from within the class.
...
I want to know if its possible to hide a base class property from a derived class:
Example:
class BaseDocument
{
public string DocPath{get; set;}
public string DocContent{get; set;}
}
class DerviedDocument: BaseDocument
{
//this class should not get the DocContent property
public Test(...
This should be very simple but I can't find the exact answer I want. I have a custom delphi control based on TSpeedButton. I want the Caption Property of the SpeedButton to always be 'Comments' but I don't want to set it at run-time I want to set it in the component itself so that when I place it on my form it's already populated with th...
I'm porting a 2D platformer and I need a good way of getting some extensibility out of my level tiles. I'm not sure if Decorator is correct here, but nothing else comes to mind. Maybe I need something unique.
Anyway, say I have a basic Tile that has things like it's image, and whether the player can pass through it (background or foregr...
Hi,
I have a question on using System Properties in Java. Some classes like Authenticator require that we set the system properties regarding Proxy settings and than verify whether the Proxy was valid or not.
My question is should I remove the Set Properties after I am done using it ?
There are other parts of programs that might be us...
I have properties file. I want to use listeners. if some Values change in this file then i want to update my integers. So, Which classes or implements do i need to use?
...
I am new to programming.
Using C# & ASP.Net, how would I differentiate between a property & a method?
How can I tell if something is a property or a method?
...
Many library classes in AS3 have "read only" properties. Is it possible to create such properties in custom as3 classes? In other words, I want to create a property with a public read but a private set without having to create a complex getter/setter system for every property I want to expose.
...
I am currently building a small visual designer using the Netbeans Platform. All my components that can be placed on the JPanel show correctly in the Palette Window.
What I am struggling to do at the moment, is to let the property window show the properties of the component that was either just dragged and dropped or showing the current...
Can I use java.util.Properties with encoding different then default?
...
I have a Web application written in Java that is targeting several countries, all of which speak different languages (and more often than not, several languages -- that's Europe for you).
We have a bunch of .properties files that hold the localized strings, and our current procedure is to e-mail the language-specific files to our partne...
I'm a newbie when it comes to properties, and I read that XML is the preferred way to store these. I noticed however, that writing a regular .properties file in the style of
foo=bar
fu=baz
also works. This would mean a lot less typing (and maybe easier to read and more efficient as well). So what are the benefits of using an XML file?...
This is a follow-up to my previous question (found here). My properties files so far consists of simple key-value pairs, like ints and Strings. I would now like to use it to place some more advanced structures in it, more specifically I need a Map<A, Integer> where A is a class i have defined, for example like so:
foo=bar,5;baz,10
Is ...
What are the accepted practices for creating a Tomcat deployment that reads configuration parameters from a properties file?
It would be nice to be able to deliver a WAR file and specify that the client need only create or edit a properties file in a specific directory. Is this a somewhat regular way of doing things? Is there a better ...
I have an object that is basically a Python implementation of an Oracle sequence. For a variety of reasons, we have to get the nextval of an Oracle sequence, count up manually when determining primary keys, then update the sequence once the records have been inserted.
So here's the steps my object does:
Construct an object, with a ke...
Since KVC is used to set outlets on the iPhone, there are 2 methods (that I know of) to make sure you've properly handled memory management.
Specifically, I am referring to this article written by Aaron Hillegass.
My question is which method do you use and what is your reasoning?
Release all your outlets in dealloc
and viewDidUnload ...
I'm writing an xml serialization class for objective-c.
The point is to give the class a class type and an xml file.
It should return an instance with data.
I've got it working, and it does quite a bit - handles primitives (+nsstring), user defined classes and nsarrays. Doesn't handle pointers or C-arrays.
Obviously this relies heavily ...
I've already implemented, using macros, a C++ property system that satisfied the following requirements:
Property can be referenced using a integeral key
Property can be accessed via a generic Set/Get
Properties (and property keys) must be inheritable
Properties can be registered with getters/setters
and is implemented as follows
E...
I want to track my custom activities' property values in my own tracking service, .i.e. I don't need it in the built in SQL tracking service. I have been successful in reproducing the SQL tracking service in that I can see the worklfow and activity states etc. but I want to see property values also.
We are writing many workflows for a d...
I have some auto-instantiation code which I would like to apply to about 15 properties in a fairly big class. The code is similar to the following but the type is different for each instance:
protected ComplexType _propertyName;
public ComplexType PropertyName
{
get
{
if (_propertyName == null)
_propertyName ...