Recent

Author Topic: [SOLVED] Multiline Hints or Captions? (Mac users: Please test)  (Read 10747 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Multiline Hints? (Mac users: Please test)
« Reply #15 on: April 19, 2016, 01:38:33 pm »
Since this issue still persists, in Lazarus 1.6 / FPC 3.0, I'm yet again try to find where the problem might be so I can try to fix it myself (and contribute to Lazarus).


So far I know that adding a Caption or Hint with line breaks works perfectly fine under Windows and Linux.
I also know it works when I set these at runtime, and I know that editing the .lfm works as well like so:



Code: Pascal  [Select][+][-]
  1.      object Label1: TLabel
  2.         Left = 415
  3.         Height = 16
  4.         Top = 297
  5.         Width = 87
  6.         Caption = 'Label1'#13#10'Label2'
  7.         ParentColor = False
  8.         WordWrap = True
  9.       end


As soon as I enter something in the Caption or Hint in the Object Inspector, the new line and/or carriage return gets filtered out.
Can anyone tell me how to debug the object inspector - I suspect the issue is to be found there, and a Carbon specific piece. I just have no idea how to do this.


jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #16 on: April 21, 2016, 12:04:50 pm »
Did you submit a bug report?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #17 on: April 21, 2016, 01:22:10 pm »
Yes I did: bugreport


And in a different topic, I've started (with help of others) to debug.  :D


It seems that TEdit does not store newline characters under Carbon.
Since the Object Inspector uses a TEdit for editing the Caption and Hint properties, newline characters get removed.


I am however a little surprised that other Mac users have not encountered this problem ...

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #18 on: April 21, 2016, 01:47:12 pm »
Yes I did: bugreport


And in a different topic, I've started (with help of others) to debug.  :D

Great!

I am however a little surprised that other Mac users have not encountered this problem ...

Well, I did years ago, but I didn't regard it as important enough to mind it. But it is good that you are caring.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #19 on: April 21, 2016, 03:59:18 pm »
Thanks  :)


Well, I do love the Mac and I love Lazarus, but I also like to support Windows and Linux.
So I do develop apps for all 3 platforms if I can (it's all freeware, available on my website).
Sometimes I really need multi-line captions and hints and ... it's a little annoying to see that Lazarus on the Mac still comes with it's (understandable) hurdles.
So instead of complaining, I'm trying to help as far as I can ...  :D

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #20 on: April 21, 2016, 11:24:46 pm »
... it's a little annoying to see that Lazarus on the Mac still comes with it's (understandable) hurdles.
So instead of complaining, I'm trying to help as far as I can ...  :D

You are right, the Mac port could well do with some additional care. But this is, as open source software goes.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Multiline Hints or Captions? (Mac users: Please test)
« Reply #21 on: April 22, 2016, 01:34:42 am »
Yeah I suppose so ... anyhoo, I think I fixed it (see the other post).

 

TinyPortal © 2005-2018