n++; for (int i= 0; i < n; i++) { int index= REVERSE ? (n-i) : (i+1); int[] outHandle= new int[1]; if (OS.GetIndexedSubControl(parentControlHandle, (short)index, outHandle) == 0) { if (outHandle[0] == controlHandle) { if (i != pos) System.out.println("MacUtil.embedControl: creation at position nyi (is: "+i+" should: "+ pos+")"); return; } } } System.out.println("MacUtil.embedControl: new child not found");
	public static void embedControl(int controlHandle, int parentControlHandle) {		if (REVERSE) {			int count= countSubControls(parentControlHandle);			OS.EmbedControl(controlHandle, parentControlHandle);			int[] outControl= new int[1];			for (int i= 0; i < count; i++) {				if (OS.GetIndexedSubControl(parentControlHandle, (short)(1), outControl) == 0)					OS.EmbedControl(outControl[0], parentControlHandle);				else					throw new SWTError();			}		} else {			OS.EmbedControl(controlHandle, parentControlHandle);		}	}