On Aug 16, 2014, at 1:10 AM, Kyle Sluder wrote:
> On Aug 15, 2014, at 8:44 PM, Ben Kennedy wrote:
>>
>>> On 15 Aug 2014, at 8:17 pm, Graham Cox wrote:
>>>
>>> What I really want is that part of my view hierarchy to be free to use
>>> -setFrame:, but other parts use the autolayout constraints
import Cocoa
let s = "hallo\there"
let aas = NSMutableAttributedString( string: s, attributes: nil )
let rangeOfTab = s.rangeOfString( "\t" )
if rangeOfTab != nil
{
let colour = NSColor.grayColor()
let locationOfTab = rangeOfTab!.startIndex
let aRan
You can’t.
let s : NSString = "hallo\there"
let aas = NSMutableAttributedString( string: s, attributes: nil
)
let rangeOfTab = s.rangeOfString( "\t" )
if rangeOfTab.location != NSNotFound
{
Try:
import Cocoa
let s = "hallo\there"
let aas = NSMutableAttributedString(string: s, attributes: nil)
if let rangeOfTab = s.rangeOfString( "\t" ) {
let colour = NSColor.grayColor()
let length = distance(s.startIndex, rangeOfTab.startIndex)
let aRange = NSRange(location: 0, length:
On 16 Aug 2014, at 16:25, Stephen J. Butler wrote:
> Try:
>
> import Cocoa
>
> let s = "hallo\there"
> let aas = NSMutableAttributedString(string: s, attributes: nil)
>
> if let rangeOfTab = s.rangeOfString( "\t" ) {
> let colour = NSColor.grayColor()
> let length = distance(s.startIn
On 16 Aug 2014, at 16:04, Roland King wrote:
> You can’t.
>
> let s : NSString = "hallo\there"
> let aas = NSMutableAttributedString( string: s, attributes: nil
> )
>
> let rangeOfTab = s.rangeOfString( "\t" )
> if rangeOfTab.location
Dear All,
I have a goods management cocoa application which needs to generate pdf
documents. It isn’t a document-based app, it doesn’t use core data and the data
that should be printed are not laid out in any of the views displayed to the
user.
In short, I would need to generate a pdf document
On 16 Aug 2014, at 16:25, Stephen J. Butler wrote:
> Try:
>
> import Cocoa
>
> let s = "hallo\there"
> let aas = NSMutableAttributedString(string: s, attributes: nil)
>
> if let rangeOfTab = s.rangeOfString( "\t" ) {
> let colour = NSColor.grayColor()
> let length = distance(s.startIn
How to translate into Swift:
- (void)myFunctionWithClass: (Class)someClass
{
for(...)
{
p = ...
if ( p is not special ) continue;
id aClass = [[ someClass alloc] initWithParameter:
p ];
... do something with aClass
> Well...
>
> First: I think Swift is going to be the future, so I might as well start
> learning it now.
I thought that too, then dropped back a bit until the full spec for 1.0 is
there at least so the moving target doesn’t move as fast. It’s the future
absolutely, think it’s got a couple of
On 16 Aug 2014, at 11:18, Jean Suisse wrote:
> Dear All,
>
> I have a goods management cocoa application which needs to generate pdf
> documents. It isn’t a document-based app, it doesn’t use core data and the
> data that should be printed are not laid out in any of the views displayed to
>
a cocoa solution may yet be forthcoming, but—if you enjoy pdf, qua pdf, i
should investigate CGPDFContextCreate.
regards,
edaward
On Aug 16, 2014, at 6:18 AM, Jean Suisse wrote:
> Dear All,
>
> I have a goods management cocoa application which needs to generate pdf
> documents. It isn’t a d
On Aug 10, 2014, at 4:54 PM, Bill Cheeseman wrote:
> My application has a source list using a view-based NSOutlineView. My code
> does nothing to dictate the initial or subsequent appearance of the group
> rows other than to implement the -outlineView:isGroupRow: delegate method to
> identify
Thank you Jonathan Mitchell, Edward Taffel, and Joel Norvell for your replies.
I asked the question before catching a train, hoping to have some thoughts to
read when arriving home. However, during the 3.5 hour-long journey, I had some
time to think about it and found a simple solution: I reali
On Aug 16, 2014, at 6:32 AM, Gerriet M. Denkmann wrote:
> How to translate into Swift:
>
> - (void)myFunctionWithClass: (Class)someClass
> {
> for(...)
> {
> p = ...
> if ( p is not special ) continue;
>
> id aClass = [[ someClass alloc] in
I'm still learning Swift, but extrapolating from what I might do in Python
or Ruby...
protocol MyProtocol { ... }
func myFunction(generator: (MyParameterType) -> MyProtocol) {
for ... {
let p : MyParameterType = ...
if not p special { continue }
let obj = generator(p)
...
}
}
On Aug 16, 2014, at 13:53 , Charles Srstka wrote:
> You can't.
Er, am I missing something, or is this not a case that generic functions handle
quite easily?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
On Aug 16, 2014, at 2:13 PM, Quincey Morris
wrote:
> Er, am I missing something, or is this not a case that generic functions
> handle quite easily?
That's what I thought, too.
protocol MyProtocol {
init()
// ...
}
func myFunction() {
// for(...) {
// p = ...
//
When editing in a NSTextField and return is pressed, it fires the text field's
action and also sends performKeyEquivalent: to the window, which clicks the
default button. Usually that's just fine, but in the case where a view-based
table view has editable NSTextFields in it, this makes no sens
On Aug 16, 2014, at 7:53 PM, Seth Willits wrote:
> This is leaving me little choice but to do something very specialized and
> ugly.
Well… the simplest solution is to just disable the key equivalent myself
instead of using NSWindow's methods. I don't like it, but it does work in my
case...
On Aug 16, 2014, at 9:53 PM, Seth Willits wrote:
> When editing in a NSTextField and return is pressed, it fires the text
> field's action and also sends performKeyEquivalent: to the window, which
> clicks the default button. Usually that's just fine, but in the case where a
> view-based table
21 matches
Mail list logo