On 02 May 2015, at 20:18, William Squires wrote:
> This is sort of in response to the thread, "Parent/child view controllers:
> when shall we use it?".
>
> Since, in both iOS and Mac OS X, a control IS a view, why don't controls have
> their own dedicated view controllers? i.e. If I make a new
On May 2, 2015, at 11:18 , William Squires wrote:
>
> Since, in both iOS and Mac OS X, a control IS a view, why don't controls have
> their own dedicated view controllers?
There’s a philosophy about containment, referring not the parent/subview
relationship, but the geometric and behavioral ma
> On May 2, 2015, at 11:18 AM, William Squires wrote:
>
> why doesn't Xcode generate a template view controller (code) for the UILabel
> (that is, UILabelViewController), just like there's a view controller for the
> main view (usu. ViewController.h and ViewController.m, or - in swift, just
>
This is sort of in response to the thread, "Parent/child view controllers: when
shall we use it?".
Since, in both iOS and Mac OS X, a control IS a view, why don't controls have
their own dedicated view controllers? i.e. If I make a new single-view iOS
project, and I put a UILabel in the main vi
Anyone have awesome templates to share? :)
Eric Shepherd
Sent from my iPhone
> On Jun 8, 2014, at 9:04 PM, Shane Stanley wrote:
>
>> On 9 Jun 2014, at 10:16 am, Graham Cox wrote:
>>
>> I really wish Xcode would allow us to make our own templates, even for NSxxx
>> classes.
>
> You can. Copy
On 9 Jun 2014, at 11:04 am, Shane Stanley wrote:
> You can.
Thanks! There's my morning's productivity gone, but I fully expect it to pay
itself back.
--Graham
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requ
On 9 Jun 2014, at 10:16 am, Graham Cox wrote:
> I really wish Xcode would allow us to make our own templates, even for NSxxx
> classes.
You can. Copy this:
/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File
Templates/Cocoa/Objective-C class.xctemplate
To here:
~/Librar
On Jun 8, 2014, at 8:16 PM, Graham Cox wrote:
>
>
>> On 8 Jun 2014, at 7:32 am, Lee Ann Rucker wrote:
>>
>> Delete that init method. Xcode has a standard template and doesn't change it
>> when you tick the "make a xib file" checkbox.
>
>
> I really wish Xcode would allow us to make our own
On 8 Jun 2014, at 7:32 am, Lee Ann Rucker wrote:
> Delete that init method. Xcode has a standard template and doesn't change it
> when you tick the "make a xib file" checkbox.
I really wish Xcode would allow us to make our own templates, even for NSxxx
classes. The templates they do come wit
initWithWindow: is the designated initializer which is why the template has it
vs one other of the init methods, but it doesn't mean you have to use it. It's
not there to tell you that you need to call it, it's there so you can add
initialization-time code as needed.
The easiest thing to do to
ind some useful sample and start modifying it.
- Original Message -
From: "William Squires"
To: "Cocoa Developers"
Sent: Saturday, June 7, 2014 12:24:02 PM
Subject: Another dumb question about NSWindowController(s)
Okay, if I create a new NSWindowController subclass (and t
Okay, if I create a new NSWindowController subclass (and tell Xcode to
generate the .xib as well), it gives me simple (too simple, I think) template
code, whose init... method takes an NSWindow reference. Where does this come
from (the reference)?
• Is the code instantiating the custom NSWind
Why doesn't NSData have a +[NSData dataWithString:(NSString *)] or -[NSData
initWithString:(NSString *)] method? i.e. how do I convert the contents of an
NSString object into an NSData object? Why? Because -[NSFileHandle
writeData:(NSData *)] takes an NSData object, not an NSString object.
Ar
On 17 May 2014, at 9:46 am, William Squires wrote:
> how do I convert the contents of an NSString object into an NSData object?
> Why? Because -[NSFileHandle writeData:(NSData *)] takes an NSData object, not
> an NSString object. Arrrgg. :(
BTW, is there some reason you can't just use [N
On 17 May 2014, at 9:46 am, William Squires wrote:
> Also, how come NSFileHandle doesn't have a -[NSFileHandle
> readFileWithSeparator:(NSString *)] method so one can read in only chunks of
> a file (of varying size, such as CSV records, or lines in a text file,
> separated by \n, as opposed
[NSString dataUsingEncoding:]
sometimes you have to look at the source object, not the destination (in fact
usually, I'd say).
Also, in this case, [NSData initWithString:] would lack the information needed
to perform the conversion - you need to pass in what encoding you require.
--Graham
On Fri, May 16, 2014 at 4:46 PM, William Squires wrote:
> Why doesn't NSData have a +[NSData dataWithString:(NSString *)] or
> -[NSData initWithString:(NSString *)] method? i.e. how do I convert the
> contents of an NSString object into an NSData object?
Try -[NSString dataUsingEncoding:] or
-
On May 16, 2014, at 16:46 , William Squires wrote:
> Why doesn't NSData have a +[NSData dataWithString:(NSString *)] or -[NSData
> initWithString:(NSString *)] method?
Because strings consist of *encoded* data, which (in principle) has no meaning
outside the internals of the string itself**,
On 21/11/2012, at 12:55 AM, William Squires wrote:
> I was just wondering if there was some way to make an app that could
> create/edit these saved objects directly at the binary level so I could make
> sure of the intermediate results from option #1!
The Property List Editor utility that co
In other words, you bootstrapped the process, right? You generated a class
that had encodeWithCoder:, wrote out the results, then went back and coded
initWithCoder:, using the written out stuff to pull it back in? That's what I
was thinking, too. I was just wondering if there was some way to m
On Sun, 18 Nov 2012 21:26:09 -0600, William Squires said:
>What's the recommended procedure for (unit) testing the initWithCoder:
>and encodeWithCoder: methods of a class that conforms to NSCoding protocol?
I do two things: 1) a test that encodes then immediately decodes, then compares
the origi
What's the recommended procedure for (unit) testing the initWithCoder: and
encodeWithCoder: methods of a class that conforms to NSCoding protocol?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator c
That's what I was looking for - now, back to my project... tomorrow! :)
On Feb 23, 2012, at 2:04 PM, Seth Willits wrote:
> On Feb 23, 2012, at 5:58 AM, William Squires wrote:
>
>> I have a custom view with an NSBox containing an NSMatrix of button cells
>> (radio buttons) When I created the NSM
Not sure about your number of items in your matrix, but you are wanting [sender
selectedTag] to get the user's choice.
Regards
Gideon
On 23/02/2012, at 11:58 PM, William Squires wrote:
>
> -(IBAction)baseChanged:(id)sender
> {
> int choice = [sender tag];
> }
>
> I always get, "user chose h
On 24/02/2012, at 12:58 AM, William Squires wrote:
> I have a custom view with an NSBox containing an NSMatrix of button cells
> (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them,
> but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has
> 4 butto
On Feb 23, 2012, at 6:58 AM, William Squires wrote:
> I have a custom view with an NSBox containing an NSMatrix of button cells
> (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them,
> but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has
> 4 butto
On Feb 23, 2012, at 5:58 AM, William Squires wrote:
> I have a custom view with an NSBox containing an NSMatrix of button cells
> (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them,
> but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has
> 4 butto
I have a custom view with an NSBox containing an NSMatrix of button cells
(radio buttons) When I created the NSMatrix, I told it I wanted 3 of them, but
in the view hierarchy, I can see the NSMatrix under the NSBox, but it has 4
button cells under it, not the three I asked for - Is this an Xco
On Jul 4, 2011, at 5:29 PM, William Squires wrote:
> Do individual table columns have a 'Tag' value that can be set so I can find
> out which column the tableview delegate/datasource is working with? (I want
> to set the tag value to an NSString that's the key value in an NSDictionary,
> then f
Do individual table columns have a 'Tag' value that can be set so I can find
out which column the tableview delegate/datasource is working with? (I want to
set the tag value to an NSString that's the key value in an NSDictionary, then
fetch the value for that key-value pair to set the contents o
uot; process). It's perfectly legal to
populate relationships there too (ie: maybe every "Player" needs an array of
"Things" when they're er. hatched).
On Feb 4, 2010, at 8:04 PM, cocoa-dev-requ...@lists.apple.com wrote:
> Message: 11
> Date: Thu, 4 Feb 2010
If you create your data model in Xcode with its data modeling facility, you can
give it a default value right there, when you select the attribute (no need to
recreate the Player.m and Player.h files). If you need to set different default
values each time, just create the Player instance and set
On Feb 4, 2010, at 5:13 PM, William Squires wrote:
> Let's say I have an entity, "Player" that has some attributes (Name, Level,
> XP, FightStr, DefenseStr, etc...) for a role-playing game. How do I
> pre-initialize an entity with known values, when their properties are
> @dynamic? I need for
Let's say I have an entity, "Player" that has some attributes (Name,
Level, XP, FightStr, DefenseStr, etc...) for a role-playing game. How
do I pre-initialize an entity with known values, when their
properties are @dynamic? I need for a "blank" player to start out on
level 1 with 0 XP, 0 Fi
there's been a long discussion
recently on how to determine the OS version at runtime: http://www.cocoabuilder.com/archive/message/cocoa/2009/7/2/240095
HTH,
Dave
On Jul 3, 2009, at 2:41 AM, maxwellma...@gmail.com wrote:
Hi Folks,
sorry I know this is probably a dumb question. I'
Hi Folks,
sorry I know this is probably a dumb question. I'm new to Mac OS X
development being a jaded Java bod coming over to the light. Very nice
it is too.
My problem is I need to call this method that seems to be in a later
version of the AppKit.framework than is on my machine.
The meth
do you also use it across several classes?
Op 12-jun-2009, om 12:36 heeft Chunk 1978 het volgende geschreven:
maybe this coffee hasn't kicked in yet and undoubtedly there is a
simple solution, but i'm trying unsuccessfully to refactor some code,
and i'd like to set the following as a static or
I have the following in a project of mine, in a file Constants.h,
which I import as needed from other source files:
#define kAppFrame ([UIScreen mainScreen].applicationFrame)
#define kScreenWidth([UIScreen
mainScreen].bounds.size.width)
#define kScreenHeight
not yet, just the one class... i assume to use it in other classes i
would simply import the class that has the static definition... just
don't know how to write the static definition.
On Fri, Jun 12, 2009 at 6:41 AM, Arie Pieter
Cammeraat wrote:
> do you also use it across several classes?
>
>
>
maybe this coffee hasn't kicked in yet and undoubtedly there is a
simple solution, but i'm trying unsuccessfully to refactor some code,
and i'd like to set the following as a static or define instead of
having it written several times in several methods
-=-=-=-
CGRect fullScreenRect = [[UIScreen m
On Tue, Nov 18, 2008 at 4:32 PM, Robert Mullen <[EMAIL PROTECTED]> wrote:
> My application is not document based but does create certain files as a
> byproduct and needs to be the default application for these file types as
> well. If they are clicked or dragged to the dock icon of my application I
My application is not document based but does create certain files as
a byproduct and needs to be the default application for these file
types as well. If they are clicked or dragged to the dock icon of my
application I need to be able to display the contained information in
a special displ
On Tue, Nov 11, 2008 at 4:54 PM, Andrew Farmer <[EMAIL PROTECTED]> wrote:
> On 11 Nov 08, at 15:17, Charles Steinman wrote:
>>
>> If you look at the QTKit documentation, it will tell you what's been
>> available since when. Some things have been there since 10.3, while others
>> were added in 10.5.
On 11 Nov 08, at 15:17, Charles Steinman wrote:
If you look at the QTKit documentation, it will tell you what's been
available since when. Some things have been there since 10.3, while
others were added in 10.5. However, I would not recommend
distributing Apple's (or anyone else's) software
heir permission.
Cheers,
Chuck
- Original Message
> From: Jean-Nicolas Jolivet <[EMAIL PROTECTED]>
> To: cocoa-dev@lists.apple.com
> Sent: Tuesday, November 11, 2008 2:28:59 PM
> Subject: A bit of a dumb question, but I need to know...
>
> I'm using the quick
Thanks to both of you!
I guess I don't have to copy it after all! :)
Jean-Nicolas Jolivet
Jean-Nicolas Jolivet wrote:
I'm using the quick time framework in my App (QTKit/QTKit.h) for
QTMovies and QTMovieView etc...
Do I need to distribute it with my app (i.e. add a new Copy build
phase), o
On Nov 11, 2008, at 3:28 PM, Jean-Nicolas Jolivet wrote:
Do I need to distribute it with my app (i.e. add a new Copy build
phase), or can I safely assume that everyone with OS X Tiger has the
framework already?? (My app will require Tiger at least)...
If a framework is in /System/Library/
If I'm correct, it's a standard framework that everyone has. That
being said, I've never used it myself so wait until an expert confirms
or rebuked what said.
Nate
On Nov 11, 2008, at 5:28 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]
> wrote:
I'm using the quick time framework in my App (QT
I'm using the quick time framework in my App (QTKit/QTKit.h) for
QTMovies and QTMovieView etc...
Do I need to distribute it with my app (i.e. add a new Copy build
phase), or can I safely assume that everyone with OS X Tiger has the
framework already?? (My app will require Tiger at least)...
For zooming, check out NSView's -scaleUnitSquareToSize: which changes
the scale factor of the view's transform. Together with -setFrame: (or
-setFrameSize:) you can implement arbitrary zooming. If the view is
enclosed by a scroller, it will adjust the scrollbars automatically,
as well as an
Thanks to everyone for their informative answers. I gotta say, I think
the docs are a bit lacking, but maybe I just had certain assumptions
going in (that a subview's frame should be contained within a
superview's bounds, etc.)
--
Rick
___
Cocoa
As is the case with all NSViews, the frame of the view defines the area
occupied by the view in its superview's coordinate system. The bounds of a
view defines that view's own coordinate system irrespective of the frame.
Therefore, if the frame size and bounds size for a particular view are
d
You can look at the Sketch sample code for one way. You can lift
SKTZoomingScrollView intact, although you may need to implement your own
controller to extract related code from the Sketch document class. However,
I have still to get it to work properly when using CALayers. Sketch scales
the bou
On Jul 23, 2008, at 10:43, Rick Mann wrote:
What attribute of the contained views does NSScrollView (or the
NSScroller, whatever) use to determine what the scroll bars look
like? I read the doc a couple times, but I couldn't quite figure it
out. Is it the bounds.size of my contained view? W
What attribute of the contained views does NSScrollView (or the
NSScroller, whatever) use to determine what the scroll bars look like?
I read the doc a couple times, but I couldn't quite figure it out. Is
it the bounds.size of my contained view? What if I'm setting a
CoreGraphics CTM to zoo
55 matches
Mail list logo