On 16 Apr 08, at 23:41, Ken Thomases wrote:
On the other hand, you should consider if you really want/need to
synchronize on the download. Blocking your main thread for an
indefinite wait seems likely to cause poor user experience. Even if
your server is _usually_ quick to serve the file,
My app can respond to changeFont: and friends in various places. When
those places have focus, the text menu items such as Bold, Italic and
so on are enabled, and when they are not focused, they are disabled.
All great.
However, there are some places in my app that selectively respond to
NSWorkspace launch the application but loads the url in the default
browser.
What i have to do to make the url open in the my application (webkit
+cocoa).
Please give me the suggestions.
On 16-Apr-08, at 8:26 PM, Mike Abdullah wrote:
If it is absolutely necessary to use NSTask for launchin
Is there an easy way to change the duration of an implicit animation--
the kind you get when you do something like this?
[[myWindow animator] setFrame:newFrame display:NO] ;
Thanks,
Mike
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please
I'm not sure what the animator method returns. If you're asking how
to control the duration of an NSWindow resize animation, you need to
subclass NSWindow and override animationResizeTime: to return the
duration you want.
On Apr 17, 2008, at 1:32 AM, Mike Manzano wrote:
Is there an easy
On Wed, Apr 16, 2008 at 4:49 PM, Hamish Allan <[EMAIL PROTECTED]> wrote:
> [myArrayController addObserver:self forKeyPath:@"arrangedObjects"
> options:(NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew)
> context:nil];
> myDictionary = [[NSMutableDictionary alloc] init];
> [myD
You can use -[NSWorkspace
openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers
:];
Le 17 avr. 08 à 09:24, Praveen Kumar a écrit :
NSWorkspace launch the application but loads the url in the default
browser.
What i have to do to make the url open in th
On Wed, Apr 16, 2008 at 2:31 AM, Hamish Allan <[EMAIL PROTECTED]> wrote:
> How can I make the tree controller observe changes to this "children"
> key? Is it failing because the key value does not exist in its own
> right, but is bound to another?
FYI, I tracked this down to a bug in NSArrayCo
Sorry, pressed the wrong button.
And: if the bezier path shall always be drawn 1 pixel wide, independent
of resolution and scaling the lineWidth should be set to 0 (zero)
--
Heinrich Giesen
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@l
Graham Cox wrote:
Offsetting by 0.5 makes it draw such that the exact pixel is filled.
When a bezier path is more complicated it can become very ugly to add
0.5 to all coordinates.
To avoid this the NSBezierPath class offers the method -
transformUsingAffineTransform:
So you can create a bez
On 17.04.2008, at 08:32, Graham Cox wrote:
Is it possible to create a 1-bit (black and white) NSBitMapImageRep?
If so, what are the magic parameters? If not, what is the smallest
number of bits per pixel supported?
You can create 1-bit NSBitMapImageReps, but you have to fill it
yourself.
A
wrap the change in a NSAnimationContext
See the NSAnimationContext reference for a snippet that shows you how.
http://developer.apple.com/documentation/Cocoa/Reference/NSAnimationContext_class/index.html#/
/apple_ref/doc/uid/TP40004682
On Apr 17, 2008, at 3:32 AM, Mike Manzano wrote:
Is the
Hi,
I am attempting to work around a bug in NSArrayController by trying to
propagate change notifications for arrangedObjects manually, as if I
had bound the key path of another object to it (see
http://www.cocoabuilder.com/archive/message/cocoa/2008/4/17/204421 for
why that doesn't work).
Howeve
On Apr 17, 2008, at 3:45 AM, Michael Vannorsdel wrote:
I'm not sure what the animator method returns. If you're asking how
to control the duration of an NSWindow resize animation, you need to
subclass NSWindow and override animationResizeTime: to return the
duration you want.
no, thi
Ah ok, missed that protocol. Thanks for clearing it up.
On Apr 17, 2008, at 3:47 AM, Scott Anguish wrote:
On Apr 17, 2008, at 3:45 AM, Michael Vannorsdel wrote:
I'm not sure what the animator method returns. If you're asking
how to control the duration of an NSWindow resize animation, you
Mmmm, I read them, but not very enlightening for my situation.
When you say I have to "fill it myself", what does that mean? Can't I
just fill or stroke a path with that rep as a context? If not then
there's no point in proceeding with this question as that is what
needs to work. I don't ca
Hi,
It seems that -willChangeValueForKey and -didChangeValueForKey of
NSArrayController are called on arrangedObjects change.
I think you can use of a class that inherits from NSArrayController
where theses methods are redefined to send manually change
notifications:
- (void) willChang
On 16 Apr 2008, at 17:22, Michael Ash wrote:
On Wed, Apr 16, 2008 at 5:28 AM, Alastair Houghton
<[EMAIL PROTECTED]> wrote:
On 16 Apr 2008, at 03:29, Michael Ash wrote:
If this is the case then how does the collector know that you have
cleared the memory. It seems to me that without a write ba
Hi Pierre,
On Thu, Apr 17, 2008 at 12:17 PM, Pierre Molinaro <[EMAIL PROTECTED]> wrote:
> I think you can use of a class that inherits from NSArrayController
Thanks for your reply. Subclassing and caching did occur to me (which
I should have mentioned), but having to do that sort of thing rathe
But the question is, does it solve your problem? Your original message said
that you were doing something _like_ binning, but that it wasn't. This
actually _is_ binning. Is it good enough, or do you need something else?
Thanks,
Cem Karan
On 4/16/08 12:25 PM, "John Stiles" <[EMAIL PROTECTED]>
Hi,
Can't I just fill or stroke a path with that rep as a context?
no, you can't. If you try to create a context with:
[NSGraphicsContext graphicsContextWithBitmapImageRep:oneBitRep];
it is not accepted. The errormessage is:
CGBitmapContextCreate: unsupported parameter combination: 1 intege
Ah, OK, thanks for confirming that.
The process you outline will probably take too long for what I'm
doing, so it looks like I'll have to just use 8-bit reps - shame, it's
8 times more memory than the job requires :-(
--
S.O.S.
On 17 Apr 2008, at 8:45 pm, Heinrich Giesen wrote:
Hi,
Am 17.04.2008 um 02:30 schrieb Ben Trumbull:
Hi,
let's say I have four versions of my data model:
DataModel1.xcdatamodel
DataModel2.xcdatamodel
DataModel3.xcdatamodel
DataModel4.xcdatamodel (this is the current one)
and three model mapping files which always map from version n to
version n+
Am 17.04.2008 um 03:57 schrieb Graham Cox:
Is it possible to create a 1-bit (black and white) NSBitMapImageRep?
If so, what are the magic parameters? If not, what is the smallest
number of bits per pixel supported?
Others have already given you options, but what I'm wondering is what
you
I've been able to solve my problem by taking Quartz.framework out of
my project and loading QuartzComposer.framework directly at runtime
with NSBundle. For example:
Instead of:
QCRenderer* renderer = [QCRenderer alloc];
I have:
static Class QCRendererClass = nil;
i
Is there something special that I need to do when calling a setter
method on a vended object?
I have a Customer object that I am vending. From the client app I call
the setName method with a value of @"Justin", but when it gets to the
server app, it says it is an invalid object.
Thank you
On Apr 17, 2008, at 9:19 AM, Justin Giboney wrote:
Is there something special that I need to do when calling a setter
method on a vended object?
I assume you're referring to Distributed Objects. Right?
I have a Customer object that I am vending. From the client app I
call the setName meth
Hi,
I have NSOutlineView display a tree of files and folders in the root
"/" filesystem.
I also have checkboxes in the first column.
whenever a item is clicked, say first time, then this item and all
its children are also marked internally.
so the check/uncheck mechanism also works internally
On Thu, Apr 17, 2008 at 2:16 AM, xiaobin <[EMAIL PROTECTED]> wrote:
> hi, all
>
> In my application, I want to download a file from internet. so I use
> NSURLDownload to do it. and using NSRunLoop to wait until finish the
> downloading action. for example 2 seconds. codes as the following
By man
bycopy worked, thank you.
Does this mean though that I need to duplicate all of methods, with
one set for internal commands and one for remote commands?
Thank
Justin Giboney
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not pos
On Thu, Apr 17, 2008 at 10:48 AM, Nick Rogers <[EMAIL PROTECTED]> wrote:
> Hi,
> I have NSOutlineView display a tree of files and folders in the root "/"
> filesystem.
> I also have checkboxes in the first column.
> whenever a item is clicked, say first time, then this item and all its
> children
On Thu, Apr 17, 2008 at 8:01 AM, Justin Giboney
<[EMAIL PROTECTED]> wrote:
> bycopy worked, thank you.
>
> Does this mean though that I need to duplicate all of methods, with one set
> for internal commands and one for remote commands?
You need an interface that has the needed bycopy, etc. qualif
On Thu, Apr 17, 2008 at 4:48 PM, Nick Rogers <[EMAIL PROTECTED]> wrote:
> This shows that my internal checking/unchecking mechanism is fast. as the
> second time the time is considerably less.
Not necessarily... it may simply be that your data is being cached
closer to where it is needed.
The o
To declare a vended object, you should first declare a protocol that
contains the methods you want to expose and that defines the methods
behaviors (bycopy, byref, in, out, etc...)
Then, you create a class that conforms to this protocol. You may omit
the bycopy, byref and other modifiers in y
On Apr 17, 2008, at 10:01 AM, Justin Giboney wrote:
bycopy worked, thank you.
Uh, OK. Glad it helped, but your original problem is still
mysterious. I don't know about you, but I don't like blindly fixing
things without understanding them.
Does this mean though that I need to duplicate
On 16 Apr '08, at 1:46 AM, Gerriet M. Denkmann wrote:
NSValue has two methods: value:withObjCType: and
valueWithBytes:objCType: .
What is the difference between these two methods? When do I have to
use the first, when the second?
I am rather confused.
Read the documentation. For the fir
on 4/17/08 4:50 AM, [EMAIL PROTECTED] purportedly said:
>> I think you can use of a class that inherits from NSArrayController
>
> Thanks for your reply. Subclassing and caching did occur to me (which
> I should have mentioned), but having to do that sort of thing rather
> defeats the purpose of
on 4/17/08 9:31 AM, [EMAIL PROTECTED] purportedly said:
>> NSValue has two methods: value:withObjCType: and
>> valueWithBytes:objCType: .
>>
>> What is the difference between these two methods? When do I have to
>> use the first, when the second?
>> I am rather confused.
>
> Read the documentati
I have an NSEvent and I need to know what key the user has pressed,
minus any of the modifiers. NSEvent -charactersIgnoringModifiers seems
like a good place to start, but it has one serious flaw—it does not
ignore the Shift key. So, for instance, it won't change ~ to `, ! to 1
or { to [.
I ne
I used that one Jean-Daniel Dupas specified.
-[NSWorkspace
openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers
:];
where i gave nil for last two arguments.
I created a sample cocoa+webkit application and added apple
scriptability. I execute the script
I think you'd ask the NSEvent for its -keyCode, then pass that key
code to UCKeyTranslate() with all the modifier key state (including
shift) turned off in order to get a unicode string for what that key
would mean if the user hadn't been pressing any modifiers.
Hope that helps,
- G
I imagine this is a very dumb question, but I am perplexed.
NSArray says you can change the values of elements, but not add/
subtract/replace elements.
Let's say I have an NSArray @"Tom", @"Dick", @"Harry", nil
And I want to change Tom and Dick to Mutt and Jeff.
Is my only option to make it
Sweet, I will take a look at this and post back when I have results or
questions. Thanks!
Greg Titus wrote:
I think you'd ask the NSEvent for its -keyCode, then pass that key
code to UCKeyTranslate() with all the modifier key state (including
shift) turned off in order to get a unicode string
Actually that didn't work... it appears to be setting it as I go
through the set method, but when I go to get it it is almost as if it
is calling an object in a different memory set.
I set up the protocol, and I am using bycopy.
Thanks,
Justin Giboney
On Apr 17, 2008, at 9:25 AM, Ken Thom
Hi Peter,
I uploaded two screenshots from Mail (in the background) and a demo
app (in the foreground) designed just in Interface Builder. The size
of the segmented control is exactly the same but there is a difference
in the baseline.
http://homepage.mac.com/stefan.hafeneger/.cv/stefan.ha
On 17 Apr '08, at 9:08 AM, Praveen Kumar wrote:
I created a sample cocoa+webkit application and added apple
scriptability. I execute the script on this application from script
editor. The application opened the given url successfully, but i
can't able to quit the application from the dock
On Apr 17, 2008, at 01:42, William Towe wrote:
Yep, that took care of it. Just so I understand, should I surround
calls to any of the standard KVC method calls (in my case,
insertObject:atIndex:) with [self
willChangeValueForKey:@"affectedKey"]; and [self
didChangeValueForKey:@"affected
Le 17 avr. 08 à 18:18, John Stiles a écrit :
Sweet, I will take a look at this and post back when I have results
or questions. Thanks!
Greg Titus wrote:
I think you'd ask the NSEvent for its -keyCode, then pass that key
code to UCKeyTranslate() with all the modifier key state (including
Quick question: in Leopard, are there any keyboards left which don't
have a uchr?
I found some sample code which includes a fallback case for if no 'uchr'
resource is found (it uses plain KeyTranslate in this case) and I'm
wondering whether this is still relevant in the Leopard-and-above timef
On 17 Apr '08, at 9:15 AM, Johnny Lundy wrote:
NSArray says you can change the values of elements, but not add/
subtract/replace elements.
Nope; NSArrays are completely immutable. To make any modifications you
first have to make a mutable copy, and then modify that. (The same
goes for NSD
Johnny Lundy wrote:
I imagine this is a very dumb question, but I am perplexed.
NSArray says you can change the values of elements, but not add/
subtract/replace elements.
Right. Meaning if a contained object it mutable, you can mutate it
and the NSArray won't care.
Let's say I have an N
I'm currently cribbing from here:
http://lists.apple.com/archives/carbon-dev/2005/May/msg01062.html
And I got rid of the non-uchr section. I can require Leopard in this case.
From: Jean-Daniel Dupas [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 17, 2008 9:37 AM
To: John Stiles
Cc: co
OK, I've got this implemented.
Good news: it seems to work great for punctuation and letters.
Bad news: it doesn't seem to work for other keys, like F-keys or arrow
keys. Or rather, it generates a result, but not the same values as
NSF1FunctionKey or NSUpArrowFunctionKey. It's coming up with low
I don't think so. The API to retreive KCHR is deprecated and does not
exists on 64 bits, so it would mean that a kchr keyboard cannot be
used with 64 bits software.
Le 17 avr. 08 à 18:38, John Stiles a écrit :
Quick question: in Leopard, are there any keyboards left which don't
have a u
I assume you picked cmd-shift-[ because the curly brace makes sense,
in which case you really are looking for cmd-{. If someone has a
keyboard where the shifted version of [ is @ (no idea if such a
keyboard actually exists), you might not want your shortcut to be cmd-
shift-[.
So, I think
I think you missed the part where I explained about how the user can
customize the hotkeys to whatever they want :)
Right now the UI is set up so that they pick a key, then they pick what
modifiers they want. It makes way more sense from an end-user
perspective to choose the "1" key and then c
On Thu, Apr 17, 2008 at 12:15 PM, Johnny Lundy <[EMAIL PROTECTED]> wrote:
> I imagine this is a very dumb question, but I am perplexed.
>
> NSArray says you can change the values of elements, but not
> add/subtract/replace elements.
>
> Let's say I have an NSArray @"Tom", @"Dick", @"Harry", nil
Now that you say it, "[" is produced using "alt + shift + (" on french
keyboard, and "alt + (" output "{".
So "cmd + [" is actualy on french keyboard "cmd + alt + shift + ("
shortcut are really not good candidate for internationalization.
Le 17 avr. 08 à 19:11, Hank Heijink (Mailinglists) a
On Apr 17, 2008, at 9:36 AM, Quincey Morris wrote:
Just so I understand, should I surround calls to any of the
standard KVC method calls (in my case, insertObject:atIndex:) with
[self willChangeValueForKey:@"affectedKey"]; and [self
didChangeValueForKey:@"affectedKey"] if the standard KVC
Mark --
Thanks for the input.
The code for the accessor methods are shown below:
- (NSManagedObject *)wineType
{
id tmpObject;
DebugMessage(@"entering");
[self willAccessValueForKey: @"wineType"];
tmpObject = [self primitiveValueForKey: @"wineType"];
[self didAccessValu
On Apr 17, 2008, at 7:48 AM, Nick Rogers wrote:
Hi,
I have NSOutlineView display a tree of files and folders in the root
"/" filesystem.
I also have checkboxes in the first column.
whenever a item is clicked, say first time, then this item and all
its children are also marked internally.
so
As previously explained here, I'm handling hotkeys in my app via custom
code in order to work around some AppKit bugs.
How can I simulate the menu-title blink effect using Cocoa? In Carbon,
it's FlashMenuBar(menuID) but I don't see a Cocoa equivalent.
_
On Apr 17, 2008, at 11:54 AM, John Stiles wrote:
As previously explained here, I'm handling hotkeys in my app via
custom code in order to work around some AppKit bugs.
How can I simulate the menu-title blink effect using Cocoa? In
Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equ
Randall Meadows wrote:
On Apr 17, 2008, at 11:54 AM, John Stiles wrote:
As previously explained here, I'm handling hotkeys in my app via
custom code in order to work around some AppKit bugs.
How can I simulate the menu-title blink effect using Cocoa? In
Carbon, it's FlashMenuBar(menuID) but I
John Stiles wrote:
Randall Meadows wrote:
On Apr 17, 2008, at 11:54 AM, John Stiles wrote:
As previously explained here, I'm handling hotkeys in my app via
custom code in order to work around some AppKit bugs.
How can I simulate the menu-title blink effect using Cocoa? In
Carbon, it's FlashM
On Apr 17, 2008, at 12:05 PM, John Stiles wrote:
Randall Meadows wrote:
On Apr 17, 2008, at 11:54 AM, John Stiles wrote:
As previously explained here, I'm handling hotkeys in my app via
custom code in order to work around some AppKit bugs.
How can I simulate the menu-title blink effect using
On Apr 13, 2008, at 4:38 AM, Jeff wrote:
Any way to take an NSTextField containing some amount of text, and
resize it
vertically so all the text fits within the frame? The sizeToFit
message
seems to do this, except on the horizontal axis.
Thank you!
It's a little easier to do this with an N
On Apr 17, 2008, at 10:45 AM, Thaddeus Cooper wrote:
As far as I know these are correct. But I'm sure someone will tell
me if they aren't ;-)
Just for reassurance, they look OK to me.
I can't remember if you're targeting 10.5+? If so, you should try to
avoid writing your own accessor meth
On Apr 16, 2008, at 9:03 AM, Victor Bovio wrote:
Does anyone knows a good book or tutorial that covers printing (in-
depth) in Cocoa apps ??, I have Hillegass book but just covers the
minimal steps for printing..
When I was learning how printing worked in Cocoa, I read the parts of
Aaron's
Just for fun, I'm trying to implement an NSDrawer object with a HUD-
style look'n'feel to it.
As it turns out, it is not a subclass of NSWindow that lets me do what
I need to do. If NSDrawer was that, it would be easy, otherwise, not
so much.
SO, here's my Q:
(1) *Can* I implement a subcl
On Apr 16, 2008, at 6:49 PM, Karl Goiser wrote:
I'm creating a borderless window whose content view uses Core
Animation...
When I do this, the window is drawn without any shadow no matter the
alpha of the content.
- a borderless window with a normal view draws the window's shadow.
- a no
On Apr 17, 2008, at 10:31, mmalc crawford wrote:
On Apr 17, 2008, at 9:36 AM, Quincey Morris wrote:
Just so I understand, should I surround calls to any of the
standard KVC method calls (in my case, insertObject:atIndex:) with
[self willChangeValueForKey:@"affectedKey"]; and [self
didChan
Hi All,
I wish to create a UI using OpenGL for use in an ITunes Visualizer
Plugin.
Can anyone tell me how to get started?
I have the Visualizer SDK already.
Is there anything OpenGL wise that I have to download?
Is there a tool, like Interface Builder, that I can drag and drop the
interf
On Apr 17, 2008, at 11:19 AM, Justin Giboney wrote:
Actually that didn't work... it appears to be setting it as I go
through the set method, but when I go to get it it is almost as if
it is calling an object in a different memory set.
Sounds like you're getting the memory management wrong.
Inside of MainMenu.nib, I have my application's main window. Also in
MainMenu.nib is an NSObject subclass instance that is the main
window's delegate.
In another nib, I have a panel and an NSObject subclass instance that
is the panel's delegate. The panel is opened attached as a sheet to
On Apr 17, 2008, at 11:38 AM, John Stiles wrote:
Quick question: in Leopard, are there any keyboards left which don't
have a uchr?
I found some sample code which includes a fallback case for if no
'uchr' resource is found (it uses plain KeyTranslate in this case)
and I'm wondering whether
I'm using NSDocument/NSWindowController with bindings in the
NSWindowController subclass set up in Interface Builder. When I close
the window, I get the message "An instance 0x306860 of class Problem
is being deallocated while key value observers are still registered
with it." I'd like to u
Hi,
I have a document based Cocoa app (CAD-like), to which I like to add
the Leopard quicklook plugin feature.
I tried first looking at the Documentation, but looks overwhelming to
me, is there a simple tutorial or examples somewhere I can look at ??
Basically I just want to embed a snapshot
Hi All,
I'm working on a cocoa application which needs to mount a afp volume.
I've found a way to mount a volume using AppleScript with Finder object.
Example using mount volume command.
Is there any cocoa way to mount a volume silently by passing the user
name and password.
Please h
On 17-Apr-08, at 4:07 PM, Victor Bovio wrote:
Hi,
I have a document based Cocoa app (CAD-like), to which I like to add
the Leopard quicklook plugin feature.
I tried first looking at the Documentation, but looks overwhelming
to me, is there a simple tutorial or examples somewhere I can look
Hmm, OK. I guess there's no harm in leaving in the KCHR handling code. I
was hoping to simplify things (this routine is already big and yucky)
but I guess that's just not in the cards. Nothing about this whole
hotkey ordeal has been simple!
Ken Thomases wrote:
On Apr 17, 2008, at 11:38 AM, J
On Thu, Apr 17, 2008 at 3:49 PM, Michael Watson <[EMAIL PROTECTED]>
wrote:
> Inside of MainMenu.nib, I have my application's main window. Also in
> MainMenu.nib is an NSObject subclass instance that is the main window's
> delegate.
>
> In another nib, I have a panel and an NSObject subclass instan
Here's what I ended up with. It's really not pretty but I think it
should handle everything.
I derived this from code on Carbon-dev (see "iGetKeys sample code
problems in Tiger") so I think it's only fair to give back :) BTW, word
to the wise, the Carbon-dev code looks like it has an endian bug,
Le 17 avr. 08 à 22:44, Sherm Pendley a écrit :
On Thu, Apr 17, 2008 at 3:49 PM, Michael Watson <[EMAIL PROTECTED]>
wrote:
Inside of MainMenu.nib, I have my application's main window. Also in
MainMenu.nib is an NSObject subclass instance that is the main
window's
delegate.
In another nib, I
On 17 Apr 2008, at 17:56, Keary Suska wrote:
on 4/17/08 9:31 AM, [EMAIL PROTECTED] purportedly said:
NSValue has two methods: value:withObjCType: and
valueWithBytes:objCType: .
What is the difference between these two methods? When do I have to
use the first, when the second?
I am rather conf
I'm curious if anyone knows the rationale behind the decision to make
sending messages to nil be a no-op in ObjC. I've used a number of
other OO languages, including C++, Java, Python, Ruby, Smalltalk, and
Javascript, and in all of them, trying to invoke a method on whatever
their equival
I've been working on a project for a few weeks now and suddenly today
I get this error while building (see below). I was getting this same
error in one of my real classes so after commenting out almost every
bit of code and still seeing the error, I decided to just create a new
TestClass an
The only potential problem I can see with this is whether IB will use
the generated accessor methods to set the outlets, or if it will just
access the ivars directly. If it does the latter, then no property
change notifications will be sent to observers when IB sets the
outlet. If that's
you forgot the break;
On 17-Apr-08, at 3:47 PM, Don Arnel wrote:
I've been working on a project for a few weeks now and suddenly
today I get this error while building (see below). I was getting
this same error in one of my real classes so after commenting out
almost every bit of code and st
On Fri, Apr 18, 2008 at 12:47 AM, Don Arnel <[EMAIL PROTECTED]> wrote:
> switch (1) {
> default:
> }
> (x)(error: label at end of compound statement)
You need a statement to execute for the default case. The code you
have written is equivalent to:
- (vo
A break; is not required, but it does cause the compound statement
error to go away. Even with the break; inserted the other error still
occurs if the comments are removed.
On Apr 17, 2008, at 6:50 PM, Robert Kukuchka wrote:
you forgot the break;
___
On Thu, Apr 17, 2008 at 11:47 PM, Don Arnel <[EMAIL PROTECTED]> wrote:
> I've been working on a project for a few weeks now and suddenly today I get
> this error while building (see below). I was getting this same error in one
> of my real classes so after commenting out almost every bit of code an
On Apr 17, 2008, at 4:42 PM, Adam P Jenkins wrote:
I'm curious if anyone knows the rationale behind the decision to
make sending messages to nil be a no-op in ObjC. I've used a
number of other OO languages, including C++, Java, Python, Ruby,
Smalltalk, and Javascript, and in all of them,
On Apr 17, 2008, at 5:42 PM, Adam P Jenkins wrote:
I'm curious if anyone knows the rationale behind the decision to
make sending messages to nil be a no-op in ObjC. I've used a
number of other OO languages, including C++, Java, Python, Ruby,
Smalltalk, and Javascript, and in all of them, t
on 4/17/08 4:56 PM, [EMAIL PROTECTED] purportedly said:
> A break; is not required, but it does cause the compound statement
> error to go away. Even with the break; inserted the other error still
> occurs if the comments are removed.
>
> On Apr 17, 2008, at 6:50 PM, Robert Kukuchka wrote:
>
>>
The break isn't required, but something is. You could put
NSLog(@"defaulting"); after default:. Or you could put a semicolon; or
a lovely set of empty braces.
To fix the other problem, try this:
switch (1) {
case 1:
{
NSMutableArray *myArray=[[NSMutableArray a
Change it to:
- (void)TestFunction
{
switch (1) {
case 1:
{
NSMutableArray *myArray=[[NSMutableArray alloc]
init];
break;
}
}
}
No need to declare defa
Ah, that did the trick! I love mailing lists!
Many thanks to all who responded.
On Apr 17, 2008, at 7:15 PM, Michael Vannorsdel wrote:
Change it to:
- (void)TestFunction
{
switch (1) {
case 1:
{
NSMutableArray *my
On 18/04/2008, at 9:15 AM, Michael Vannorsdel wrote:
Change it to:
- (void)TestFunction
{
switch (1) {
case 1:
{
NSMutableArray *myArray=[[NSMutableArray alloc]
init];
break;
GCC is alerting you to the fact that the switch at the end of the
statement is unnecessary. If you really want to do something for all
cases, use default. Otherwise just omit it. Using the empty
statement (; by itself) will fool GCC, but an empty default case is
useless.
--Kyle Sluder
_
1 - 100 of 133 matches
Mail list logo