Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Tableview does not work properly (under XE5)

 Post Reply Post Reply
Author
Hackbart Christian View Drop Down
New Member
New Member
Avatar

Joined: 14 Sep 2013
Posts: 13
Post Options Post Options   Quote Hackbart Christian Quote  Post ReplyReply Direct Link To This Post Topic: Tableview does not work properly (under XE5)
    Posted: 18 Sep 2013 at 11:31am

Hi,

the TTMSFMXNativeNSTableView does not seem to work like it should. Just put a TTMSFMXNativeNSTableView on a blank form, add GetColumnHeader, GetNumberOfColumns, GetNumberOfItems and GetValueForItem to it with content, e.g.:

procedure TForm1.tvTreeGetColumnHeader(Sender: TObject; AColumn: Integer;
var AHeader: string);
begin
AHeader := 'Column '+inttostr(AColumn);
end;

procedure TForm1.tvTreeGetNumberOfColumns(Sender: TObject;
var ANumberOfColumns: Integer);
begin
ANumberOfColumns := 2;
end;

procedure TForm1.tvTreeGetNumberOfItems(Sender: TObject;
var ANumberOfItems: Integer);
begin
ANumberOfItems := 50;
end;

procedure TForm1.tvTreeGetValueForItem(Sender: TObject; AColumn,
AItem: Integer; var AValueForItem: TValue);
begin
AValueForItem := random(100);
end;

The Items are not painted unless you do not resize the form. If you rearrange the Columns it the old content is painted as well as the new one until resizing the form.

Your TreeView Demo is also affected. If you click on a column in order to rearrange the text disappears and appears if you resize the whole form.

Clicking on a row returns a discardEventsMatchingMask:beforeEvent: ignores event parameter. Rebuild your application on Tiger to enable this API to work correctly.

Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3484
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 19 Sep 2013 at 2:30am
Hi, 

We are aware of this issue in XE5, yet with the same code it works in XE4 so it makes us think that the issue is in XE5 rather than in our component, but that needs to be investigated. If you have the ability to work in XE4, I suggest to work in XE4.

Kind Regards, 
Pieter


Edited by Pieter Scheldeman - 19 Sep 2013 at 2:31am
Back to Top
Hackbart Christian View Drop Down
New Member
New Member
Avatar

Joined: 14 Sep 2013
Posts: 13
Post Options Post Options   Quote Hackbart Christian Quote  Post ReplyReply Direct Link To This Post Posted: 19 Sep 2013 at 4:51am
Thanks for the response, i only have XE5. I guess i found the possible reason(s) and i will keep you informed.
Back to Top
Ryazanov Andrew View Drop Down
New Member
New Member
Avatar

Joined: 06 May 2014
Posts: 4
Post Options Post Options   Quote Ryazanov Andrew Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2014 at 4:16am
The same issue occurs on OS X Lion 10.7.5 when TTMSFMXNativeNSTableView is compiled in XE6. The list appears to be empty when shown and it becomes malformed after a resize.



Help please.
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3484
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2014 at 4:21am
Hi, 

Could you perhaps send us your sample so we can investigate this here?

Kind Regards, 
Pieter
Back to Top
Ryazanov Andrew View Drop Down
New Member
New Member
Avatar

Joined: 06 May 2014
Posts: 4
Post Options Post Options   Quote Ryazanov Andrew Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2014 at 4:59am
It's a very trivial example [download here]

When compiled in XE6 it works on OS X 10.9.3 (Mavericks)



However on OS X 10.7.5 (Lion) it becomes this




Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3484
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2014 at 5:50am
Can you perhaps try with the following code in the FormCreate

  TMSFMXNativeNSTableView.GetView.setWantsLayer(False);

Kind Regards, 
Pieter
Back to Top
Ryazanov Andrew View Drop Down
New Member
New Member
Avatar

Joined: 06 May 2014
Posts: 4
Post Options Post Options   Quote Ryazanov Andrew Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2014 at 8:49pm
Sorry this doesn't help. The old problem remains and new visual artifacts appear:



Any other ideas please?
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3484
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 2014 at 3:47am
Hi, 

Can you perhaps try with the following line:

  TMSFMXNativeNSTableView1.TableView.setWantsLayer(false);

 or a combination of this line and the previous line.
We needed to add this line because the TableView was drawing incorrect on newer Mac OS X versions.

Kind Regards, 
Pieter
Back to Top
Ryazanov Andrew View Drop Down
New Member
New Member
Avatar

Joined: 06 May 2014
Posts: 4
Post Options Post Options   Quote Ryazanov Andrew Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 2014 at 9:30pm
Tried these two lines alone and in combination, unfortunately it still does not work on older Mac OS X versions. Is there any other workaround to try?

procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFMXNativeNSTableView.TableView.setWantsLayer(False);
  TMSFMXNativeNSTableView.GetView.setWantsLayer(False);
end;
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3484
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jun 2014 at 3:35am
Hi, 

We are able to reproduce this here on 10.7.5, but unfortunately we are unable to find any relevant information. It is unclear why it does not work on older Mac OS X versions. The NSTableView uses the view-based implementation instead of the cell-based implementation that is introduced in 10.7. It could be an underlying FireMonkey issue in combination with an older Mac OS X version.

Kind Regards, 
Pieter
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down