|
Adding scripting support for custom records
What's the best way to return data from a scriptable app when the property is a record-type that's declared in the sdef? It corresponds to an Objective-C class. I ended up adding a separate property
What's the best way to return data from a scriptable app when the property is a record-type that's declared in the sdef? It corresponds to an Objective-C class. I ended up adding a separate property
|
By
Steve Mills
·
#927
·
|
|
Re: Selectable text in NSTableView?
That’s the behavior I was getting the last time I worked on this app, a few months ago, but it’s somehow stopped working and I can’t get it to work again. Specifically, what used to work was
1.
That’s the behavior I was getting the last time I worked on this app, a few months ago, but it’s somehow stopped working and I can’t get it to work again. Specifically, what used to work was
1.
|
By
Jens Alfke
·
#926
·
|
|
Re: Selectable text in NSTableView?
I think that reply was meant for a different thread?
—Jens
I think that reply was meant for a different thread?
—Jens
|
By
Jens Alfke
·
#925
·
|
|
Re: Selectable text in NSTableView?
Well, some further testing revealed that this was a way to make it work. It had the side benefit of making the window update more efficiently! Still, it would be nice to know why it was crashing in
Well, some further testing revealed that this was a way to make it work. It had the side benefit of making the window update more efficiently! Still, it would be nice to know why it was crashing in
|
By
John Brownie
·
#924
·
|
|
Re: Crash in dragImageForSelection
Further experimentation reveals that the problem is (as far as I can tell) due to the code that handles a click updating the window. I seem to get a race condition: if I click, hold and drag, the drag
Further experimentation reveals that the problem is (as far as I can tell) due to the code that handles a click updating the window. I seem to get a race condition: if I click, hold and drag, the drag
|
By
John Brownie
·
#923
·
|
|
Re: Selectable text in NSTableView?
In a similar recent scenario, I found it takes two clicks when the text field is selectable but not editable. (Well, one click and one drag, if you’re actually trying to select text.)
What makes
In a similar recent scenario, I found it takes two clicks when the text field is selectable but not editable. (Well, one click and one drag, if you’re actually trying to select text.)
What makes
|
By
Quincey Morris
·
#922
·
|
|
Re: Selectable text in NSTableView?
Wild guess, but what about the “can” methods.
In the headers is there any hidden secret docs hat might help?
Wild guess, but what about the “can” methods.
In the headers is there any hidden secret docs hat might help?
|
By
Alex Zavatone
·
#921
·
|
|
Selectable text in NSTableView?
I’ve got a view-based NSTableView that uses NSTextFields. I’d like to be able to select text in some of the columns, mostly so it can be copied to the pasteboard.
If I set the “selectable”
I’ve got a view-based NSTableView that uses NSTextFields. I’d like to be able to select text in some of the columns, mostly so it can be copied to the pasteboard.
If I set the “selectable”
|
By
Jens Alfke
·
#920
·
|
|
Re: Crash in dragImageForSelection
Gary L. Wade wrote on 27/4/19 02:07:
Doesn't seem to help.
Yes, it's a result of various ways of setting the range correctly. I've fixed it so it looks nicer.
Yes, the range is correct after calling
Gary L. Wade wrote on 27/4/19 02:07:
Doesn't seem to help.
Yes, it's a result of various ways of setting the range correctly. I've fixed it so it looks nicer.
Yes, the range is correct after calling
|
By
John Brownie
·
#919
·
|
|
Re: Crash in dragImageForSelection
The bug in documentation has been reported.
Try forcing layout on the text view after setting the selection; there might be some kind of delay from setting it till it’s renderable, and that might
The bug in documentation has been reported.
Try forcing layout on the text view after setting the selection; there might be some kind of delay from setting it till it’s renderable, and that might
|
By
Gary L. Wade
·
#918
·
|
|
Re: Crash in dragImageForSelection
I don't have any useful help for you, but a couple of things struck me as odd about this.
First of all, you're treating textView as an optional sometimes, and force-unwrapping it elsewhere. Prefacing
I don't have any useful help for you, but a couple of things struck me as odd about this.
First of all, you're treating textView as an optional sometimes, and force-unwrapping it elsewhere. Prefacing
|
By
Ben Kennedy
·
#917
·
|
|
Crash in dragImageForSelection
I have what seems to be a simple operation to perform, but it crashes. I have a custom view which includes an NSTextView called textView. In the mouseDragged(with:) function in my view subclass, I
I have what seems to be a simple operation to perform, but it crashes. I have a custom view which includes an NSTextView called textView. In the mouseDragged(with:) function in my view subclass, I
|
By
John Brownie
·
#916
·
|
|
Re: macOS Drag and Drop onto App Icon
I thought this was answered earlier. Implement this in your app delegate
// MARK: Open File (UTI support)
/// process files give to us via "Open With..."
///
/// - parameter sender:
I thought this was answered earlier. Implement this in your app delegate
// MARK: Open File (UTI support)
/// process files give to us via "Open With..."
///
/// - parameter sender:
|
By
Marco S Hyman
·
#915
·
|
|
Re: Strange Memory Patterns
Jonathan,
Thanks for the solution of sending events to perturb the main runloop. With a little googling, I adapted your solution as follows…
Cheers!
double delayInSeconds =
Jonathan,
Thanks for the solution of sending events to perturb the main runloop. With a little googling, I adapted your solution as follows…
Cheers!
double delayInSeconds =
|
By
Sandor Szatmari
·
#914
·
|
|
Re: Strange Memory Patterns
> Do you suspect that throwing them on their own queue that you made would be an easy way to solve that?
In terms of my own issue, the work items I'm dealing with are GUI-related so their natural home
> Do you suspect that throwing them on their own queue that you made would be an easy way to solve that?
In terms of my own issue, the work items I'm dealing with are GUI-related so their natural home
|
By
Jonathan Taylor
·
#913
·
|
|
Re: Strange Memory Patterns
Nice observation, Jonathan. Do you suspect that throwing them on their own queue that you made would be an easy way to solve that?
I’d try it out myself, but am not in the best location to do that
Nice observation, Jonathan. Do you suspect that throwing them on their own queue that you made would be an easy way to solve that?
I’d try it out myself, but am not in the best location to do that
|
By
Alex Zavatone
·
#912
·
|
|
Re: Strange Memory Patterns
This sounds very similar to problems I have encountered myself.
Issue 1: GCD callbacks are part of an autorelease pool, but you can't rely on it getting drained in a reliable manner, so wrap your
This sounds very similar to problems I have encountered myself.
Issue 1: GCD callbacks are part of an autorelease pool, but you can't rely on it getting drained in a reliable manner, so wrap your
|
By
Jonathan Taylor
·
#911
·
|
|
Re: Strange Memory Patterns
It is a standard GUI MacOS app. No special options. It runs in user space like any other user focused Mac app. To be clear, when I say background, I mean it’s menubar is not the menubar being
It is a standard GUI MacOS app. No special options. It runs in user space like any other user focused Mac app. To be clear, when I say background, I mean it’s menubar is not the menubar being
|
By
Sandor Szatmari
·
#910
·
|
|
Re: Strange Memory Patterns
What background options have you enabled in the app? I admit that I am unfamiliar with Mac policy on background apps and only ask with iOS background.
What background options have you enabled in the app? I admit that I am unfamiliar with Mac policy on background apps and only ask with iOS background.
|
By
Alex Zavatone
·
#909
·
|
|
Strange Memory Patterns
We have an app that handles incoming server connections. For each connection it opens a window that shows the activity of the connection. When the client is done the window closes. When the
We have an app that handles incoming server connections. For each connection it opens a window that shows the activity of the connection. When the client is done the window closes. When the
|
By
Sandor Szatmari
·
#908
·
|