[Lazarus] Old Lazarus code fail at runtime
chavoux at gmail.com
Thu Dec 29 08:40:04 CET 2016
From: Giuliano Colla <giuliano.colla at fastwebnet.it>
> Just a wild guess. The villain might be some property (such as FileName,
> Filter or InitialDir) that you did set up with old Lazarus at design
> time and which isn't compatible with current version. Revising the
> design time properties of your File Open Dialog with Object Inspector
> should fix the issue.
How do I do this? I created a new TOpenDialog (should be new version now?)
with the same name and the same InitialDir property set as "./data/text".
Still the same error (also when using the TOpenPictureDialog with
InitialDir set to "./data/photo"). However, just opening the file itself
> brdNr := StrToInt(NumberStr);
> brdNr := brdNr + 1;
> NumberStr := AddChar('0', IntToStr(brdNr), 3);
> FileNm := 'file://' + BaseDir + '/text/' + NumberStr + '.htm';
> FileNm := BaseDir + '/photo/' + NumberStr + 'a.jpg';
> FileNm := BaseDir + '/plate_bd/' + NumberStr + 'a.png';
it works without problems.
> From: DougC <doug at moosemail.net>
> Has OpenDialog been created at this point? Better to double check by
> changing to
> if Assigned(OpenDialog) then
> raise Exception.Create('OpenDialog not yet created');
> Yes, has it has been created. Adding the check has no effect at all.
I use the following code elsewhere (but only after executing and closing
> NumberStr := AnsiLeftStr(NumberStr, RPos('.', NumberStr)-1);
> NumberStr := AnsiRightStr(NumberStr, 3);//RPos('/', NumberStr));
> Can this have an influence on the OpenDialog?
Any other ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus