- The following code produces a Type mismatch on the last line of the InitForm procedure and i cannot find out why.
I just need scar to pull a Date and time out of its @$$ for me to manage and then i can finish the rest of it.Code:procedure RunOnce; begin Date:= Explode(':',NxTimeEdit1.Text); if(pos('PM',Date[2])>0)then begin Date[0]:=IntToStr(StrToInt(Date[0])+12); end; ClearDebug; Writeln(NxMonthCalendar1.Day); Writeln(NxMonthCalendar1.Month); Writeln(NxMonthCalendar1.Year); SetArrayLength(Date,5); Date[2]:=GetDebugLine(0); Date[3]:=GetDebugLine(1); Date[4]:=GetDebugLine(2); ClearDebug; frmDesign.ModalResult := mrOK; end; procedure InitForm; begin frmDesign := CreateForm; frmDesign.SetBounds(250,114,184,144); frmDesign.Visible := False; NxMonthCalendar1 := TNxMonthCalendar.Create(frmDesign); NxMonthCalendar1.Parent := frmDesign; NxMonthCalendar1.SetBounds(0,0,0,0); NxTimeEdit1 := TNxTimeEdit.Create(frmDesign); NxTimeEdit1.Parent := frmDesign; NxTimeEdit1.SetBounds(0,0,0,0); Label1 := TLabel.Create(frmDesign); Label1.Parent := frmDesign; Label1.SetBounds(8,8,156,23); Label1.Caption := 'Crew Tracker'; Label1.Font.Color := clBlack; Label1.Font.Height := -21; Label1.Font.Name := 'Courier New'; Label1.Font.Style := [fsBold]; Label2 := TLabel.Create(frmDesign); Label2.Parent := frmDesign; Label2.SetBounds(8,32,93,13); Label2.Caption := 'By <name>'; Button1 := TButton.Create(frmDesign); Button1.Parent := frmDesign; Button1.SetBounds(8,48,153,25); Button1.Caption := 'Start Program'; Button1.OnClick := @RunOnce; end;
Any help will be appreciated if there are any functions that'll help me extract the exact time or anything similar (But easier than this) will be helpful
+ I simply forgot to add the "sender :TObject" to the procedure dumb dumb dumb![]()










someone might have a similar difficulty soon, for which your post would've been helpful.










