In objective-c programs, there are places where one can write lines like the
following:
[scrollview setBorderType:NSNoBorder];
with NSNoBoarder being specified in an enum in NSView. But enums in swift are
a different sort of beast, and I’ve not yet figured out what get the same job
done.
Is
, 2015, at 11:43 AM, Boyd Collier <bcoll...@mail.sdsu.edu> wrote:
>>
>> In objective-c programs, there are places where one can write lines like the
>> following:
>>
>> [scrollview setBorderType:NSNoBorder];
>>
>> with NSNoBoarder being specified
t;
> On Sep 18, 2015, at 16:40 , Boyd Collier <bcoll...@mail.sdsu.edu
> <mailto:bcoll...@mail.sdsu.edu>> wrote:
>>
>> Any suggestions why this might be happening would be greatly appreciated.
>
> You should approach this systematically.
>
> 1. Is your
I have a simple OS X project ( in swift 2.0 and Xcode 7.0) and that is
supposed to open a .txt file and display the file’s contents in a document
window. For the most part, it works correctly, except that
windowControllerDidLoadNib is called twice each time I chose OpenFile from the
file
, which is what I’m using, might not work; I’ll give
swift 2 a try.
Boyd
On Aug 27, 2015, at 5:47 PM, Jens Alfke j...@mooseyard.com wrote:
On Aug 27, 2015, at 5:32 PM, Boyd Collier bcoll...@mail.sdsu.edu wrote:
I’ve tried
let theTabStop: NSTextTab = NSTextTab(NSLeftTabStopType, loc
I’m in the process of re-writing some obj-c code in swift for OS X and am
stumped on how to set tab stops. The relevant obj-c code looks like this:
[paraStyle setTabStops:[NSArray array]];
for (cnt = 1; cnt = numStops; cnt++) {
tabStop = [[NSTextTab
I think I understand what the problem is and the fix, but what does the
following the opening quote signify?
Boyd
On Aug 28, 2013, at 1:30 PM, Tom Davie tom.da...@gmail.com wrote:
On 28 Aug 2013, at 22:26, Dave d...@looktowindward.com wrote:
Hi,
I am getting the following warning
= [subString intValue];
range.location += digitsPerAllele;
}
}
Begin forwarded message:
From: Boyd Collier bcolli...@cox.net
Subject: Re: reverse scanner
Date: August 12, 2013 1:00:56 PM PDT
To: Cocoa Dev List cocoa-dev@lists.apple.com
I've come up with a couple
= remainder;
range.length = digitsPerAllele;
for (i = 0; i alleles; i++ ) {
subString = [testString substringWithRange:range];
theInt = [subString intValue];
range.location += digitsPerAllele;
}
On Aug 10, 2013, at 10:07 AM, Boyd Collier bcolli...@cox.net wrote
I'm dealing with a situation in which I have to scan strings that are separated
by tabs, and for each string, I have to extract two numerical values, with
these values being separated by a non-numerical character or not being
separated by any character at all. I know the maximum number of
Your suggestion sounded worth learning about, but it appears that there's no
such creature as NSPointerValue. Did you perhaps mean NSPointerArray?
On Jul 8, 2013, at 9:04 AM, Jens Alfke wrote:
On Jul 7, 2013, at 1:37 PM, Frederick Bartram bartr...@acm.org wrote:
Have you tried using
Quite by chance, I stumbled on to what seems to be an error that ought to be
caught by the compiler but wasn't. Here's an example:
NSNumber *testNumber = [NSNumber numberWithInt:5];
int testInt = (int)testNumber;
However, the value of testInt when running the above is wildly
original query.
Boyd
On May 25, 2013, at 10:25 AM, Boyd Collier wrote:
I've been trying to track down a bug that crashes a document-based cocoa
application which seems to be caused by referring to an object that no longer
exists, but thus far haven't succeeded in determining what that object
I've been trying to track down a bug that crashes a document-based cocoa
application which seems to be caused by referring to an object that no longer
exists, but thus far haven't succeeded in determining what that object is.
Yes, I've tried using the Zombies tool in Instruments but to no
I have an array of NSStrings that in some circumstances, I'd like to go
through using fast enumeration starting with the second element in the array.
After a bit of fooling around, I came up with the following, which seems to
work:
NSEnumerator *myEnumerator = [arrayOfLabels
Excellent! Thanks very much for pointing this out.
Boyd
On Apr 27, 2013, at 11:21 AM, Jens Alfke wrote:
On Apr 27, 2013, at 11:11 AM, Boyd Collier bcolli...@cox.net wrote:
NSEnumerator *myEnumerator = [arrayOfLabels objectEnumerator];
NSString *aString = [myEnumerator
Quincey,
I just got around to reading this thread and wanted to complement you on the
clarity of your explanation.
Boyd
On Mar 22, 2013, at 3:27 PM, Quincey Morris wrote:
(sorry, this turned into a tome)
The way properties are compiled has changed over time. Assuming you're using
the
I'm just getting started with python, so I'm certainly not qualified to comment
on this specific problem. However, perhaps the following page may be useful to
others getting started with python:
http://wolfpaulus.com/journal/mac/installing_python_osx
The site gives detailed instructions on
, reopened it in IB, and now the
three checkboxes are the same color.
If you don't have BBEdit I assume you can do the same with TextWrangler.
--Andy
On Feb 4, 2013, at 8:55 AM, Boyd Collier bcolli...@cox.net wrote:
Glad to. Here's a screen shot. The problem button is Permute Genes
Hi All,
I have a nib with a Matrix of one column and 3 rows; in this there are 3
buttons cells of type Switch and Style Check. All are enabled. Recently I
noticed that the square of the middle button is slightly darker that the other
2. Using Interface Builder's inspectors, I've tried
It's been nearly a week since I've received anything from either cocoa list or
Xcode list, and when I try to access http://lists.apple.com/, I get a proxy
error saying
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Recently, a rather ordinary document-based application that I've been working
on started misbehaving in the following way: If I create a new document, put
some text into it, save it, and then try to open it again, I get a
EXEC_BAD_ACCESS error. I spent a lot of time trying to find the bug
I just tried going through the sequence of steps that you described and also
couldn't quit TextEdit. Along the way, I got several possibly revealing
messages, one of which read The operation couldn't be completed.
(GSLibraryErrorDomain error 1. and one that read The document 'A.txt' is on a
At the risk of offending contributors to this list, whose knowledge and
helpfulness I greatly respect, may I suggest that this thread has gone on long
enough and that competing opinions on this topic would be better aired on some
other list?
Boyd___
Paul,
You're quite right. I commented out the call to shouldChangeTextInRange: and
my code still does what I want. Thanks for pointing this out.
I'll have a look at the documentation on methods for bracketing multiple
changes to the text (after I get my head around efficiently creating
];
[paraStyle release];
[[textView textStorage] addAttributes:attrs range:NSMakeRange(0,
[[[textView textStorage] string] length])];
[attrs release];
}
Boyd
On Jun 5, 2010, at 9:16 AM, Ross Carter wrote:
On Jun 5, 2010, at 1:09 AM, Boyd Collier wrote
In an application I'm working on, I read in plain text files containing data to
be analyzed. This uses a slightly-modified version of MyDocument.m that is
produced as a result of starting a project with the template for NSDocument
architecture. The modification that I made was to add a method
Take a look at
http://www.cocoabuilder.com/archive/cocoa/205083-nslog-replacement-for-debugger-output.html
I've been using Don Arnel's method as modified by Ken Thomases and it works
very well.
Boyd
On Feb 27, 2010, at 4:02 PM, Rick Mann wrote:
I'm trying to improve our logging a bit. We
Take a look at http://www.positivespinmedia.com/dev/PSMTabBarControl.html
Maybe this would satisfy your needs.
Boyd
On Jan 29, 2010, at 3:40 PM, John Nairn wrote:
I tried to find a way to do tabbed windows like Safari. Since they appear
integrated into the window title bar, I thought they
, Boyd Collier wrote:
Mario Kušnjer's question reminded me of a question that I've been
pondering about NSOutlineViews, namely, is there a way to have one
item on the outline initialized in the selected state when the
outline is first created? That is, when the window containing
Mario Kušnjer's question reminded me of a question that I've been
pondering about NSOutlineViews, namely, is there a way to have one
item on the outline initialized in the selected state when the outline
is first created? That is, when the window containing the outline is
first displayed
The Discussion section in the current documentation for the NSArray
method sortedArrayUsingFunction: context:
reads The new array contains references to the receiver’s elements,
not copies of them. Nothing is said about incrementing the retain
count of the objects in the array, which seems
A couple of years ago, I made a copy of MultipleNibTabView to play
around with in learning how to use tab views. I still have this
(slightly modified) copy but couldn't find the original version from
Apple on my computer. However, if you'd like a copy of the version
that I have, I'd be
Hi Mario,
Just want to add a short note to what Graham Cox said about using
Interface Builder. Be sure to read the section Setting a View's
Autosizing Behavior in Interface Builder User Guide and take some
time to experiment with setting springs and struts for various views
and
, Boyd Collier wrote:
Have you looked at the book Numerical Recipes in C? You can view
a copy on-line at http://www.fizyka.umk.pl/nrbook/c1-0.pdf (and
probably other places as well).
Yes, maybe I should have mentioned that. (Actually, I'm old enough
that my copy is Numerical Recipes
Here's what I've been using for shuffling an array of ints. It appears
to work quite well and is very simple and fast.
/*
* shuffle
*
* This function is from http://www.stanford.edu/~blp/writings/clc/shuffle.html
* Copyright ¨© 2004 Ben Pfaff
*
* BDC made change to add argument to allow
In a program I've been developing, I make a lot of use of matrices of
doubles, and I've written some straight-forward code for doing this
that might be of interest to you. If you're interested, I'd be happy
to send it to you.
Boyd
On Mar 20, 2009, at 11:33 AM, James Maxwell wrote:
Stanislas,
I don't have anything useful to add to what others have already said
about the merits of classic C arrays vs NSArray. However, since you
mentioned wanting to calculate variance and other stats, if you aren't
already familiar with the subtleties of algorithms for statistical
When I run Interface Simulator with one of my nibs, it is displayed in
a semi-transparent form, though all the parts can be seen and work as
expected. This (i.e. the transparency) is not the case for other nibs
in the same project. But when I run the project that these nibs are a
part of,
With some trepidation resulting from my lack of expertise, especially
relative to those who have already offered suggestions, here is bit of
code showing (a somewhat simplified version of) what I do. self in
the next-to-last line refers to a controller. In the header for the
controller,
I'm rather late coming into this discussion, but Graham's question
addresses something that I puzzled over when, not too long ago, I
started using Cocoa. As a newcomer wanting to avoid learning all
about bindings, the approach I've taken is essentially the same as is
summarized by Graham.
that a
clarifying detail be added.
Boyd
On Jun 3, 2008, at 8:21 PM, Kyle Sluder wrote:
On Tue, Jun 3, 2008 at 8:40 PM, Boyd Collier
[EMAIL PROTECTED] wrote:
Although everything now works as I think it should, the fact that
it didn't
work correctly when I used Apple's sample code makes me very
A couple of months ago, I too had this problem, but didn't
satisfactorily solve it at that time. As my original posting noted,
this change in behavior happened after upgrading to Leopard and Xcode
3.0. The recent posting by Stefan Haller prompted me to spend some
time trying to figure
Thanks very much to everyone who replied to my question. You've given
me a lot to think about; I'll crank up the old grey cells and see if I
can digest all of it (sorry for the mixed metaphor). If I come up
with any brilliant insights (very unlikely), I'll post a note.
Boyd
I 'm also interested in knowing if there's a San Diego area group.
Boyd
On Apr 1, 2008, at 4:46 PM, James Merkel wrote:
On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote:
Sorry to take any ones time if this has been discussed before. I
was curious
if there was any group meeting for
should take up
knitting instead of programming, are welcome.
Boyd
On Mar 20, 2008, at 4:13 PM, Boyd Collier wrote:
According to Apple's documents, the selector doubleValue returns 0.0
if the instance of an NSString that is the receiver doesn’t begin
with a valid text representation
According to Apple's documents, the selector doubleValue returns 0.0
if the instance of an NSString that is the receiver doesn’t begin
with a valid text representation of a floating-point number. Is
there a simple way to distinguish between the string 0.0, which
shouldn't be considered
47 matches
Mail list logo