XE7 and more With weirdness
XE7 and more With weirdness 100% reproducable fail: Access violation at address 00B5464D in module 'MyApp.exe'. Read of address 00000040. Fails: tpLot := Tp.Add; with tpLot do begin LotId := Lot.Id; // LotNo := Lot.LotNumber; ExpiryDate := Lot.ExpireDate; ProducedDate := Lot.ProducedStartTime; ArticleId := ArtSum.ArticleId; ArticleNo := ArtSum.ArticleNumber; OriginalArticleId := ArtSum.ArticleId; Quantity := NumDPacks * ArtSum.BaseUnitsPerKPack; NetWeight := Quantity * ArtSum.NetWeightPrBaseUnit; GrossWeight := NetWeight + (ArtSum.TaraWeightPrFPack * Quantity); LotLockState := Lot.LockStateCode; end; Works: tpLot := Tp.Add; tpLot.LotId := Lot.Id; tpLot.LotNo := Lot.LotNumber; tpLot.ExpiryDate := Lot.ExpireDate; tpLot.ProducedDate := Lot.ProducedStartTime; tpLot.ArticleId := ArtSum.ArticleId; tpLot.ArticleNo := ArtSum.ArticleNumber; tpLot.OriginalArticleId :...