On Sat, Mar 16, 2013 at 3:02 PM, 印場 乃亜 <shir...@galapagossoftware.com> wrote: > With BigLongThingIDontWantToWriteOutEverySingleTime do > begin > Height := 100; > Width := 200; > ... > SomeOtherObject.Submit(BigLongThingIDontWantToWriteOutEverySingleTime); > end; > > Notice how I have to write the long thing out again at the bottom. There > must be a way around that (Something like "Self", but that refers to > whatever you are using in With).
You can use a Class Helper: http://pastebin.com/pFL49byh But you gonna need to use a type cast. And with a "SomethingElse" at the with, as showed by Xiangrong, things can become messy. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal