Re: NSTabView and revealing pages
Re: NSTabView and revealing pages
- Subject: Re: NSTabView and revealing pages
- From: Graham <email@hidden>
- Date: Sat, 23 Apr 2005 10:27:46 -0400
Hi again,
Just read the api guide (should have done this before).
To alleviate the issue, I added 2 lines of code to force each image to be cached as it is added to a cell:
image.lockFocusOnRepresentation(null);
image.unlockFocus();
I guess before, when the tab containing the matrix was clicked, the matrix created all the caches at that point which apparently takes an awful long time.
Any other thoughts on this appreciated.
-Graham
On Apr 23, 2005, at 8:04 AM, Graham wrote:
Hi,
I am writing a Cocoa app using Java.
I have an NSTabView and the view on one of the tabs contains an NSMatrixView to which I dynamically add about 50 NSButtonCells with images on them.
If the the tab containing this matrix is showing (the top tab) while the cells are added (so you see them get added and draw themselves) all is fine. Now if a different tab is the top one while this other one with the matrix populates its cells and I then I try to switch back to the tab with the matrix on it, there is a long delay (many seconds) before it actually switches. Once the tab has been displayed once I can switch between tabs with no problem and no delay. The more cells the matrix contains, the longer this initial delay is when I first switch to this tab.
Any ideas would be greatly appreciated.
Kind regards,
Graham
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden