Re: Concurrent loading of images?

2020-05-08 Thread João Varela via Cocoa-dev
> I also read about the GCD's dispatch queues, but it seems to me that this would not be the suitable approach since I always only have one task running concurrently to the main thread. > > Why not? Dispatch queues are always available. (The main thread is simply > a special queue.) You can run th

Re: Customizing the Notarization Workflow fails

2020-05-03 Thread João Varela via Cocoa-dev
> On 3 May 2020, at 21:31, Gabriel Zachmann wrote: > > Thanks a million to everybody for responding to my question! > > > I have been following Joao's instructions at > > > https://stackoverflow.com/questions/53101626/how-to-notarize-an-app-bundle-containing-helpers-embedded-in-it/5679959

Re: Customizing the Notarization Workflow fails

2020-04-26 Thread João Varela via Cocoa-dev
Hi, Gabriel As far as I know, if it is not a standard application package, you cannot use the organizer to archive properly a package and then send it to the notarizing server. I struggled with it for a long time, more than a year, until Apple gave us the proper documentation in WWDC 2019 for u

Re: Adding helper target to macOS app?

2020-04-05 Thread João Varela via Cocoa-dev
few extra steps right now, but if things are working, I’m not going to change them. HTH João > On 4 Apr 2020, at 20:26, Jean-Daniel wrote: > > > >> Le 3 avr. 2020 à 15:44, João Varela via Cocoa-dev >> a écrit : >> >> Hello, Laurent >> >>

Re: Adding helper target to macOS app?

2020-04-03 Thread João Varela via Cocoa-dev
Hello, Laurent As far as I know, the documentation is still valid. I would start reading this: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/1172i-SW4-BBCBHBFB

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread João Varela
Hi Sean Yes, I was bitten by that too, very, very recently, when I was translating a few files into Swift and I got warning when I didn’t use an optional for the object of the method. Actually, I suspect that’s a bug in the headers, or probably that’s a non-audited header for nullability. Alt

Re: Drag and drop on table view

2016-12-02 Thread João Varela
> > I am still not sure if I am doing this the right way (extending NSTableView) > because Xcode says "Subclassing NSTableView is usually not necessary”. > > Jan E. Yes, it is usually not necessary and I would go so far as saying that you shouldn’t. I normally create a new delegate class and

Re: Date Formatter relative date formatting

2016-10-28 Thread João Varela
As a native Portuguese speaker, I can tell you that it is NOT normal to capitalize “Hoje” at the end or in the middle of a sentence. The same is true for “today" in English. Thus, I think these variations of capitalisation are bugs. A similar bug was true when the days of the week were not capit

Bugs in HIThemeDrawWindowFrame and HIThemeDrawTitleBarWidget in Sierra?

2016-09-24 Thread João Varela
Does anyone has had experience in drawing custom windows with the help of HIThemeDrawWindowFrame and HIThemeDrawTitleBarWidget? I know Jens has had some, as I checked the archives of the list before I posted this. I have managed to draw a custom window with a vertical title bar and the traffic

Re: NSScrollView and NSTrackingArea woes [SOLVED]

2015-07-19 Thread João Varela
First of all I would like to thank everybody that tried ho give me a hand. I really do appreciate it. I also want to write this email to let people know how I solved the problem, so that the readers of this list do not have to go through a week of frustration as I have. Well, it took so long bec

Re: NSScrollView and NSTrackingArea woes

2015-07-16 Thread João Varela
On Friday, July 17, 2015, Ken Thomases wrote: > On Jul 16, 2015, at 8:19 PM, João Varela > wrote: > > > > I’m passing [self bounds]. And no, I am not using NSTrackingInVisibleRect > > Why aren't you using that? That seems like the most obvious way to get > co

Re: NSScrollView and NSTrackingArea woes

2015-07-16 Thread João Varela
> On 15 Jul 2015, at 18:28, Quincey Morris > wrote: > > On Jul 15, 2015, at 03:08 , João Varela <mailto:joaocvar...@gmail.com>> wrote: >> >> However, none of this happens when the user only scrolls (up or down) a >> little and does not reach the top

Re: NSScrollView and NSTrackingArea woes

2015-07-16 Thread João Varela
> On 15 Jul 2015, at 11:44, Muthulingam Ammaiappan > wrote: > > Hi J.Varela, > > > i too faced the same problem... and i found that "inertial scrolling" has > the reason for this misbehaviour. > so "disable the inertia scrolling" will solve this problem. > > just add the following line to

NSScrollView and NSTrackingArea woes

2015-07-15 Thread João Varela
Hi, I am implementing two custom classes, one of them is the document view inside an NSScrollView and the other is a subview of the document view. I need to create two NSTrackingArea’s to display the appropriate cursor when the mouse hovers over specific areas of the subviews. As instructed by

Re: Who is launching my helper?

2015-01-21 Thread João Varela
I’m just guessing here but most probably your helper is being relaunched automatically by the OS itself by receiving a reopen command, because it was running before the user logged out. I think you need to either prevent that or handle that possibility in your code. I had a similar problem that

Re: licence key validation method

2015-01-12 Thread João Varela
Hi I rolled out my own license scheme so that I don’t have to pay anyone. ;) I find that coding license checking methods with Cocoa and Objective-C is terribly unsafe. Objective-C has the nasty habit of exposing classes and their methods, which you can easily access/find out if you know what yo

Re: View-based outline view problem

2014-07-11 Thread João Varela
> >On 11 Jul 2014, at 7:44 am, João Varela wrote: > >>Ithas been officially declared by Apple that cell-based NSOutlineView¹s >>and >>NSTableView's are deprecated. > >Would you care to point to where? I'm not arguing, but you wouldn't think >so

Re: Cocoa-dev Digest, Vol 11, Issue 374

2014-07-10 Thread João Varela
ewest technologies sooner rather than later. If you don¹t now you may be out of luck in the future. For what I could see it is not very complicated. Actually, some of things become simpler. HTH João Varela >On 10 Jul 2014, at 5:25 pm, Shane Stanley >wrote: > >>I'm trying to convert a c

Re: 32bit vs 64bit and QuickTime/AVFoundation

2013-09-10 Thread João Varela
I second what Mark said. I did exactly as he suggested. To move to 64-bit I isolated all QuickTime dependent code in a 32-bit only helper. The main app, the other helpers and a private framework are now fat binaries and I migrated all the media code to AVFoundation and related APIs. The 32-bit only

Re: Custom NSView / NSToolbar drawing woes [SOLVED]

2012-11-30 Thread João Varela
check out >NSUserInterfaceValidation. > >Your -drawRect: does not need to account for the toolbar (but it also >should take some care not to mess up the graphics environment, though >that is hard to do - I doubt that's the problem) >

Custom NSView / NSToolbar drawing woes

2012-11-29 Thread João Varela
I would really appreciate if someone could help me with this mixed bag of problems I'm having while drawing a custom NSView: I have a textured window on which I display either an NSOutlineView or this custom view (both are subviews of the window's content view). This window has a toolbar with seve

Re: Formatting elapsed time

2012-09-08 Thread João Varela
> > > >I'm getting stuck trying to format a variable quantity of elapsed time >for the user's locale. The NSDateFormatter class seems to only provide >formats for actual times (e.g. "1:30 AM"). What I need to do is turn 1 >hour and 30 minutes into "1:30" for my US English settings, and the >appropr

Adding login items - who's right? The headers or the guide?

2012-07-29 Thread João Varela
Hello All I would like to support the new way of adding login items by adopting the Services Management framework. As I I would like to support Snow Leopard I was quite pleased when I read that SMLoginItemSetEnabled function was available on OS X 10.6.6 and later. You can check it here: http://de

How to force a message to a overriding method from within an init method

2009-02-11 Thread João Varela
Hi all I am porting most of my C++ code into Objective C and at the moment I have this problem: In C++ to force a constructor to call a overriding method of a subclass I used pure virtual functions defined in an abstract (super) class. An example: class Foo { Foo(); vir

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
No, isKindOfClass check for the superclass. It returns true if self class is myClass or a subclass of myClass. You should use isMemberOfClass: to got something equivalent. Yes, you are right. Thanks for pointing it out. because in the first example we are calling -class: in [self class

Re: Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
On 2009/01/25, at 18:02, João Varela wrote: So you mean that if ( self == [aReceiver class] ) is the same as if ( [self class] == [aReceiver class] ) ? Yes it is. Just a simple snippet to try to help you to understand. We are ok to say that in a method, self represents the receiver

Class introspection [was Re: Forcing allocation of a subclass]

2009-01-25 Thread João Varela
So you mean that if ( self == [aReceiver class] ) is the same as if ( [self class] == [aReceiver class] ) ? Yes it is. Just a simple snippet to try to help you to understand. We are ok to say that in a method, self represents the receiver. Now have a look at this call: [PDFDocument al

Re: Forcing allocation of a subclass

2009-01-25 Thread João Varela
( [self class] == [aReceiver class] ) ? If it is, sorry for the noise, but I would find it weird that a pointer to a class instance also had the same end result as invoking the NSObject method 'class'. Is it? JV On 2009/01/25, at 14:07, Jean-Daniel Dupas wrote: Le 25 janv. 09

Re: Forcing allocation of a subclass

2009-01-25 Thread João Varela
Olá António I think your method must be corrected like this: On 2009/01/25, at 07:28, cocoa-dev-requ...@lists.apple.com wrote: @implementation PDFDocument (PDFDocument_Alloc) + (id)replacementAllocWithZone:(NSZone *)zone { if ([self class] == [PDFDocument class]) { re

Re: Cocoa-dev Digest, Vol 6, Issue 9

2009-01-06 Thread João Varela
On 2009/01/06, at 11:21, cocoa-dev-requ...@lists.apple.com wrote: Date: Tue, 06 Jan 2009 12:36:24 +0530 From: Mahaboob Subject: Scheduling an application To: "cocoa-dev@lists.apple.com" Message-ID: Content-Type: text/plain; charset="US-ASCII" I need to implement Scheduling In my appli