private

How to make a real private instance variable?

I want to make an instance variable that can't be accessed from outside. Is something like that possible in objective-c? I remember Apple has private variables and stuff like that, but if people know about them, they can use them. Apple calls that "private API", but obviously others can access that stuff if they find out what's in there....

Private inner class synthesizes unexpected anonymous class

When you compile a Java class with a private inner class, it appears that an anonymous class is automatically synthesized along with it for some reason. This class is sufficient to reproduce it: public class SynthesizeAnonymous { public static void method() { new InnerClass(); } private static class InnerClass {} } ...

Free private SVN repository + document hosting

Possible Duplicates: Can you recommend a SVN, closed-source project hosting site? Is there a free version control server provider for non-public projects? Free Online Private SVN repositories Hi, I'm starting a new project with 14 more people and we're looking for some repository where we can host our code, specifically an S...

Unit testing functions that only change private member variables?

I am currently writing unit tests for a ViewModel in my project that uses Prism and the MVVM pattern. My view mainly consists of an ItemsControl that reacts to different mouse events (LeftMouseButtonDown, LeftMouseButtonUp etc.). When such a mouse event happens the EventArgs and some other glue info is handed to the ViewModel and an app...

Use private or use properties? C#

Note that the following code is in a class a single class private string _fee; private string _receipt; public string Fee { get { return _fee; } private set { _fee = value; } } public string Receipt { get { return _receipt; } private set { _receipt = value;} } public MyValue(string fee, string receipt) : this() { ...

The meaning of a single- and a double-underscore before an object name in Python

I want to clear this up once and for all. Can someone please explain the exact meaning of having leading underscores before an object's name in Python? Also explain the difference between a single and a double leading underscore. Also, does that meaning stay the same whether the object in question is a variable, a function, a method, etc...

How can I access private class members in Java?

I have data model classes that contain private fields which are meant to be read-only (via a getter function). These fields are set by my JPA persistence provider (eclipselink) during normal operation, using the contents of the database. For unit tests, I want to set them to fake values from a mockup of the persistence layer. How can I d...

Reflection: How to find from a property info object if that property has a Non Public (Private / Protected) Setter?

Hi Friends, I searched on the forum / Internet for the solution how a PropetryInfo object (of a Public property) can reveal if it has a Private \ Protected Setter ... it was all in vain .... all help I found was about how to "Set" value of a public property having a Private Setter... I would like to know if I have a PropertyInfo objec...

Confusing "override a private method"

I have two question on this code public class Override { private void f() { System.out.println("private f()"); } public static void main(String[] args) { Override po = new Derived(); po.f(); } } class Derived extends Override { public void f() { System.out.println("public f()"); } } /* * Ou...

C++ privately contructed class

How can I call a function and keep my constructor private? If I make the class static, I need to declare an object name which the compiler uses to call the constructor, which it cannot if the constructor is private (also the object would be extraneous). Here is the code I am attempting to use (it is not compilable): I want to keep the ...

C++ keeping a list of objects and calling a contructor through another function

why isnt my object being created? When I do it like so, I am told error C2065: 'AllReferrals' : undeclared identifier as well as error C2228: left of '.push_back' must have class/struct/union. If I put the list initialization before the class I get error C2065: 'AllReferrals' : undeclared identifier. Thanks! #include <iostream> #inclu...

Is this considered as using private functions in iPhone dev, and thus illegal?

I'm trying to disable scrolling for a UIWebView and the only way i found is using this way: #import <objc/runtime.h> id scroller = [[Webview subviews] lastObject]; int count; Method *method = class_copyMethodList([scroller class], &count); int i; for (i=0; i<count; i++) { if (strcmp(method_getName(method[i]), "setScrollingEnabled:"...

Java Subclassing, Possibly want to much???

I want something similar to protected, where only a class which implements the "protected" field and anything that subclasses it can access it. So, I want to be able to declare a variable in the base class as "private," but still be able to access it from a subclass. Perhaps this is against he very nature of the subclass, private, and/o...

private final static attribute vs private final attribute

In java, what's de difference between: private final static int NUMBER = 10; and private final int NUMBER = 10; both are private and both are final, the difference is the static attribute. What's better to use? ...

__Seckey, SecKeyRef, public and private keys and store not store in KeyChain

I would like to generate public and private key pairs and then store them in a private store, instead of the iphone's key chain. Is there a way to use to use the security apis on the IPhone to generate key pairs and not store them in the keychain? When I looked at the SecKeyRef it is an opaque pointer. ...

how can I read PRIVATE property of any outlook item?

is there any way other then filtering (Restrict) the items on Priavte field? I have an object of outlook Appointment/Task/Contact I want to check whether its marked as private or not ?? i'm using vsto / outlook 2003 / c#. ...

Doxygen not working on Public block(s) after Private block in Class

How do I tell Doxygen to document public sections after a private section in a (C++) class? E.g. class Brg { public: //! this function will be documented void documentedFunction1() private: void irrelevantFunction() public: //! this function will _not_ be documented void undocumentedFunction1() }; Even w...

How do you make a site private?

I'm just fooling around, learning the ins and outs of web development and I'd like to make my domain private until I'm ready to display it. What's the best way to do this? BTW, I have an Apache server on Debian. ...

ATL/COM: Defining a COM interface that won't be available outside of the DLL?

I have an ATL/COM-based DLL, made using VC++ 6.0. It's used for various executables built using VB6. I want to add some COM interfaces that will not be accessible via VB6, for the internal use of the DLL only. I want them to be COM interfaces rather than just C++ interfaces due to the fact that I'll be using them on objects which I on...

Unit testing private code

Hello all I am currently involved in developing with C# - Here is some background: We implement MVP with our client application and we have a cyclomatic rule which states that no method should have a cyclomatic complexity greater than 5. This leads to a lot of small private methods which are generally responsible for one thing. My ques...