Commit Graph

33 Commits

Author SHA1 Message Date
paul
aa5a5e79ce merge revisions: 13909,13923,13924,13934,13935,13942,13943,13944,13946,13948,13950,13951,13952,13983,13994:
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler: 
  + start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
  + add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
  + add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
  + add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
  + tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
  + allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
  + prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
  + increase ppu version
  + test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
  + add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop

git-svn-id: trunk@14008 -
2009-11-02 03:24:48 +00:00
ivost
2bfe336917 * reverted compon.inc to the state of r13298 (csFreeNotification maybe set even with no freelist allocated)
git-svn-id: trunk@13917 -
2009-10-21 23:26:45 +00:00
ivost
0c725eae43 * fixed setting wrong component state. csDesignInstance and csInline were set inversed.
git-svn-id: trunk@13916 -
2009-10-21 19:24:10 +00:00
ivost
fff6e218af * readded BeforeDestructor that calls Destroying (delphi compatibility issue)
* uncommented code in Notification procedure (delphi compatibility issue)

git-svn-id: trunk@13874 -
2009-10-16 18:12:11 +00:00
ivost
3cfcdb2ab9 * reverted parts of r13852 (removed +/- with sets and added include/exclude)
git-svn-id: trunk@13873 -
2009-10-16 17:34:50 +00:00
ivost
242560f138 * corrected some typo that was inserted by r13853
git-svn-id: trunk@13854 -
2009-10-13 15:48:42 +00:00
ivost
65bca0a26d * enhanced how observers are notified by subjects on destroying
git-svn-id: trunk@13853 -
2009-10-13 12:22:36 +00:00
ivost
74c09e2268 * fixed strange free notification behavior of TComponent. Must be some memory corruption or so.
* replaced deprecated Include / Exclude calls

git-svn-id: trunk@13852 -
2009-10-13 12:05:14 +00:00
ivost
91430b6837 * reverted 13297
git-svn-id: trunk@13298 -
2009-06-19 09:03:51 +00:00
ivost
8b7167e538 * revised TComponent class. There was a lot of outdated, bad, maybe also old code. Tested also with Lazarus.
git-svn-id: trunk@13297 -
2009-06-19 00:07:59 +00:00
ivost
da55f04221 * fixed bug in SetAncestor of TComponent
git-svn-id: trunk@13293 -
2009-06-18 22:38:30 +00:00
michael
2abc422035 * ValidateContainer should call ValidateInsert
git-svn-id: trunk@12935 -
2009-03-21 09:26:48 +00:00
michael
ee1757a6c5 * Patch from Paul Ishenin to implement SetDesigning and SetDesignInstance
git-svn-id: trunk@10890 -
2008-05-05 19:34:06 +00:00
michael
d87768dc0c * Implemented Loading, as per Graeme Geldenhuys request
git-svn-id: trunk@10094 -
2008-01-29 12:31:24 +00:00
marco
408d5831ea * isimplementorof/referenceinfo, bug #10567
git-svn-id: trunk@9647 -
2008-01-06 00:12:43 +00:00
marco
97b1d04d8f * Fix for 10482, iinterfacecomponentreference
git-svn-id: trunk@9618 -
2008-01-02 20:45:09 +00:00
michael
a7a0e9a307 * Component name can be empty
git-svn-id: trunk@7737 -
2007-06-20 07:28:14 +00:00
michael
aaec51dd3f * Fixed bug #8033, removed longrec, so sysutils version is used
git-svn-id: trunk@5901 -
2007-01-11 20:40:12 +00:00
michael
4d01d98667 + Made validaterename case-insensitive (after bug #5166)
git-svn-id: trunk@3550 -
2006-05-17 06:12:44 +00:00
michael
f1cb336ee0 + FindComponent should be cse insensitive
git-svn-id: trunk@3545 -
2006-05-16 11:14:09 +00:00
michael
23ad0ae1ec + Removed HASINTF and VER1_0 defines
git-svn-id: trunk@239 -
2005-06-07 20:30:03 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
michael
783376530d + Streaming of subcomponents added by Marc Weustink 2005-04-15 07:21:09 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
fa2b38e520 + PaletteCreated added
+ TCollectionNotification added
2005-02-02 19:56:11 +00:00
peter
7cf6eff07f * interface additions 2005-01-31 19:41:39 +00:00
michael
ed3945ca04 + More optimal FreeNotification when destroying 2004-09-22 19:57:45 +00:00
michael
8b3a3858eb + Fix in TComponent destroy FreeNotifications. 2004-09-22 18:48:31 +00:00
florian
b950207508 * tcomponent.destroying is now called in tcomponent.beforedestruction 2004-08-07 16:44:34 +00:00
peter
1c9a936741 * LongRec is a packed record 2004-01-12 17:44:22 +00:00
peter
3d27318cb2 * moved classes unit to rtl 2003-10-06 21:01:06 +00:00