@Override
	public void init()
	{
		super.init();

		int offset = 0;
		grbit = ByteTools.readInt( getByteAt( offset++ ), getByteAt( offset++ ), getByteAt( offset++ ), getByteAt(
				offset++ ) );
		short strLen = ByteTools.readShort( getByteAt( offset ), getByteAt( offset + 1 ) );
		byte strGrbit = getByteAt( offset + 2 );
		if( (strGrbit & 0x1) == 0x1 )
		{
			strLen *= 2;
		}
		strLen += 3;
		byte[] namebytes = getBytesAt( offset, strLen );
		offset += strLen;
		dTitlePrompt = new Unicodestring();
		dTitlePrompt.init( namebytes, false );

		strLen = ByteTools.readShort( getByteAt( offset ), getByteAt( offset + 1 ) );
		strGrbit = getByteAt( offset + 2 );
		if( (strGrbit & 0x1) == 0x1 )
		{
			strLen *= 2;
		}
		strLen += 3;

		namebytes = getBytesAt( offset, strLen );
		offset += strLen;
		dTitleError = new Unicodestring();
		dTitleError.init( namebytes, false );

		strLen = ByteTools.readShort( getByteAt( offset ), getByteAt( offset + 1 ) );
		strGrbit = getByteAt( offset + 2 );
		if( (strGrbit & 0x1) == 0x1 )
		{
			strLen *= 2;
		}
		strLen += 3;
		namebytes = getBytesAt( offset, strLen );
		offset += strLen;
		dTextPrompt = new Unicodestring();
		dTextPrompt.init( namebytes, false );

		strLen = ByteTools.readShort( getByteAt( offset ), getByteAt( offset + 1 ) );
		strGrbit = getByteAt( offset + 2 );
		if( (strGrbit & 0x1) == 0x1 )
		{
			strLen *= 2;
		}
		strLen += 3;
		namebytes = getBytesAt( offset, strLen );
		offset += strLen;
		dTextError = new Unicodestring();
		dTextError.init( namebytes, false );

		int sz1 = ByteTools.readShort( getByteAt( offset++ ), getByteAt( offset++ ) );
		// unknown bytes
		garbageByteOne[0] = getByteAt( offset++ );
		garbageByteOne[1] = getByteAt( offset++ );
		byte[] formulaBytes = getBytesAt( offset, sz1 );
		firstCond = ExpressionParser.parseExpression( formulaBytes, this );
		offset += sz1;

		int sz2 = ByteTools.readShort( getByteAt( offset++ ), getByteAt( offset++ ) );
		// unknown bytes
		garbageByteTwo[0] = getByteAt( offset++ );
		garbageByteTwo[1] = getByteAt( offset++ );
		formulaBytes = getBytesAt( offset, sz2 );
		secondCond = ExpressionParser.parseExpression( formulaBytes, this );
		offset += sz2;

		numLocs = getByteAt( offset++ );
		cRangeList = new ArrayList();
		for( int i = 0; i < numLocs; i++ )
		{
			byte[] b = new byte[1];
			b[0] = 0x0;
			b = ByteTools.append( b, getBytesAt( offset, 8 ) );
			PtgArea p = new PtgArea( false );
			p.setParentRec( this );
			p.init( b );
			cRangeList.add( p );
			offset += 8;
		}

		// set all the grbit fields
		valType = (byte) ((grbit & BITMASK_VALTYPE));
		errStyle = (byte) ((grbit & BITMASK_ERRSTYLE) >> 4);
		IMEMode = (short) ((grbit & BITMASK_MDIMEMODE) >> 10);
		fStrLookup = ((grbit & BITMASK_FSTRLOOKUP) == BITMASK_FSTRLOOKUP);
		fAllowBlank = ((grbit & BITMASK_FALLOWBLANK) == BITMASK_FALLOWBLANK);
		fSuppressCombo = ((grbit & BITMASK_FSUPRESSCOMBO) == BITMASK_FSUPRESSCOMBO);
		fShowInputMsg = ((BITMASK_FSHOWINPUTMSG) == BITMASK_FSHOWINPUTMSG);
		fShowErrMsg = ((grbit & BITMASK_FSHOWERRORMSG) == BITMASK_FSHOWERRORMSG);
		typOperator = (byte) ((grbit & BITMASK_TYPOPERATOR) >> 20);
	}