Unity 4 gameObject.active equivalent

The new Unity 4 made some significant changes in how gameObject activation works.

I wanted to know how should we use the new method SetActive and the getters activeSelf and activeInHierarchy to replicate the same behaviour with the old gameObject.active and gameObject.SetActiveRecursively;

example 1:

in the old days we could do this:

gameObject.SetActiveRecursively(false); gameObject.transform.parent = null;

Now, we cannot do this as it states that we cannot change the parent of an object and modify its state (active/inactive) in the same frame + the exception “GameObject is already being activated or deactivated.”

example 2:

in the old unity I could do this:

gameObject.SetActiveRecursively(false); gameObject.active = true

this would keep the children deactivated while the parent is active. Now it seems we cannot do this anymore since all the children reflect the state of the parent as I understood.

Can someone please clarify this for me and say if there is a way to implement the old behaviour with the new gameObject activation philosophy ? Or the only thing left to do is to change everything in the scene and code and adapt to the new changes ?

gameObject.SetActive(true);