Recent

Author Topic: Showing Hint is visibly not consistent.  (Read 4088 times)

Josh

  • Hero Member
  • *****
  • Posts: 1270
Showing Hint is visibly not consistent.
« on: September 26, 2021, 02:47:47 pm »
Hi

Been converting an App from carbon to cocoa. and  have come across an issue; that hopefully is known.

The app is very large, so cannot publish.

My app has various language support and the hint text changes according to the language, this is where the issue is

in the picture the hint for A B C are all set the same, in fact B is set first, as teh others are the same they are then duplicated a.hint:=b.hint;
on carbon and windows this works fine, but under cocoa, the hint box is truncated both horizintal and vertical.

this happens on all controls. as the hint text is stoored in a a file and assigned to relevent controls; I have even checked the text that is displayed by writing the hint text of any control that is called to display a hint to a text file.

Hopefully someone else has encountered this.

Thanks in advance

Josh

« Last Edit: October 15, 2021, 10:18:16 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Shoing Hint is visibly not consistent.
« Reply #1 on: September 26, 2021, 05:00:29 pm »
I've created a basic sample project.
Could you please modify it to replicate the issue?

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: Shoing Hint is visibly not consistent.
« Reply #2 on: October 15, 2021, 10:18:02 pm »
Think I found the problem.

As the hints were being read from a text file that was created in windows, windows using CR LF for line ending was causing an issue when read on mac os Cocoa, but not carbon.

text was read like
Code: Pascal  [Select][+][-]
  1. lb:=#10#13;
  2. readln(fn,li);
  3. .....
  4. if li:=[START_HINT] then
  5. begin
  6.   readln(fn,li); // read first line of hint
  7.   hin:=li;
  8.   readln(fn,li);
  9.   while upcase(li)<>'[END_HINT]' DO
  10.   begin
  11.     hin:=hin+lb+li;
  12.     readln(fn,li);
  13.   end;
  14.   sethintctrl.hint:=hin;
  15. end;
  16.  

this worked fine on windows but on mac the issue is shown
altering to
Code: Pascal  [Select][+][-]
  1. lb:={$ifdef darwin}#10;{$else}#10#13;{$endif}
  2. readln(fn,li);
  3. .....
  4. if li:=[START_HINT] then
  5. begin
  6.   readln(fn,li); // read first line of hint
  7.   hin:=li;
  8.   readln(fn,li);
  9.   while upcase(li)<>'[END_HINT]' DO
  10.   begin
  11.     hin:=hin+lb+li;
  12.     readln(fn,li);
  13.   end;
  14.   sethintctrl.hint:=hin;
  15. end;
  16.  

I would have thought it would have just double spaced the text, but this was not the case.

« Last Edit: October 15, 2021, 10:29:48 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018