Board index » delphi » Re: IDE Suggestion
JED
![]() Delphi Developer |
JED
![]() Delphi Developer |
Re: IDE Suggestion2003-11-19 07:37:53 AM delphi0 Richard Grossman writes: Quotewith dmMyDataModule do begin JED |
Richard Grossman
![]() Delphi Developer |
2003-11-19 08:08:23 AM
Re: IDE Suggestion
Wouldn't it be nice if you could do this (for example) in a unit outside
of the one containing dmMyDataModule: with dmMyDataModule do begin // right here: . Within the "with", you could type a "." and then get the same popup choices as when you type: dmMyDataModule. ? |
Alexander Adam
![]() Delphi Developer |
2003-11-19 08:24:48 AM
Re: IDE Suggestion
hi,
QuoteWouldn't it be nice if you could do this (for example) in a unit outside It's muc more logical in my eyes as I can divide properties and other objects by that. Alex |
Peter Zolja
![]() Delphi Developer |
2003-11-19 09:12:03 AM
Re: IDE SuggestionQuotewith dmMyDataModule do begin |
Eugene Mayevski [SecureBlackbox]
![]() Delphi Developer |
2003-11-19 09:27:43 AM
Re: IDE Suggestion
Richard Grossman writes:
QuoteWithin the "with", you could type a "." and then get the same popup is because the language parser doesnt't report this information for some reason. -- Eugene Mayevski EldoS Corp., CTO Security and networking solutions www.eldos.com |
eshipman
![]() Delphi Developer |
2003-11-19 10:51:41 PM
Re: IDE Suggestion
In article <3fbab84c$XXXX@XXXXX.COM>, XXXX@XXXXX.COM
says... Quotehi, |
Kirk Halgren
![]() Delphi Developer |
2003-11-20 06:02:13 AM
Re: IDE Suggestion
"Eugene Mayevski [SecureBlackbox]" <XXXX@XXXXX.COM>writes
QuoteRichard Grossman writes: show the current value (at runtime)? That would be a great timesaver, especially if you inherit code which uses several nested variable names in a single "with ..". Kirk Halgren "If I were two-faced, do you think I would be wearing this one?" - Abraham Lincoln |
Richard Grossman
![]() Delphi Developer |
2003-11-20 07:41:01 AM
Re: IDE Suggestion
Peter Zolja writes:
Quote>with dmMyDataModule do begin |
lc
![]() Delphi Developer |
2003-11-20 09:08:38 AM
Re: IDE Suggestion
One of the problems with "with" block is that it is not possible to get
a reference to the object in question. For example, if you have a TList that keeps pointers to instances of TMyObject you have to do this: mo: TMyObject; mo := TMyObject.Create; MyList.Add( mo ); Doing the same in with block only is not possible: with TMyObject.Create do MyList.Add( ????? ); A solution might be to add a method to TObject (TObject.Instance for example) that allways returns "self". This way, one can do with TMyObject.Create do MyList.Add( Instance ); I suggested this long time ago (don't recall if it made it into QC), but I see no reaction to it. I know I needed it so many times. Anyone else? lc |
John Leavey
![]() Delphi Developer |
2003-11-20 05:59:09 PM
Re: IDE Suggestion
On Wed, 19 Nov 2003 20:08:38 -0500, lc <XXXX@XXXXX.COM>writes:
Quote
No reference required at all. John Leavey |
Didier Largange
![]() Delphi Developer |
2003-11-21 01:14:24 AM
Re: IDE Suggestion
Why not:
with TMyObject(MyList.Add(TMyObject.Create)) do ... Sure, it looks a bit uggly. <G> DL |