|
horizontally scrolling table
I have a view-based NSOutlineTable with a single column containing static text. How do I make the column resize appropriately so that the table will scroll horizontally, rather than
I have a view-based NSOutlineTable with a single column containing static text. How do I make the column resize appropriately so that the table will scroll horizontally, rather than
|
By
James Walker
·
#534
·
|
|
Re: Changing head item on a (GCD) Queue
Hi,
I get it now, in this case the predicate is actually the (protected) Array, I’ve changed it yet again it just process one item at time. I’ll test it tomorrow and then add higher level code to
Hi,
I get it now, in this case the predicate is actually the (protected) Array, I’ve changed it yet again it just process one item at time. I’ll test it tomorrow and then add higher level code to
|
By
Dave
·
#533
·
|
|
Re: Changing head item on a (GCD) Queue
Hi Jonathan,
I missed NSCondition, thanks a lot. One thing I’m not sure about is the “boolean predicate”, from looking at the documentation, I can’t see that it is needed in this case unless
Hi Jonathan,
I missed NSCondition, thanks a lot. One thing I’m not sure about is the “boolean predicate”, from looking at the documentation, I can’t see that it is needed in this case unless
|
By
Dave
·
#532
·
|
|
Re: Changing head item on a (GCD) Queue
I came up with the following (untested). Any ideas on how replace the sleepForTimeInterval calls with a proper signal mechanism greatly appreciated.
All the Best
Dave
// The LTWQueue class ensures
I came up with the following (untested). Any ideas on how replace the sleepForTimeInterval calls with a proper signal mechanism greatly appreciated.
All the Best
Dave
// The LTWQueue class ensures
|
By
Dave
·
#531
·
|
|
Re: Changing head item on a (GCD) Queue
Look at NSCondition, which works with NSThread. I’m assuming you are re-implementing GetQueueHeadAndWait, and CheckData along with the queue that they operate on. The queue would consist of an
Look at NSCondition, which works with NSThread. I’m assuming you are re-implementing GetQueueHeadAndWait, and CheckData along with the queue that they operate on. The queue would consist of an
|
By
Jonathan Prescott
·
#530
·
|
|
Re: Changing head item on a (GCD) Queue
Hi,
I’m looking at the NSThread level and I can’t see anything that allows a thread to sleep until an event occurs (other than sleepUntilDate
and sleepForTimeInterval) or signal a thread for
Hi,
I’m looking at the NSThread level and I can’t see anything that allows a thread to sleep until an event occurs (other than sleepUntilDate
and sleepForTimeInterval) or signal a thread for
|
By
Dave
·
#529
·
|
|
Re: string pointer
The difference is in the amount of resources available to each of us. If you were to take into account he reliability of my software given the amount of resources I have available then I’d score
The difference is in the amount of resources available to each of us. If you were to take into account he reliability of my software given the amount of resources I have available then I’d score
|
By
Dave
·
#528
·
|
|
Re: Changing head item on a (GCD) Queue
Can you have a queue manager class observe the count of items in the array and wake itself up when that increments? Then it would stay awake until the queue is empty.
Something like...
NSMutableArray
Can you have a queue manager class observe the count of items in the array and wake itself up when that increments? Then it would stay awake until the queue is empty.
Something like...
NSMutableArray
|
By
Sandor Szatmari
·
#527
·
|
|
Re: Changing head item on a (GCD) Queue
Thanks Jens and Quincey, I think the best solution is to do what Jens suggested which is to have a custom thread type arrangement and share an Array as the Queue and protect it with a Lock/Mutex. The
Thanks Jens and Quincey, I think the best solution is to do what Jens suggested which is to have a custom thread type arrangement and share an Array as the Queue and protect it with a Lock/Mutex. The
|
By
Dave
·
#526
·
|
|
Re: Changing head item on a (GCD) Queue
You’re right, I misremembered. GCD has a DispatchWorkItem “cancel” method, which doesn’t have any proper documentation but I think dequeues the item (since GCD doesn’t have an actual
You’re right, I misremembered. GCD has a DispatchWorkItem “cancel” method, which doesn’t have any proper documentation but I think dequeues the item (since GCD doesn’t have an actual
|
By
Quincey Morris
·
#525
·
|
|
Re: Changing head item on a (GCD) Queue
Honestly I would just implement this in a fairly cross-platform way, by creating my own queue in an NSMutableArray. I'd have a thread reading items out of the queue and processing them, and the method
Honestly I would just implement this in a fairly cross-platform way, by creating my own queue in an NSMutableArray. I'd have a thread reading items out of the queue and processing them, and the method
|
By
Jens Alfke
·
#524
·
|
|
Re: string pointer
Without having used any apps you've written, I can't compare. And 'out' parameters are widely used in Cocoa programming, not just by Apple.
I honestly don't see anything dangerous about the code in
Without having used any apps you've written, I can't compare. And 'out' parameters are widely used in Cocoa programming, not just by Apple.
I honestly don't see anything dangerous about the code in
|
By
Jens Alfke
·
#523
·
|
|
Re: Changing head item on a (GCD) Queue
A little more on this.
I was thinking that in the example in my last email could (maybe) be handled like this:
The NSOperation class defines a method called something like “setNewData:(NSInteger)
A little more on this.
I was thinking that in the example in my last email could (maybe) be handled like this:
The NSOperation class defines a method called something like “setNewData:(NSInteger)
|
By
Dave
·
#522
·
|
|
Re: Changing head item on a (GCD) Queue
Hi Quincey,
I thought about using an NSOperationQueue but from what I can tell, when an operation is cancelled it stays on the queue until the NSOperation method gets called which check the
Hi Quincey,
I thought about using an NSOperationQueue but from what I can tell, when an operation is cancelled it stays on the queue until the NSOperation method gets called which check the
|
By
Dave
·
#521
·
|
|
Re: string pointer
Just because you see it in “Apple Code” doesn’t mean its the best or safest way of doing something. Just look at the quality of code coming out of Apple these days, its awful, in fact just look
Just because you see it in “Apple Code” doesn’t mean its the best or safest way of doing something. Just look at the quality of code coming out of Apple these days, its awful, in fact just look
|
By
Dave
·
#520
·
|
|
Re: Changing head item on a (GCD) Queue
Not necessarily. Both NSOperationQueue and GCD can cancel un-started operations, but NSOperationQueue has a mechanism for cancelling running operations too. Overall, you probably get more control over
Not necessarily. Both NSOperationQueue and GCD can cancel un-started operations, but NSOperationQueue has a mechanism for cancelling running operations too. Overall, you probably get more control over
|
By
Quincey Morris
·
#519
·
|
|
Changing head item on a (GCD) Queue
Hi All,
I need to do some changes to a Mac Objective-C project to do the following:
1. Data is Sent to a Delegate method in a class.
2. The data is validated by this method and if ok, it needs to
Hi All,
I need to do some changes to a Mac Objective-C project to do the following:
1. Data is Sent to a Delegate method in a class.
2. The data is validated by this method and if ok, it needs to
|
By
Dave
·
#518
·
|
|
Re: Getting IB_DESIGNABLE to work properly
Of course, but they’re not drawn by -drawRect:, they’re drawn by an internal private method that calls -drawRect: Normally, drawRect is concerned only with the drawing pertaining to itself and
Of course, but they’re not drawn by -drawRect:, they’re drawn by an internal private method that calls -drawRect: Normally, drawRect is concerned only with the drawing pertaining to itself and
|
By
Graham Cox
·
#517
·
|
|
Re: Getting IB_DESIGNABLE to work properly
You do want your subviews drawn, right?
--
Gary L. Wade
http://www.garywade.com/
You do want your subviews drawn, right?
--
Gary L. Wade
http://www.garywade.com/
|
By
Gary L. Wade
·
#516
·
|
|
Re: Getting IB_DESIGNABLE to work properly
I’ve gone for something slightly different that’s a little more generic (it’ll work for any view, not relying on it being a specific class). It still wouldn’t work for a layer backed or
I’ve gone for something slightly different that’s a little more generic (it’ll work for any view, not relying on it being a specific class). It still wouldn’t work for a layer backed or
|
By
Graham Cox
·
#515
·
|