Charles & Marco,
Thanks very much for the prompt replies. I think I’d tried
scrollView.borderType = .NSNoBorder (and lots of other things), but didn’t
think of leaving off the “NS”.
Boyd
> On Sep 25, 2015, at 12:12 PM, Marco S Hyman wrote:
>
> On Sep 25, 2015, at 11:43 AM,
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 t
-and-on for 30
years, and once again I conclude that dogged persistence is an essential
attribute. Undoubtedly, you know that, but I mention it for any newbs who
might read this.
Boyd
> On Sep 18, 2015, at 6:02 PM, Quincey Morris
> wrote:
>
> On Sep 18, 2015, at 16:40 ,
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 menu
t 1.2, 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 wrote:
>
>
>> On Aug 27, 2015, at 5:32 PM, Boyd Collier wrote:
>>
>> I’ve tried
>> let theTabStop: NSTextTab = NSTextTab(NSLeftTa
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 alloc
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 wrote:
>
> On 28 Aug 2013, at 22:26, Dave wrote:
>
>> Hi,
>>
>> I am getting the following warning
>>
>> warning: format specifies t
i++ ) {
subString = [testString substringWithRange:range];
theInt = [subString intValue];
range.location += digitsPerAllele;
}
}
Begin forwarded message:
> From: Boyd Collier
> Subject: Re: reverse scanner
> Date: August 12, 2013 1:00:56 PM PD
= [testString substringWithRange:range];
theInt = [subString intValue];
--alleles;
range.location = remainder;
range.length = digitsPerAllele;
for (i = 0; i < alleles; i++ ) {
subString = [testString substringWithRange:range];
theInt = [subString intValue];
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 chara
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 wrote:
>
>> Have you tried using NSData to s
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 in
to my 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
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 avail
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 wrote:
>
>> NSEnumerator *myEnumerator = [arrayOfLabels objectEnumerator];
>> NSString *aString = [my
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
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
> th
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 ins
>
>>
>>
>> Boyd
>>
>>
>>
>> On Feb 3, 2013, at 4:22 PM, Andy Lee wrote:
>>
>>> Can you post a screen shot and/or the nib file?
>>>
>>> --Andy
>>>
>>> On Feb 3, 2013, at 3:47 PM, Boyd Collier wrot
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 everyt
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 th
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 trian
AttributeName];
[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
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 m
, 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 cont
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 t
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 ha
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 subview
Apr 17, 2009, at 1:53 PM, 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
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).
About 15 years ago, there was a commercially produced package called
NuTools that would do everything you want, though perhaps
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:
I've
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
ca
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.
ou?" note at the bottom of the document page suggesting 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
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 out
Andy,
Just wanted to congratulate you for your exceptionally clear and
succinct summary. If I'd had it when I first started using Interface
Builder, it would have saved me a lot of head scratching (and
occasional head-banging).
Boyd
On May 14, 2008, at 9:37 AM, Andy Lee wrote:
On Ma
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
__
Hello all,
I need to place many thousands of doubles into size-class groups whose
boundaries can be explicitly specified (much like one would do in
constructing a histogram, though that's not what I'm doing). The
number of size-classes won't be great, usually fewer than 100, say.
It occ
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 Souther
even ones telling me that I 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
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
Andrea,
Thanks for the reply. In my case, the that aren't cascading are all
of the same kind, i.e. just very plain text files. I've not yet
figured out why this is happening, but perhaps someone will be able to
point out something simple that we are overlooking.
Boyd
On Feb 25, 2008, a
51 matches
Mail list logo