Re: Status bar item icon is always black

2020-06-20 Thread Georg Seifert via Cocoa-dev
Why do you put the images in an asset catalog? I use PDFs a lot for icons, (in 
my case mostly as Template images). But I just drag them into a groups in Xcode 
and they are copied into the Resource folder. Then you can load them with 
-[NSBundle imageForResource:]. If you have @2x version, they are loaded 
automatically (if they are not combined on build time.
To control if it is a Template, add that string to the file name, or in your 
case, don't add it.
Sometimes I "preload" images early and then do [image setName:@"imageName"]. 
That way you can get it by calling [NSImage imageNamed:@"imageName"] (not sure 
if that is really needed).

Asset catalogs are useful if you need more functionality. e.g. if you actually 
need a .icns files. Or if you have different versions for light and dark mode. 
 
Georg

> On 19. Jun 2020, at 21:54, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> I think, I solved the mystery.
> Just for the record, in case someone else stumbles across this 
> (it's probably old news for you guys on this list):
> 
> You can use a vector drawing in a PDF , drag it into the asset catalog (not 
> into the default AppIcon!),
> and load it as if it were a regular image , and it works, even with 
>   itemImage?.isTemplate = false
> (in that case, colors in the icon will be nicely preserved).
> I believe, NSImage() converts it into a bitmap during loading. Maybe, Xcode 
> does it already.
> 
> If you want to load a bitmap image, then do NOT try to populate the default 
> AppIcon with all the resolutions , from 16x16 pixels through 512x512@2x !
> You will get a mostly black-ish status bar icon.
> You would do that for a regular app, but it does NOT work for status bar 
> items.
> 
> You must use a 32x32 image, and this shows fine in color in the status bar.
> If you drag that into the asset catalog, you will get a regular image set in 
> Xcode;
> then you can also populate the 2x and the 3x versions with resolutions of 
> 64x64 and 96x96 bitmaps.
> 
> 
> Best, G.
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Localization under Catalina

2020-05-27 Thread Georg Seifert via Cocoa-dev
The apps work with either, nibs and Base localisation. The main advantage is 
that it provides an app for the translators and a file format that contains all 
the keys. So you don’t need to send all those .strings files (if you have a 
couple sub projects that gets really messy (I have 40 or 50 plugins and 
frameworks). You send your translators a .loc file, they translate it and send 
the file back. You import it in the Manager app and it will update all your 
.nibs and .strings. Adding a new language to my app took one hour or so on my 
part. Importing new translations takes 1 minute. I wouldn’t be able to have any 
localisation without those tools. 

Georg

> Am 27.05.2020 um 22:51 schrieb Georg Seifert via Cocoa-dev 
> :
> 
> You find them in the releases section in the repo: 
> https://github.com/schriftgestalt/LocalizationSuite/releases 
> 
> Georg
> 
>> Am 27.05.2020 um 21:12 schrieb Eyal Redler :
>> 
>> Thanks! 
>> Do you have perhaps a working distribution of your version?
>> What is the status of the original set of tools? It seems to be working (at 
>> least launching)
>> 
>> Eyal
>> 
>> 
>> 
>>> On 27 May 2020, at 21:17, Georg Seifert via Cocoa-dev 
>>>  wrote:
>>> 
>>> I use the http://www.loc-suite.org for all my localisations. The original 
>>> author is not there any more but I my versions should work: 
>>> https://github.com/schriftgestalt/LocalizationSuite
>>> 
>>> It is very good at keeping existing translations. 
>>> 
>>> Best
>>> Georg Seifert
>>> 
>>> 
>>>> Am 27.05.2020 um 19:30 schrieb Rob Petrovec via Cocoa-dev 
>>>> :
>>>> 
>>>> I have never used AppleGlot.  However, I’m curious why you don’t set up a 
>>>> .lproj for each localization you support containing .strings files with 
>>>> your translated strings inside?
>>>> 
>>>> —Rob
>>>> 
>>>> 
>>>>> On May 27, 2020, at 10:04 AM, Eyal Redler via Cocoa-dev 
>>>>>  wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> It looks like Apple has dropped support for AppleGlot under Catalina. The 
>>>>> latest version (from 2017) will not install on Catalina and links and 
>>>>> mentions to AppleGlot have been removed from their localisation page 
>>>>> (https://developer.apple.com/localization/).
>>>>> 
>>>>> It looks like Apple wants us to use Xcode's localisation tools which is 
>>>>> OK but it doesn't seem to address at all the issue of incremental 
>>>>> localization, my app is already localized in 14 languages and I just need 
>>>>> to add the new strings/nibs and update the changed nibs, not create a 
>>>>> localisation from scratch.
>>>>> 
>>>>> I think that for now I'll switch back to Mojave to build this 
>>>>> localisation using my workflow with AppleGlot but it would be great if I 
>>>>> could run AppleGlot on Catalina, was anyone successful in doing that?
>>>>> Also, is there some support for incremental localisation using the xcode 
>>>>> localization tools? Maybe I'm missing something here
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> 
>>>>> Eyal Redler
>>>>> 
>>>>> "If Uri Geller bends spoons with divine powers, then he's doing it the 
>>>>> hard way."
>>>>> --James Randi
>>>>> www.eyalredler.com
>>>>> 
>>>>> 
>>>>> ___
>>>>> 
>>>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>>>> 
>>>>> Please do not post admin requests or moderator comments to the list.
>>>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>>> 
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
>>>>> 
>>>>> This email sent to petr...@mac.com
>>>> 
>>>> ___
>>>> 
>>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>>> 
>>>> Please do not post admin requests or moderator comments to the list.
>>>> Contact the

Re: Localization under Catalina

2020-05-27 Thread Georg Seifert via Cocoa-dev
You find them in the releases section in the repo: 
https://github.com/schriftgestalt/LocalizationSuite/releases 

Georg

> Am 27.05.2020 um 21:12 schrieb Eyal Redler :
> 
> Thanks! 
> Do you have perhaps a working distribution of your version?
> What is the status of the original set of tools? It seems to be working (at 
> least launching)
> 
> Eyal
> 
> 
> 
>> On 27 May 2020, at 21:17, Georg Seifert via Cocoa-dev 
>>  wrote:
>> 
>> I use the http://www.loc-suite.org for all my localisations. The original 
>> author is not there any more but I my versions should work: 
>> https://github.com/schriftgestalt/LocalizationSuite
>> 
>> It is very good at keeping existing translations. 
>> 
>> Best
>> Georg Seifert
>> 
>> 
>>> Am 27.05.2020 um 19:30 schrieb Rob Petrovec via Cocoa-dev 
>>> :
>>> 
>>> I have never used AppleGlot.  However, I’m curious why you don’t set up a 
>>> .lproj for each localization you support containing .strings files with 
>>> your translated strings inside?
>>> 
>>> —Rob
>>> 
>>> 
>>>> On May 27, 2020, at 10:04 AM, Eyal Redler via Cocoa-dev 
>>>>  wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> It looks like Apple has dropped support for AppleGlot under Catalina. The 
>>>> latest version (from 2017) will not install on Catalina and links and 
>>>> mentions to AppleGlot have been removed from their localisation page 
>>>> (https://developer.apple.com/localization/).
>>>> 
>>>> It looks like Apple wants us to use Xcode's localisation tools which is OK 
>>>> but it doesn't seem to address at all the issue of incremental 
>>>> localization, my app is already localized in 14 languages and I just need 
>>>> to add the new strings/nibs and update the changed nibs, not create a 
>>>> localisation from scratch.
>>>> 
>>>> I think that for now I'll switch back to Mojave to build this localisation 
>>>> using my workflow with AppleGlot but it would be great if I could run 
>>>> AppleGlot on Catalina, was anyone successful in doing that?
>>>> Also, is there some support for incremental localisation using the xcode 
>>>> localization tools? Maybe I'm missing something here
>>>> 
>>>> Thanks,
>>>> 
>>>> 
>>>> Eyal Redler
>>>> 
>>>> "If Uri Geller bends spoons with divine powers, then he's doing it the 
>>>> hard way."
>>>> --James Randi
>>>> www.eyalredler.com
>>>> 
>>>> 
>>>> ___
>>>> 
>>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>>> 
>>>> Please do not post admin requests or moderator comments to the list.
>>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>> 
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
>>>> 
>>>> This email sent to petr...@mac.com
>>> 
>>> ___
>>> 
>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>> 
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>> 
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
>>> 
>>> This email sent to georg.seif...@gmx.de
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/eyal%40mellel.com
>> 
>> This email sent to e...@mellel.com
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Localization under Catalina

2020-05-27 Thread Georg Seifert via Cocoa-dev
I use the http://www.loc-suite.org for all my localisations. The original 
author is not there any more but I my versions should work: 
https://github.com/schriftgestalt/LocalizationSuite

It is very good at keeping existing translations. 

Best
Georg Seifert


> Am 27.05.2020 um 19:30 schrieb Rob Petrovec via Cocoa-dev 
> :
> 
> I have never used AppleGlot.  However, I’m curious why you don’t set up a 
> .lproj for each localization you support containing .strings files with your 
> translated strings inside?
> 
> —Rob
> 
> 
>> On May 27, 2020, at 10:04 AM, Eyal Redler via Cocoa-dev 
>>  wrote:
>> 
>> Hi,
>> 
>> It looks like Apple has dropped support for AppleGlot under Catalina. The 
>> latest version (from 2017) will not install on Catalina and links and 
>> mentions to AppleGlot have been removed from their localisation page 
>> (https://developer.apple.com/localization/).
>> 
>> It looks like Apple wants us to use Xcode's localisation tools which is OK 
>> but it doesn't seem to address at all the issue of incremental localization, 
>> my app is already localized in 14 languages and I just need to add the new 
>> strings/nibs and update the changed nibs, not create a localisation from 
>> scratch.
>> 
>> I think that for now I'll switch back to Mojave to build this localisation 
>> using my workflow with AppleGlot but it would be great if I could run 
>> AppleGlot on Catalina, was anyone successful in doing that?
>> Also, is there some support for incremental localisation using the xcode 
>> localization tools? Maybe I'm missing something here
>> 
>> Thanks,
>> 
>> 
>> Eyal Redler
>> 
>> "If Uri Geller bends spoons with divine powers, then he's doing it the hard 
>> way."
>> --James Randi
>> www.eyalredler.com
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
>> 
>> This email sent to petr...@mac.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Finding memory leaks

2020-05-20 Thread Georg Seifert via Cocoa-dev
You need to check the backtrace where the leaking object was created. Sometimes 
it points to a line that has nothing to do with the leak, it is just triggering 
it.

g

> On 20.05.2020, at 16:03, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> I have a few stupid questions regarding (potential) memory leaks,
> so please bear with me.
> First of all, my code is ARC managed.
> 
> I tried the Leaks tool of Instruments.
> 
> It tells me, if i understand correctly, that I have a leak at this line of my 
> code:
> 
>CFDictionaryRef fileProps = CGImageSourceCopyPropertiesAtIndex( new_image, 
> 0, NULL ); 
> 
> This line is in a method I declared like that:
> 
> - (void) loadNextImageWithIndex: (unsigned long) next_index image: 
> (CGImageRef *) next_image
>  withProps: (CFDictionaryRef *) next_props
> 
> and at the end of the function, I pass fileProps back like so
> 
>   *next_props = fileProps;
> 
> The caller then makes a copy of next_props for later use, and CFRelease's 
> next_props.
> (That copy is also released later.)
> 
> So it is unclear to me why the Leaks tool thinks that the above line leaks 
> memory.
> 
> 
> 
> Another area of questions is around CALayer's and images.
> I create images like so:
> 
>CGImageRef newImageRef = CGImageSourceCreateThumbnailAtIndex( new_image, 0,
>   (__bridge 
> CFDictionaryRef) imageOpts );
> I store newImageRef in an array (history_of_images).
> Then, I assign newImageRef to a CALayer like this:
> 
>imgLayer.contents = (__bridge id)(newImageRef);
> 
> At some point later, when the layer is no longer part of the layer hierarchy, 
> I release it like this:
> 
>   CGImageRelease( history_of_images[k].img );
> 
> Can you spot any point in this sequence where there could be a memory leak?
> Does any of the assignments I described create a copy?
> Should I release CALayer's myself after I have removed it from its super 
> layer?
> By the growth of the memory usage of my app I suspect that the images I've 
> been loading keep lingering on somewhere in memory.
> 
> 
> Another area of questions centers around dispatch queues.
> The above stuff (loading, thumbnail creation) is, mostly, done in a 
> background thread via dispatch_async.
> I have tried to put an @autoreleasepool around the code that runs in the 
> background thread, to no avail.
> (My code is under ARC.)
> 
> But in Instruments, all indications (e.g., Heaviest stack trace) point to 
> CGImageSourceCreateThumbnailAtIndex, that shows a stack trace like that:
> 
>  13 libdispatch.dylib  269.42 KB _dispatch_client_callout
>  12 ArtSaverApp  269.42 KB -[ArtSaverView loadNextImage] 
> /Users/zach/Code/ArtSaver/ArtSaverView.m:2045
>  11 ArtSaverApp  269.42 KB -[ArtSaverView 
> loadNextImageWithIndex:image:withProps:] 
> /Users/zach/Code/ArtSaver/ArtSaverView.m:2083
>  10 ImageIO  248.44 KB CGImageSourceCopyPropertiesAtIndex
>   9 ImageIO  248.44 KB IIOImageSource::copyPropertiesAtIndex(unsigned 
> long, IIODictionary*)
>   8 ImageIO  248.30 KB 
> IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary*)
>   7 ImageIO  244.78 KB IIOImageSource::makeImagePlus(unsigned long, 
> IIODictionary*)
>   6 ImageIO  100.08 KB 
> IIO_Reader_AppleJPEG::initImageAtOffset(CGImagePlugin*, unsigned long, 
> unsigned long, unsigned long)
>   5 ImageIO   97.58 KB IIOReadPlugin::callInitialize()
>   4 ImageIO   93.64 KB AppleJPEGReadPlugin::initialize(IIODictionary*)
>   3 ImageIO   52.00 KB AppleJPEGReadPlugin::appleJPEGDecodeSetup()
>   2 AppleJPEG   52.00 KB applejpeg_decode_create
>   1 libsystem_malloc.dylib   52.00 KB malloc
>   0 libsystem_malloc.dylib   52.00 KB malloc_zone_malloc
> 
> (ArtSaverApp is, of course, my code.)
> Similar backtraces show up when I click on the various Malloc leaks in the 
> Leaks by Backtrace view.
> Almost all of them go through CGImageSourceCopyPropertiesAtIndex(), and the 
> responsible library is 
> ImageIO.
> 
> 
> Thanks a lot in advance for all kinds of insights and hints.
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Concurrent loading of images ?

2020-05-09 Thread Georg Seifert via Cocoa-dev
The last time I used layers to draw images it made a HUGE difference if the 
image was pixel perfect matching the size of the layer. If the image needed 
scaling, it was quite slow (I had really tiny images, but a lot of them).

g

> Am 9. May 2020 um 19:16 schrieb Steve Mills via Cocoa-dev 
> :
> 
>> On May 9, 2020, at 12:13, Gabriel Zachmann via Cocoa-dev 
>>  wrote:
>> 
>> Would that really make the background (worker) thread execute all that 
>> internal copying/decoding of images in the *background* thread?
>> 
>> I am asking because, currently, all this stuff gets executed in the main 
>> thread invoked by some observer.
>> And, after all, even a background thread eventually has to put the new image 
>> in the layer hierarchy, which, I fear, will cause the heavy lifting to be 
>> done by the main thread, again.
> 
> The point is, yes, the worker thread would be handling the image manipulation 
> to resize it to something that lets the main drawing thread work more 
> efficiently.
> 
> Steve via iPad
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Concurrent loading of images ?

2020-05-09 Thread Georg Seifert via Cocoa-dev
Have you profiled this? The first thing I would to is run that in Instruments.

Georg


> Am 9. May 2020 um 14:44 schrieb Gabriel Zachmann via Cocoa-dev 
> :
> 
> Again, thanks a lot for all the helpful hints.
> 
> Before restructuring my code, I did a few timings, using a set of test images 
> ranging in size from 30 through 300 MB.
> I used mach_absolute_time() for this experiment.
> And now, I am confused.
> 
> These are the execution times I have found for some of the methods that I 
> invoke in the process of loading and displaying the next image:
> 
> CGImageSourceCreateWithURL: 0.4-1.4 millisec
> CGImageSourceGetStatus: 10-600  microsec
> CGImageSourceCopyPropertiesAtIndex: 0.8-9   millisec 
> CGImageSourceCreateImageAtIndex:15  microsec
> convertToNSImage (*):   25  microsec
> imgLayer.contents = nsimage:1-5 microsec
> removeFromSuperlayer:   0.1 microsec
> addSublayer:5-10microsec
> 
> (*): this is a wrapper method of mine that does a few calls to 
> CIImage/NSImage/NSCIImageRep methods.
> 
> Overall, none of the methods I invoke seems to incur a long execution time.
> Yet, there is a noticeable lag when my app switches from one image to the 
> next one.
> I can tell because all layers have an animation assigned.
> Sometimes , there is even a stutter in the animation itself.
> 
> But it doesn't seem like it makes sense at this point to load images in a 
> concurrent/background dispatch queue, does it?
> 
> So, I am confused: where is the lag coming from?
> 
> Any ideas how I might be able to prevent the lag/stutter when loading and 
> switching to big images?
> 
> 
> Best, G.
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Check if there are autosaved documents

2020-04-27 Thread Georg Seifert via Cocoa-dev
perfect. Thanks a lot.

Georg

> Am 27.04.2020 um 12:26 schrieb Allan Odgaard via Cocoa-dev 
> :
> 
> On 27 Apr 2020, at 15:35, Georg Seifert via Cocoa-dev wrote:
> 
>> Is there a method/callback that is called when all loading is done 
>> (including the loading of documents).
> 
> Have a look at applicationOpenUntitledFile: 
> https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428491-applicationopenuntitledfile?language=objc
> 
> This is called during startup or clicking application icon in Dock when there 
> are no open windows, so it should not be called after restoring saved 
> documents.
> 
> It would be a suitable place to open your “welcome screen” with recent 
> documents (instead of creating a new untitled document).
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/georg.seifert%40gmx.de
> 
> This email sent to georg.seif...@gmx.de

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Check if there are autosaved documents

2020-04-27 Thread Georg Seifert via Cocoa-dev
Hi,

my app shows a welcome screen (that offers to open recent documents or to make 
a new). I like to not show it, when there are autosaved documents that open 
automatically. 

Now I open that window in applicationDidFinishLaunching: but that is called 
before the documents start to load. 

Is there a method/callback that is called when all loading is done (including 
the loading of documents). 

Or, is there a way to check if there are autosaved docs (before they are 
loaded)?

Thanks
Georg
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Catalina scroll view issues

2019-12-19 Thread Georg Seifert via Cocoa-dev
I read most of the discussion but maybe missed some parts so it might repeat 
something or miss the point altogether. 

How big is your view. I had a lot problems with a big view and layer backing. 
It will use tiled layers as a layer can only be a few thousand pixels tall. 
And when you do any checking for the dirty rect you will miss drawing in some 
of the tiles...

Georg


> Am 19.12.2019 um 16:10 schrieb Gary L. Wade via Cocoa-dev 
> :
> 
> Interesting.  This could be a layering issue then, and it could be due to a 
> configuration unique to your customer’s setup.  Since you’re doing things on 
> a lower level than expected, there may be some nuance you need to add or 
> something Apple needs to fix that may work fine using higher level 
> frameworks.  Since there’s lots of little things going on, it definitely 
> warrants a feedback report.  Please add its number to your reply when you 
> submit it.
> 
> FYI, Apple has been putting a lot of effort to support RTL better; in one of 
> this year’s early general presentations at WWDC, you might have seen an 
> engineer talking about RTL support within the App Store on all devices (well, 
> maybe not the HomePod, of course), and the labs definitely had staff there to 
> help.  Where you may find your implementation better than what you see in the 
> frameworks, please write as many feedback reports as needed so all developers 
> can benefit from the desired changes.
> --
> Gary L. Wade
> http://www.garywade.com/ 
> 
>> On Dec 19, 2019, at 6:09 AM, Redler Eyal  wrote:
>> 
 
 OK, I'll try to get the sysdiagnose from my users before submitting. I 
 must say I'm really skeptic regarding the relation with my use of CG. It 
 is not that CG is not used by CT and everything else is also using CG.
>>> 
>>> CG may not be the issue… and I cannot offer a better suggestion, but when I 
>>> rule out a possibility without proof, it usually turns out that I over look 
>>> the solution to the problem.  Good luck!
>> 
>> You're right, and I wasn't ruling it out. I actually sent my user a special 
>> build with an defaults option to turn off page drawing (so the page views 
>> are not doing any drawing CG or otherwise), the issue persists.
>> 
>> I also tried to see this issue while doing remote access using anyDesk, for 
>> some reason, the issue never showed up, when I disconnected, it showed up 
>> again.
>> 
>> Eyal
>> 
>> 
>> 
>>> Sandor
>>> 
 The way it looks it seems very much related to the scrolling mechanism, 
 the pre-rendered portion is not rendered but for some reason the scrolling 
 mechanism thinks that it is. I really don't see how a core-graphic issue, 
 and certainly not a misuse on my part could cause a view to be partially 
 rendered.
 BTW, do you think this type of issue is appropriate for a DTS incident?
 
> Here’s the developer release notes for Catalina:
> https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_release_notes
 
 Thanks. I saw that but I recall that in the past you used to have app-kit 
 specific release notes which were usually more detailed. 
 
> As an aside, it would be helpful to know why you chose CG for text 
> rendering. CT has gotten better with RTL and bidi text, but if you saw 
> particular issues there, reports about those can help everyone.
 
 When I started developing this app (2002), there was no choice other then 
 CG since core text didn't exist and the other technologies didn't support 
 Hebrew and RTL well, if at all. So I wrote my own text engine and this was 
 very good for me commercially as my app was the the first and only 
 word-processor to support Hebrew (and later Arabic) properly on Max OS X. 
 I had a similar experience with OpenType which was not initially supported 
 and that also gave me an edge. As time passed Apple did improve the RTL 
 support and was offering more APIs so theoretically I could have rewritten 
 my code to use the new APIs but in reality I actually did the opposite and 
 relied less on Apple's APIs (for example, parsing 'cmap' tables) because 
 there were always bugs and even regressions which could render my app 
 unusable upon an OS upgrade. Beyond the bugs, I think my RTL is better, or 
 at least as far as I'm concerned as a native Hebrew speaker and having 
 such low-level control over something that is core to my app is essential 
 IMO.
 
 Eyal Redler
 
 "If Uri Geller bends spoons with divine powers, then he's doing it the 
 hard way."
 --James Randi
 www.eyalredler.com
 
 
 
 
 
 
> Gary L. Wade
> http://www.garywade.com/
> 
>>> On Dec 17, 2019, at 2:12 AM, Redler Eyal  wrote:
>> 
>> I am drawing using core