Tad писал(а): Я специально ComboBox.onClick не использовал
Не там ошибка, его можно убрать. Смотрим внимательнее
------------ Дoбавленo:
Вот, то же, но без ComboBox.onClick
Add(MainForm,10452067,224,266) { Width=731 Height=596 Color=16777215 BorderStyle=1 Position=1 Point(onPaint) Point(Handle) Point(Width) Point(Height) link(onCreate,5036761:doWork1,[]) link(onPaint,5036761:doWork2,[]) } Add(MultiElementEx,13955934,392,301) { link(onEvent5,10461321:FirstDay,[(464,307)(464,181)]) link(onEvent6,16023199:doFor,[(520,314)(520,272)]) link(onEvent7,705410:doCompare,[]) link(Bitmap,5018142:getVar,[]) } BEGIN_SDK Add(EditMultiEx,14557913,21,21) { WorkCount=#5:doFor| EventCount=#8:onEvent5|8:onEvent6|8:onEvent7| VarCount=#8:Position|4:Var3| DataCount=#6:Bitmap| link(doFor,13189283:doFor,[(63,27)(63,209)]) link(Position,13189283:Position,[(27,209)(69,209)(69,247)(111,247)]) link(Var3,12573771:Var3,[(34,209)(275,209)(275,261)]) } Add(StrList,15854652,210,49) { @Hint=#16:Названия месяцев| Strings=#6:Январь|7:Февраль|4:Март|6:Апрель|3:Май|4:Июнь|4:Июль|6:Август|8:Сентябрь|7:Октябрь|6:Ноябрь|7:Декабрь| } Add(GlobalVar,4075127,315,182) { Name="MonthDX" Data=Integer(150) } Add(GlobalVar,1683346,259,161) { Name="MonthDY" Data=Integer(135) } Add(For,13189283,105,203) { IncludeEnd=1 link(onEvent,12816700:doEvent1,[]) link(End,15854652:Count,[(118,149)(223,149)]) } Add(MathParse,10250770,308,210) { @Hint=#12:Вычисление Х| MathStr="%1 mod 3 * %2 + 40" link(X2,4075127:Var,[]) } Add(ArrayRW,9989440,224,126) { link(Array,15854652:Array,[]) } Add(Hub,12816700,175,203) { OutCount=7 link(onEvent1,9989440:doRead,[(215,209)(215,132)]) link(onEvent2,10250770:doCalc,[]) link(onEvent3,13695372:doCalc,[]) link(onEvent4,4462864:doDraw,[(219,230)(219,262)(37,262)(37,293)]) link(onEvent5,14557913:onEvent5,[(264,237)(264,27)]) link(onEvent6,14557913:onEvent6,[(264,244)(264,34)]) link(onEvent7,14557913:onEvent7,[(264,251)(264,41)]) } Add(MathParse,13695372,252,217) { @Hint=#12:Вычисление Y| MathStr="%1 div 3 * %2" link(X2,1683346:Var,[]) } Add(Img_Text,4462864,49,287) { DrawSource=1 Font=[MS Sans Serif,12,1,255,1] Text="Привет" Point(Y) Point(X) link(Bitmap,14557913:Bitmap,[(55,154)(27,154)]) link(Text,9989440:Item,[(62,182)(230,182)]) link(Y,12573771:Var2,[(69,272)(258,272)]) link(X,10250770:Result,[(76,281)(314,281)]) } Add(GetDataEx,12573771,245,252) { link(Data,13695372:Result,[]) } END_SDK Add(MultiElementEx,16023199,532,266) { @Hint=#20:Печать названий дней| link(X3,13955934:Var3,[(538,254)(472,254)(472,352)(405,352)]) link(Bitmap,12382035:getVar,[]) link(X1,10154595:getVar,[]) } BEGIN_SDK Add(EditMultiEx,960457,21,21) { WorkCount=#5:doFor| VarCount=#8:Position| DataCount=#2:X3|6:Bitmap|2:X1| link(doFor,5613410:doFor,[(35,27)(35,125)]) link(Position,5613410:Position,[(27,186)(55,186)]) } Add(StrList,11365246,175,49) { @Hint=#28:Список названий дней недели | Strings=#2:Пн|2:Вт|2:Ср|2:Чт|2:Пт|2:Сб|2:Вс| } Add(GlobalVar,15848507,259,84) { Name="DayDY" Data=Integer(15) } Add(GlobalVar,9429041,273,105) { Name="MonthH" Data=Integer(20) } Add(For,5613410,49,119) { IncludeEnd=1 link(onEvent,4052954:doEvent1,[]) link(End,11365246:Count,[(62,107)(188,107)]) } Add(MathParse,3987141,252,147) { DataCount=4 MathStr="%1 mod 7 * %2 + %3 + %4" link(X2,15848507:Var,[]) link(X3,960457:X3,[(272,84)(27,84)]) link(X4,9429041:Var,[]) } Add(Img_Text,12399398,161,231) { DrawSource=1 Font=[MS Sans Serif,8,0,16711680,1] Point(Y) Point(X) Point(doFont) link(Bitmap,960457:Bitmap,[(167,126)(34,126)]) link(Text,11402806:Item,[(174,191)(195,191)]) link(Y,3987141:Result,[(181,205)(258,205)]) link(X,13367576:Result,[(188,212)(349,212)]) } Add(ArrayRW,11402806,189,119) { link(Array,11365246:Array,[]) } Add(Hub,4052954,112,119) { OutCount=4 link(onEvent1,11402806:doRead,[]) link(onEvent2,13367576:doCalc,[]) link(onEvent3,3987141:doCalc,[(159,139)(159,153)]) link(onEvent4,12399398:doDraw,[(152,146)(152,237)]) } Add(GlobalVar,11260849,350,91) { Name="MonthDX" Data=Integer(150) } Add(MathParse,13367576,343,126) { @Hint=#12:Вычисление Х| MathStr="%1 mod 3 * %2 + 5" link(X1,960457:X1,[(349,74)(41,74)]) link(X2,11260849:Var,[]) } END_SDK Add(FormatStr,5479317,147,266) { Mask="Календарь на %1-й год." link(onFString,10452067:doCaption,[]) link(Str1,7170063:getVar,[]) } Add(LineBreakEx,7170063,147,231) { Caption="W_Year" Type=2 } Add(MultiElementEx,705410,616,315) { @Hint=#19:Печать чисел месяца| link(Bitmap,9444561:getVar,[]) link(Data,12178162:getVar,[]) } BEGIN_SDK Add(EditMultiEx,1390549,21,21) { WorkCount=#9:doCompare| DataCount=#6:Bitmap|4:Data| Width=559 Height=424 link(doCompare,14635507:doCompare,[(35,27)(35,258)]) } Add(GlobalVar,16450382,483,70) { Name="DayDX" Data=Integer(20) } Add(StrList,5790042,252,189) { @Hint=#16:Названия месяцев| Strings=#2:31|2:28|2:31|2:30|2:31|2:30|2:31|2:31|2:30|2:31|2:30|2:31|2:29| } Add(For,1651522,259,308) { Start=1 link(onEvent,5212169:doEvent1,[]) link(End,8740689:Item,[]) } Add(ArrayRW,8740689,266,259) { link(onRead,1651522:doFor,[(310,265)(310,289)(247,289)(247,314)]) link(Array,5790042:Array,[]) } Add(If_else,7724961,119,238) { Op2=Integer(1) link(onTrue,15422474:doData,[]) link(onFalse,11541037:doWork3,[(162,251)(162,279)(221,279)]) link(Op1,9554240:Var,[]) } Add(DoData,15422474,182,238) { Data=Integer(12) link(onEventData,11541037:doWork1,[(221,244)]) } Add(HubEx,11541037,217,252) { link(onEvent,8740689:doRead,[]) } Add(GlobalVar,9554240,119,175) { Name="LeapYear" } Add(Img_Text,10031858,455,371) { DrawSource=1 Font=[Courier,10,0,0,204] Point(Y) Point(X) Point(doFont) link(onDraw,3143886:doOperation,[]) link(Bitmap,1390549:Bitmap,[(461,196)(27,196)]) link(Y,8048449:Result,[(475,321)(370,321)]) link(X,10629540:Result,[]) } Add(MathParse,10629540,476,140) { DataCount=5 MathStr="(%1 div 7 * %2) + (%3 mod 3 * %4) + %5 +10" link(X1,10358289:Var2,[]) link(X2,16450382:Var,[]) link(X3,3015870:Var3,[(496,93)]) link(X4,4531473:Var,[]) link(X5,12447479:Var,[]) } Add(MathParse,8048449,364,238) { DataCount=5 MathStr="( %1 mod 7 ) * %2 + (%3 div 3 )* %4 + %5" link(X1,10358289:Var1,[(370,107)]) link(X2,10891721:Var,[]) link(X3,3015870:Var2,[]) link(X4,11110742:Var,[]) link(X5,4733996:Var,[]) } Add(Hub,5212169,315,308) { InCount=2 OutCount=4 link(onEvent1,10629540:doCalc,[(351,314)(351,146)]) link(onEvent2,8048449:doCalc,[(358,321)(358,244)]) link(onEvent3,14022728:doConvert,[(359,328)(359,377)]) } Add(GlobalVar,4531473,497,91) { Name="MonthDX" Data=Integer(150) } Add(GlobalVar,12447479,504,112) { Name="DayDX" Data=Integer(20) } Add(GlobalVar,11365643,476,49) { Name="FirstDay" } Add(GlobalVar,10344769,364,147) { Name="FirstDay" } Add(GlobalVar,10891721,371,161) { Name="DayDY" Data=Integer(15) } Add(GlobalVar,11110742,385,182) { Name="MonthDY" Data=Integer(135) } Add(GlobalVar,4733996,392,196) { Name="MonthH" Data=Integer(20) } Add(Math,3143886,511,371) { Op2=1 ResultType=0 link(onResult,14789831:doValue,[(555,377)(555,363)(499,363)(499,349)]) link(Op1,14789831:Var,[]) } Add(GlobalVar,14789831,511,343) { Name="FirstDay" } Add(GetDataEx,10358289,469,98) { link(Data,11365643:Var,[]) } Add(GetDataEx,3015870,371,84) { link(Data,1390549:Data,[(384,54)(34,54)]) } Add(If_else,14635507,49,252) { Op2=Integer(1) link(onTrue,7724961:doCompare,[(89,258)(89,244)]) link(onFalse,11541037:doWork2,[]) link(Op1,3015870:Var1,[(55,93)]) } Add(Convertor,14022728,392,371) { SymbolFill=" " link(onResult,10031858:doDraw,[]) } END_SDK Add(LineBreakEx,12178162,623,273) { Caption="W_Month" Type=2 } Add(Hub,10611969,322,280) { OutCount=5 link(onEvent1,5010512:doData,[(368,286)(368,482)(212,482)(212,447)]) link(onEvent2,5479317:doString,[(373,293)(373,198)(135,198)(135,272)]) link(onEvent3,10461321:LeapYear,[(453,300)(453,188)]) link(onEvent4,13955934:doFor,[]) } Add(LineBreakEx,11383682,273,322) { Caption="W_Year" Type=3 link(_Data,5036761:Var1,[]) } Add(ChildGroupBox,5036761,273,280) { link(onEvent1,10611969:doEvent1,[]) } BEGIN_SDK Add(EditMulti,14916205,21,21) { EventCount=1 WorkCount=2 VarCount=1 Width=230 Height=256 link(doWork1,13875363:doFor,[(67,27)(67,62)]) link(doWork2,7514767:doWork2,[]) link(Var1,13984710:EditText,[(27,130)(181,130)]) } Add(GroupBox,1812660,35,105) { Left=610 Top=20 Width=94 Height=120 Color=-16777197 Caption="Выбор года" } Add(ComboBox,13984710,161,56) { Left=10 Top=30 Width=75 Height=21 Text="2008" DataType=1 Point(EditText) } Add(For,13875363,112,56) { Start=1950 End=2050 link(onEvent,13984710:doAdd,[]) } Add(Button,11132882,119,161) { Left=10 Top=75 Width=75 Caption="Календарь" link(onClick,7514767:doWork3,[(228,167)]) } Add(HubEx,7514767,224,21) { Angle=3 link(onEvent,14916205:onEvent1,[(228,27)]) } END_SDK Add(LineBreakEx,15867331,539,126) { Caption="W_Year" Type=2 } Add(InlineCode,10461321,539,175) { @Hint=#12:Определение:|19:1. Высокосного года|35:2. Дня недели для 1-го числа месяца| WorkPoints=#8:FirstDay|8:LeapYear| EventPoints=#3:ev1|3:ev2| DataPoints=#5:rYear|6:rMonth| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|19: rYear:THI_Event;|20: rMonth:THI_Event;|21: ev1,ev2:THI_event;|51: procedure FirstDay(var _Data:TData; Index:Word);|51: procedure LeapYear(var _Data:TData; Index:Word);|5: end;|0:|14:implementation|0:|31:procedure THiAsmClass.firstDay;|3:var|29: mYear,mday,mmonth,d:integer;|14: ss:TDateTime;|5:begin|36: mYear := ReadInteger(_Data,rYear);|40: mmonth := ReadInteger(_Data,rMonth); |34: EncodeDate(mYear,mmonth+1,1,ss);|22: d:=DayOfWeek(ss)-1; |26: if d < 0 then inc(d, 7);|21: _hi_OnEvent(ev1,d);|0:|4:end;|0:|31:procedure THiAsmClass.LeapYear;|20:var mYear,N:integer;|5:begin|36: mYear := ReadInteger(_Data,rYear);|29: N:= ord(IsLeapYear(myear));|21: _hi_OnEvent(ev2,N); |6:end; |4:end.| link(ev1,12506770:doValue,[(587,181)(587,174)]) link(ev2,16012046:doValue,[(586,188)(586,195)]) link(rYear,15867331:getVar,[]) link(rMonth,2391732:getVar,[]) } Add(LineBreakEx,7005018,532,308) { Caption="W_Day" Type=3 link(_Data,16023199:Position,[]) } Add(GlobalVar,12506770,602,168) { Name="FirstDay" Data=Integer(1) } Add(LineBreakEx,9444561,616,252) { Caption="obHandle" Type=2 } Add(LineBreakEx,12382035,539,217) { Caption="obHandle" Type=2 } Add(LineBreakEx,2391732,546,147) { Caption="W_Month" Type=2 } Add(LineBreakEx,5018142,392,266) { Caption="obHandle" Type=2 } Add(GlobalVar,16012046,602,189) { Name="LeapYear" } Add(LineBreakEx,10154595,546,238) { Caption="W_Month" Type=2 } Add(LineBreakEx,273268,224,490) { Caption="obHandle" Type=3 link(_Data,3849444:Var2,[]) } Add(LineBreakEx,1618988,392,350) { Caption="W_Month" Type=3 link(_Data,13955934:Position,[]) } Add(Img_Rectangle,15327596,273,441) { Point2AsOffset=0 DrawSource=1 Color=16777215 Style=1 Point(Point2) link(Bitmap,3849444:Var3,[(279,380)]) link(Point2,497124:Point,[]) } Add(GetDataEx,3849444,217,371) { link(Data,10452067:Handle,[]) } Add(PointXY,497124,287,392) { link(X,10452067:Width,[(293,345)(237,345)]) link(Y,10452067:Height,[(300,345)(244,345)]) } Add(DoData,5010512,231,441) { link(onEventData,15327596:doDraw,[]) }
|