Re: does NSTextField always use UTF8 encoding

2008-06-17 Thread Andrew Farmer

On 17 Jun 08, at 23:16, Wayne Shao wrote:

In my UI, a user may type in any string into a NSTextField, e.g.
Chinese characters.

Do I assume the return value from

NSString * value = [textField stringValue]

is always encoded with UTF8?


NSStrings are encoding-independent. They represent strings, not  
sequences of bytes.


I need to convert this to a properly url encoded value as a GET  
parameter.


[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]  
will return a string with proper UTF-8 percent escaping.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


does NSTextField always use UTF8 encoding

2008-06-17 Thread Wayne Shao
Hi,

In my UI, a user may type in any string into a NSTextField, e.g.
Chinese characters.

Do I assume the return value from

NSString * value = [textField stringValue]

is always encoded with UTF8?

I need to convert this to a properly url encoded value as a GET parameter.

Thanks,
-- 
Wayne Shao
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


capture modifier key events

2008-06-17 Thread Apparao Mulpuri
Hi,

   I have a NSTextField, in which i have to update with new string
value when ever user presses Cmd, Control or Option keys. I have tried
with keyDown and controlDidChange methods. These are working with
combination of other keys includes nemuric, character and functional
keys.

   Is there any provision, to capture only modifier keys (with out
pressing on other keys) events in Cocoa.

Thanks & Regards,
- Apparao M.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Getting all subclasses

2008-06-17 Thread Omar Qazi

On Jun 17, 2008, at 10:19 PM, Laurent Cerveau wrote:


Hi

Is there a way to get all subclases of a class. I have a class that  
I would call abstract (although I did not find any real way to  
declare some methods as virtual) and would like to get a list of all  
"real" subclass implementations.


Thanks

laurent


If you have a bunch of classes that you want to check you can call  
[SomeClass isSubclassOf:anotherClass].


If you wrote the class yourself, what I would do is override the +  
initialize method to add the class to some kind of global array that  
you can access later. The runtime sends initialize to each class in a  
program exactly one time just before the class is sent its first  
message from within the program. So this will only work for each class  
that is actually used within the application.


Omar Qazi
Hello, Galaxy!
1.310.294.1593



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Getting all subclasses

2008-06-17 Thread Laurent Cerveau

Hi

Is there a way to get all subclases of a class. I have a class that I  
would call abstract (although I did not find any real way to declare  
some methods as virtual) and would like to get a list of all "real"  
subclass implementations.


Thanks

laurent
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Uli Kusterer

Am 17.06.2008 um 16:39 schrieb glenn andreas:
You can load views into tabs from multiple NIBs as needed - under  
10.5 using NSViewController (or some manual grunt work under 10.4).



 I have a UKNibOwner class that I use for stuff like it. See:


http://www.zathras.de/programming/cocoa/UKCrashReporter.zip/UKCrashReporter/

for the header and source file. There's a few caveats since it loads  
the NIB from its init method (meaning a subclass hasn't quite been  
initialized when its NIB gets loaded), but it might be a good start  
for seeing how to do the NIB-loading stuff if you still need 10.4  
support. I'm planning on doing a version that is modeled after  
NSViewController, but can't give an ETA.


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Josh de Lioncourt

Hi Louis and Andy,

I'm certainly looking at this suggestion, but another developer  
suggested that I may be better served by hooking into the keyboard  
input functionality of OpenGL.  Assuming that have focus on an  
NSWindow doesn't interfere with such an implementation, I'd be able to  
accomplish the input through a non-platform specific API, potentially  
making my code even more portable between Windows and OS X.


Is there any reason why I shouldn't consider OpenGL for input?


Josh de Lioncourt
Mac-cessibility: http://www.Lioncourt.com
Twitter: http://twitter.com/Lioncourt


"The rich declare themselves poor,
"And most of us are not sure,
"If we have too much,
"But we'll take our chances,
"'cause God stopped keeping score."
Praying for Time--George Michael




On Jun 17, 2008, at 5:03 PM, Andreas Monitzer wrote:


On Jun 18, 2008, at 01:22, Louis Gerbarg wrote:


It sounds like what you want to do is here is subclass NSApplication,
with a replacement implementation of sendEvent that decodes the
incoming events, marshals the NSEvent's parameters, then sends them  
to

your C++ code for processing. If your C++ code uses them you swallow
the event, if not you pass it onto the superclasses implementation  
and

the app code will handle them just like any other Cocoa application.


Note that this is just what I did for the X-server:

http://www.google.com/codesearch?hl=en&q=monitzer+show:Nu3rlWhknBM:x28_xYSo3mE:b82DNfVvtyQ&sa=N&cd=1&ct=rc&cs_p=http://gentoo.osuosl.org/distfiles/X430src-3.tgz&cs_f=xc/programs/Xserver/hw/darwin/quartz/XApplication.m

This can serve as an example on how to implement something like  
this. Just don't forget to declare this subclass to be the principal  
class of the application bundle.


andy


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


re: Dot syntax

2008-06-17 Thread Ben Trumbull
I've been playing with Core Data and the syntax I use to access a Core 
Data attribute.  In Mac OS X 10.4 I used syntax like:

[a valueForKeyPath @"b.selection.c"]
where b is a NSObjectController bound to a Core Data entity with Cocoa 
Bindings and c is an attribute of that entity.  In Mac OS X 10.5 I'm 
able to define

@property (retain) NSObjectController *b;
and now I can use syntax like:
[a.b.selection valueForKey @"c"]
Is there any way to take the last step so that I can use syntax like:
a.b.selection.c
to access the same attribute?


The . syntax is basically a uniform way of sending accessor methods. 
-valueForKey: does that and more.


So

a.b.selection.c

is equivalent to:

[[[a b] selection] c]

but that is NOT identical to:

[a valueForKeyPath @"b.selection.c"]

under all circumstances.  For example, if 'c' is '@count' or you've 
overridden -valueForUndefinedKey:



Do I have to subclass NSObjectController and NSManagedObject?


If [[a b] selection] gives you back a single object that is an 
instance of NSManagedObject, and 'c' is a property modeled by its 
NSEntityDescription, then no, you don't need a subclass.


On 10.5, Core Data will ensure that any NSManagedObject will always 
respond to accessor method invocations for any property defined in 
its NSEntityDescription.  Even if you do [[NSManagedObject alloc] 
initWithEntity:entity insertIntoManagedObjectContext:moc], the object 
you get back will handle any modeled properties' accessors methods.


If [[a b] selection] does not give you back an NSManagedObject 
instance or if it does something different than [a valueForKeyPath 
@"b.selection"] or if 'c' is not a modeled property, then the answer 
is yes.

--

-Ben
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: getting accurate file modification time?

2008-06-17 Thread Chris Suter


On 18/06/2008, at 1:04 PM, Angelo Chen wrote:


Hi,

I use the code at end to get modification timestamp of a file  
including seconds, it works well until I encounter following:


I have a file that is in the Document folder, the creation and  
modification date are both:2008-05-04 22:06:46 +0800


when this file is copied to a FAT volume, naturally the creation  
date is lost, modification date become:

2008-05-04 22:06:47 +0800


Any idea why this happens? Thanks,


This isn’t really Cocoa.

I suspect the reason is because the granularity of time stamps on FAT  
volumes is 2 seconds.


-- Chris



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: getting accurate file modification time?

2008-06-17 Thread Graham Cox

On further thought, I misunderstood.

Maybe the actual timestamp is getting rounded up on the FAT volume  
because it stores timestamps differently?




G.


On 18 Jun 2008, at 1:04 pm, Angelo Chen wrote:

when this file is copied to a FAT volume, naturally the creation  
date is lost, modification date become:

2008-05-04 22:06:47 +0800

Any idea why this happens? Thanks,


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: getting accurate file modification time?

2008-06-17 Thread Graham Cox
Umm, because you modified it? Copying it to a new volume is a  
modification.


G.


On 18 Jun 2008, at 1:04 pm, Angelo Chen wrote:

when this file is copied to a FAT volume, naturally the creation  
date is lost, modification date become:

2008-05-04 22:06:47 +0800

Any idea why this happens? Thanks,


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


getting accurate file modification time?

2008-06-17 Thread Angelo Chen
Hi,

I use the code at end to get modification timestamp of a file including 
seconds, it works well until I encounter following:

I have a file that is in the Document folder, the creation and modification 
date are both:2008-05-04 22:06:46 +0800

when this file is copied to a FAT volume, naturally the creation date is lost, 
modification date become:
2008-05-04 22:06:47 +0800

Any idea why this happens? Thanks,

Angelo


NSFileManager *fileManager = [NSFileManager defaultManager];
NSDictionary *fileAttributes = [fileManager fileAttributesAtPath:path 
traverseLink:YES];
fileModDate = [fileAttributes objectForKey:NSFileModificationDate];


  Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: noob question regarding (programmatic) bindings and data type coercion

2008-06-17 Thread Ken Thomases

On Jun 17, 2008, at 12:16 PM, Stuart Malin wrote:

1) from what (or where) does the property "value" of the NSTextField  
arise? Neither the class reference for NSTextField or NSControl have  
such an instance method (at least not that I've yet found).


Bindings are different than properties.  The names of bindings are in  
a different "namespace" than properties or keys (in the KVC/KVO  
sense).  A class declares what bindings it supports using the  
NSKeyValueBindingCreation informal protocol and its +exposeBinding:  
method.


The bindings supported by NSTextField are documented in the Cocoa  
Bindings Reference:


http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSTextField.html


2) I used "value" for the binding because that is how I saw some  
sample code. Given that I don't quite know what "value" is, I  
changed to bind to "intValue" (presuming that setIntValue would be  
invoked on the textField).  This works, but changed the behavior of  
the app in one small way:


In the Nib, the valueTextField has a string value "hello" in place  
because I wanted to see if the initial value of the Person's object  
would be displayed when the binding is established. When I bind to  
"value" the textField is immediately set to 0 (that is, I never see  
the word "hello"), but NOT when I bind to "intValue" the textField  
shows "hello" until I click the button to increase the age property  
-- why the difference?


3) Then I got curious about what ensures compliance of data types,  
and wondered if II'd cause runtime errors if I passed the wrong data  
type, so I tried changing the bind invocation to bind to  
"stringValue" -- that worked just fine. As did binding to  
"floatValue".  I'm presuming something must be coercing the person  
object's age (which is int data) but what? Is this an artifact of  
the control, the textField, or the binding mechanism?


4) Further, using "floatValue" does not cause the initial value of  
age (0) to be displayed (same result as with intValue), but using  
stringValue does (which matches use of "value"). Why?


None of "intValue", "stringValue" or "floatValue" are legitimate  
bindings for NSTextField.  Read the "How Do Bindings Work?" chapter of  
Cocoa Bindings Programming Topics  to see that a class must have custom logic to support whatever  
bindings it exposes.  Since bindings are built on top of KVC and KVO,  
you may be getting some seemingly correct behavior when you establish  
such unsupported bindings, but that's just accidental.


When you use those unsupported bindings, I'm betting that view- 
initiated changes are not propagated to the model.  Have you tried  
typing into your text field to see if that sets the Person object's age?


Cheers,
Ken
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: File System Notifications

2008-06-17 Thread Stephen J. Butler
On Tue, Jun 17, 2008 at 9:04 PM, Omar Qazi <[EMAIL PROTECTED]> wrote:
> I'm a little confused about file system notifications in Cocoa. In
> NSWorkspace, it says that the method for subscribing to file system
> notifications will always return NO, which seems useless to me. I know
> Carbon has the FNSubscribe() and FNUnsubscribe() functions, but can I use
> those to get a notification when another application opens a file? If not is
> there any way I can achieve this?

There isn't a Foundation/AppKit way to do it, but a couple people have
written wrappers for the Carbon and BSD APIs. You'll find this info
useful:


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


File System Notifications

2008-06-17 Thread Omar Qazi
I'm a little confused about file system notifications in Cocoa. In  
NSWorkspace, it says that the method for subscribing to file system  
notifications will always return NO, which seems useless to me. I know  
Carbon has the FNSubscribe() and FNUnsubscribe() functions, but can I  
use those to get a notification when another application opens a file?  
If not is there any way I can achieve this?


Omar Qazi
Hello, Galaxy!
1.310.294.1593



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Dot syntax

2008-06-17 Thread John Dalbec
I've been playing with Core Data and the syntax I use to access a Core  
Data attribute.  In Mac OS X 10.4 I used syntax like:

[a valueForKeyPath @"b.selection.c"]
where b is a NSObjectController bound to a Core Data entity with Cocoa  
Bindings and c is an attribute of that entity.  In Mac OS X 10.5 I'm  
able to define

@property (retain) NSObjectController *b;
and now I can use syntax like:
[a.b.selection valueForKey @"c"]
Is there any way to take the last step so that I can use syntax like:
a.b.selection.c
to access the same attribute?  Do I have to subclass  
NSObjectController and NSManagedObject?

Thanks,
John
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Grand Central Details

2008-06-17 Thread Bill Bumgarner

On Jun 17, 2008, at 6:02 PM, Michael Gardner wrote:
Too bad you can't avoid blocking at least occasionally with the  
event-driven APIs, meaning you still have to use threads to avoid it  
completely. And I fail to see what's so bad about having one thread  
per socket. Is it because Threads Are Hard?


In that case, it is because threads are relatively expensive.   Every  
thread adds a bit of memory use -- not insignificant given each  
individual thread's stack -- and scheduling overhead.   In this model,  
you'd expect that most threads will be blocked on I/O most of the  
time, but you might also likely find that performance goes to hell in  
a handbasket as soon as multiple sockets are lit up with inbound data.


And, yes, threads are hard, though -- in this case -- that hardness is  
a bit irrelevant in that the real challenge is how to get data *out*  
of the thread dealing with network I/O and *into* the threads dealing  
with data.


b.bum



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Where to store document window specific setup data

2008-06-17 Thread Markus Spoettl

Hello List,

  this is probably something that sounds stupid but as I'm new to the  
Mac, I'm not entirely sure how this is done right. I have a design  
decision to make on how (or even if) to store window setup data.


I have a document base application. The document window has a couple  
of user-customizable properties such as splitter widths and whether  
certain views are shown. The user can also change properties on how  
the data is presented. This all is represented in the UI by various  
split views, sliders, buttons, checkboxes, the window location and  
size and so forth.


I'm wondering if there was a design guide on how to store those kind  
of things. Does a document usually restore it's entire window state  
independently, is it stored only once globally (so last closed wins)  
or something entirely different?


Also, if that data is it stored on a per document basis, is it stored  
as a part of the document data or in the user defaults data. Storing  
in the user default database (or someplace else) would remember all  
documents opened by a user but not influence the look and feel if its  
opened by someone or somewhere else.


Thanks for any input!

Regards
Markus
--
__
Markus Spoettl



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Grand Central Details

2008-06-17 Thread I. Savant
Though sometimes I wish Apple had an NDA-required list. Even if I  
had to send a notarized form somewhere, the whole NDA thing gets  
annoying sometimes.


  Irrelevant. It's a legally binding agreement and this happens to be  
their list. Nobody likes it much (who would?) but, as has been  
mentioned on this list many times, trying to argue that point here is  
completely and utterly pointless.


  That's not a conceit; you're just preaching to the choir. ;-)

 I read the press release, and it said "Grand Central is cool, it  
slices your bread for you".

 But how exactly does it do that?


  If you're "in", you can ask DTS for now or wait for documentation  
to come out. It's presumably many months away from release, so the  
actual API can be considered to be "in flux", making documentation  
difficult (and therefore sparse) until it solidifies. In its current  
state, it's likely meant for you to experiment with via an example. A  
lack of forum is bemoaned several times a year almost as some sort of  
superstitious ceremony to scare away the evil spirits and end the  
apocalyptic drought.


  Dreary.

  If you're "out", well, I myself was not at WWDC this year and  
curiosity is eating me alive. I admit I read very closely to see if  
your message contained any juicy tidbits. ;-)


--
I.S.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Grand Central Details

2008-06-17 Thread Michael Gardner

On Jun 17, 2008, at 7:17 PM, Pierce T. Wetter III wrote:

If you've ever used CoreNetwork you might get the idea, because  
CFNetwork is event-driven, rather then the shitty thread-per-socket  
style that CS students are taught. So you can easily handle a  
zillion connections with CoreNetwork.


Too bad you can't avoid blocking at least occasionally with the event- 
driven APIs, meaning you still have to use threads to avoid it  
completely. And I fail to see what's so bad about having one thread  
per socket. Is it because Threads Are Hard?


-Michael
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: unexpected nil outlet

2008-06-17 Thread Jonathan Hess

Hey William -

Assuming everything else is correct, it looks like your problem is  
that you're poking at 'window' too early. Your object receives the  
init message before IB has a chance to establish connections. If you  
think about it, IB has to create all of the objects before it can  
connect them. IB is still in the middle of the create objects phase of  
loading your NIB.


If you move your code to awakeFromNib you should see the results you  
expect.


So, remove the init method and replace it with:

- (void)awakeFromNib {
[window setDelegate:self];
}

Jon Hess

On Jun 17, 2008, at 5:47 PM, William Squires wrote:

I'm trying to code a solution to the challenge "Make a Delegate" in  
chapter 6 of the new Hillegaas book. Here is my AppController.h


@interface AppController : NSObject
{
IBOutlet NSWindow *window;
}

@end

and my AppController.m

#import 
#import "AppController.h"

@implementation AppController

- (id) init
{
NSLog(@"init");
if ([super init])
 {
 // Register self as delegate
 NSLog(@"window = %@", window);
 [window setDelegate:self];
 }
return self;
}

- (NSSize) windowWillResize:(NSWindow *)sender toSize: 
(NSSize)frameSize

{
NSSize newSize;

NSLog(@"windowWillResize:toSize:");
newSize.height = frameSize.height;
newSize.width = frameSize.height * 2;
return newSize;
}

I then launched IB on MainMenu.xib, added an Object to MainMenu.xib  
window, changed its class to AppController, and connected its outlet  
to the window (right-click on object, then drag from the circle to  
the window.) I can confirm the connection is made in IB, but when I  
launch the app in Xcode (3.1), I get the message:


2008-16-07 19:40:44:335 WindowServer[2413:10b] window = (null)

from my NSLog() in the init() method! What (simple, stupid,  
dumbhead) thing have I missed?


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jhess%40apple.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: unexpected nil outlet

2008-06-17 Thread William Squires
Oh, and never mind. No one need respond to this - problem solved. I  
put the delegate caca in the awakeFromNib() method instead...


On Jun 17, 2008, at 7:49 PM, William Squires wrote:

Oh, there's an "@end" at the end of the .m file, too, before anyone  
jumps on this... :D


On Jun 17, 2008, at 7:47 PM, William Squires wrote:

I'm trying to code a solution to the challenge "Make a Delegate"  
in chapter 6 of the new Hillegaas book. Here is my AppController.h


@interface AppController : NSObject
{
IBOutlet NSWindow *window;
}

@end

and my AppController.m

#import 
#import "AppController.h"

@implementation AppController

- (id) init
{
NSLog(@"init");
if ([super init])
  {
  // Register self as delegate
  NSLog(@"window = %@", window);
  [window setDelegate:self];
  }
return self;
}

- (NSSize) windowWillResize:(NSWindow *)sender toSize:(NSSize) 
frameSize

{
NSSize newSize;

NSLog(@"windowWillResize:toSize:");
newSize.height = frameSize.height;
newSize.width = frameSize.height * 2;
return newSize;
}

I then launched IB on MainMenu.xib, added an Object to  
MainMenu.xib window, changed its class to AppController, and  
connected its outlet to the window (right-click on object, then  
drag from the circle to the window.) I can confirm the connection  
is made in IB, but when I launch the app in Xcode (3.1), I get the  
message:


2008-16-07 19:40:44:335 WindowServer[2413:10b] window = (null)

from my NSLog() in the init() method! What (simple, stupid,  
dumbhead) thing have I missed?




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/wsquires% 
40satx.rr.com


This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: unexpected nil outlet

2008-06-17 Thread David Wilson
- awakeFromNib

Is the function you should be looking at.

On Tue, Jun 17, 2008 at 8:47 PM, William Squires <[EMAIL PROTECTED]> wrote:
> I'm trying to code a solution to the challenge "Make a Delegate" in chapter
> 6 of the new Hillegaas book. Here is my AppController.h
>
> @interface AppController : NSObject
> {
> IBOutlet NSWindow *window;
> }
>
> @end
>
> and my AppController.m
>
> #import 
> #import "AppController.h"
>
> @implementation AppController
>
> - (id) init
> {
> NSLog(@"init");
> if ([super init])
>  {
>  // Register self as delegate
>  NSLog(@"window = %@", window);
>  [window setDelegate:self];
>  }
> return self;
> }
>
> - (NSSize) windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
> {
> NSSize newSize;
>
> NSLog(@"windowWillResize:toSize:");
> newSize.height = frameSize.height;
> newSize.width = frameSize.height * 2;
> return newSize;
> }
>
> I then launched IB on MainMenu.xib, added an Object to MainMenu.xib window,
> changed its class to AppController, and connected its outlet to the window
> (right-click on object, then drag from the circle to the window.) I can
> confirm the connection is made in IB, but when I launch the app in Xcode
> (3.1), I get the message:
>
> 2008-16-07 19:40:44:335 WindowServer[2413:10b] window = (null)
>
> from my NSLog() in the init() method! What (simple, stupid, dumbhead) thing
> have I missed?
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/david.t.wilson%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>



-- 
- David T. Wilson
[EMAIL PROTECTED]
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: unexpected nil outlet

2008-06-17 Thread William Squires
Oh, there's an "@end" at the end of the .m file, too, before anyone  
jumps on this... :D


On Jun 17, 2008, at 7:47 PM, William Squires wrote:

I'm trying to code a solution to the challenge "Make a Delegate" in  
chapter 6 of the new Hillegaas book. Here is my AppController.h


@interface AppController : NSObject
{
IBOutlet NSWindow *window;
}

@end

and my AppController.m

#import 
#import "AppController.h"

@implementation AppController

- (id) init
{
NSLog(@"init");
if ([super init])
  {
  // Register self as delegate
  NSLog(@"window = %@", window);
  [window setDelegate:self];
  }
return self;
}

- (NSSize) windowWillResize:(NSWindow *)sender toSize:(NSSize) 
frameSize

{
NSSize newSize;

NSLog(@"windowWillResize:toSize:");
newSize.height = frameSize.height;
newSize.width = frameSize.height * 2;
return newSize;
}

I then launched IB on MainMenu.xib, added an Object to MainMenu.xib  
window, changed its class to AppController, and connected its  
outlet to the window (right-click on object, then drag from the  
circle to the window.) I can confirm the connection is made in IB,  
but when I launch the app in Xcode (3.1), I get the message:


2008-16-07 19:40:44:335 WindowServer[2413:10b] window = (null)

from my NSLog() in the init() method! What (simple, stupid,  
dumbhead) thing have I missed?




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Convert CGImageRef from BGR to RGB

2008-06-17 Thread Rodrigo Gutierrez
Let's just say that vImage isn't an option on the platform I would  
like to develop for. I was hoping there would be an approach that used  
a CGColorSpaceRef and the CGImageCreateCopyWithColorSpace method. I'm  
not sure if this is a valid approach though since the apple docs for  
doing these types of things are fairly sparse IMHO. The Quartz 2D  
Programming Guide even mentions BGR vs RGB color profiles, but doesn't  
clearly say to go from one profile to another.


-rod

If you get your image data into a bitmap form you can use vImage's  
(Accelerate Framework) permute functions to quickly rearrange the  
channel ordering. There might be another way using color spaces, but  
none that I know off hand.



On Jun 16, 2008, at 5:09 PM, Rodrigo Gutierrez wrote:

I'm pulling data off a streaming web camera, and it appears that the  
camera sends jpeg data using the BGR color space. Right now I am  
creating a CGImageRef by doing the following:


CGDataProviderRef provider = CGDataProviderCreateWithData(NULL,  
jpegData, jpegDataLength, NULL);
CGImageRef imageRef = CGImageCreateWithJPEGDataProvider(provider,  
NULL, true, kCGRenderingIntentDefault);


Where jpegData is the payload of several packets concatenated, and  
jpegDataLength is the length of the jpegData buffer... basic stuff.  
This approach gets me an image but my reds and blues are flipped. I  
checked out the documentation and google and I couldn't find a clear  
way to swap the red and blue using Cocoa. Can someone steer me in  
the right direction?


I appreciate any help.


"I love deadlines. I like the whooshing sound they make as they fly  
by." --Douglas Adams


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


unexpected nil outlet

2008-06-17 Thread William Squires
I'm trying to code a solution to the challenge "Make a Delegate" in  
chapter 6 of the new Hillegaas book. Here is my AppController.h


@interface AppController : NSObject
{
IBOutlet NSWindow *window;
}

@end

and my AppController.m

#import 
#import "AppController.h"

@implementation AppController

- (id) init
{
NSLog(@"init");
if ([super init])
  {
  // Register self as delegate
  NSLog(@"window = %@", window);
  [window setDelegate:self];
  }
return self;
}

- (NSSize) windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize
{
NSSize newSize;

NSLog(@"windowWillResize:toSize:");
newSize.height = frameSize.height;
newSize.width = frameSize.height * 2;
return newSize;
}

I then launched IB on MainMenu.xib, added an Object to MainMenu.xib  
window, changed its class to AppController, and connected its outlet  
to the window (right-click on object, then drag from the circle to  
the window.) I can confirm the connection is made in IB, but when I  
launch the app in Xcode (3.1), I get the message:


2008-16-07 19:40:44:335 WindowServer[2413:10b] window = (null)

from my NSLog() in the init() method! What (simple, stupid, dumbhead)  
thing have I missed?


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Grand Central Details

2008-06-17 Thread Pierce T. Wetter III


On Jun 17, 2008, at 5:31 PM, David Wilson wrote:


WWDC is still under NDA, I'm pretty sure no one's allowed to say
anything here beyond whatever mentions have been made to the press.


 Well, Apple people are, once they obtain the appropriate  
permissions. Asking on the dev lists is often the best way to nudge  
them a bit, or sometimes someone says "Hint: check here and here on  
ADC".


 Though sometimes I wish Apple had an NDA-required list. Even if I  
had to send a notarized form somewhere, the whole NDA thing gets  
annoying sometimes.


 I read the press release, and it said "Grand Central is cool, it  
slices your bread for you".


 But how exactly does it do that?

 Pierce

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Grand Central Details

2008-06-17 Thread Ricky Sharp


On Jun 17, 2008, at 7:17 PM, Pierce T. Wetter III wrote:

 I had a release the week before, plus we didn't have enough tickets  
since WWDC was sold out, so I didn't go. Are there any details on  
Grand Central?


First, Snow Leopard is under NDA; cannot discuss it here.

If you've ever used CoreNetwork you might get the idea, because  
CFNetwork is event-driven, rather then the [snipped] thread-per- 
socket style that CS students are taught.


Second, there's no need for profanity.

___
Ricky A. Sharp mailto:[EMAIL PROTECTED]
Instant Interactive(tm)   http://www.instantinteractive.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: nib and xib

2008-06-17 Thread William Squires
Okay, thanks to all who answered. I think we can 'kill -9' this topic  
now... :)


On Jun 16, 2008, at 7:54 PM, William Squires wrote:


What's the difference? (assuming 'xib's aren't under NDA here...)



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Grand Central Details

2008-06-17 Thread David Wilson
WWDC is still under NDA, I'm pretty sure no one's allowed to say
anything here beyond whatever mentions have been made to the press.

On Tue, Jun 17, 2008 at 8:17 PM, Pierce T. Wetter III
<[EMAIL PROTECTED]> wrote:
>
>  I had a release the week before, plus we didn't have enough tickets since
> WWDC was sold out, so I didn't go. Are there any details on Grand Central?
>
>  Things I would like it to be:
>
> 1. An implementation of SEDA. That stands for
> staged-event-driven-architecture. The basic idea is that you break things up
> into different styles of work queues. The OS then dynamically allocates
> threads to the work queues and figures out the optimum number of threads for
> each queue. For instance, an I/O queue might be quite happy with a single
> thread servicing it, because mostly they dump their data, then wait. A queue
> of tasks that did actual computation could use as many threads as there are
> cores.
>
> If you've ever used CoreNetwork you might get the idea, because
> CFNetwork is event-driven, rather then the shitty thread-per-socket style
> that CS students are taught. So you can easily handle a zillion connections
> with CoreNetwork.
>
> This could probably be built as an extension to NSOperation, but
> ideally, you'd want simple wrappers for all the I/O operations in
> Foundation.
>
> 2. A better multi-core aware scheduler, like ULE from FreeBSD.
>
> 3. Something unimaginably cool.
>
>  Pierce
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/david.t.wilson%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>



-- 
- David T. Wilson
[EMAIL PROTECTED]
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: objects aren't added to NSMutableArray

2008-06-17 Thread Adam R. Maxwell


On Jun 17, 2008, at 8:16 PM, Jens Alfke wrote:



On 17 Jun '08, at 5:02 PM, Daniel Richman wrote:


I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null)


That's a tip-off that the array pointer is nil, by the way — - 
objectAtIndex: *never* returns nil, because it's not legal to store  
nil values in an NSArray. (Same goes for objectForKey: in  
NSDictionary.)


-[NSDictionary objectForKey:] returns nil if the specified key does  
not have an associated value in the dictionary.


--
Adam

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Grand Central Details

2008-06-17 Thread Pierce T. Wetter III


  I had a release the week before, plus we didn't have enough tickets  
since WWDC was sold out, so I didn't go. Are there any details on  
Grand Central?


  Things I would like it to be:

 1. An implementation of SEDA. That stands for staged-event- 
driven-architecture. The basic idea is that you break things up into  
different styles of work queues. The OS then dynamically allocates  
threads to the work queues and figures out the optimum number of  
threads for each queue. For instance, an I/O queue might be quite  
happy with a single thread servicing it, because mostly they dump  
their data, then wait. A queue of tasks that did actual computation  
could use as many threads as there are cores.


 If you've ever used CoreNetwork you might get the idea, because  
CFNetwork is event-driven, rather then the shitty thread-per-socket  
style that CS students are taught. So you can easily handle a zillion  
connections with CoreNetwork.


 This could probably be built as an extension to NSOperation, but  
ideally, you'd want simple wrappers for all the I/O operations in  
Foundation.


 2. A better multi-core aware scheduler, like ULE from FreeBSD.

 3. Something unimaginably cool.

 Pierce
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: objects aren't added to NSMutableArray

2008-06-17 Thread Jens Alfke


On 17 Jun '08, at 5:02 PM, Daniel Richman wrote:


I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null)


That's a tip-off that the array pointer is nil, by the way — - 
objectAtIndex: *never* returns nil, because it's not legal to store  
nil values in an NSArray. (Same goes for objectForKey: in NSDictionary.)


—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: objects aren't added to NSMutableArray

2008-06-17 Thread James Walker

Daniel Richman wrote:
I've got an object which has an NSMutableArray as an instance variable. 
If, in one of my methods, I try to call

[myArray addObject:@"this is a test"];   (for example),

I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null), and
[myArray count];
returns zero.

However, if I just declare the NSMutableArray inside one of the methods 
of the object, everything works fine. However, this is clearly not an 
optimal solution because the array is destroyed after the method 
finishes executing.


I posted a sample project at 
http://danielrichman.com/tmp/NSMutableArray_Problem.tar.gz .


You declared your instance variable, but you didn't create the array. 
You're trying to manipulate a variable that points who knows where. 
Somewhere, such as in some initialization method, you'd need something 
like myArray = [[NSMutableArray alloc] initWithCapacity: 10].  (Typed 
into e-mail, not tested.)

--
  James W. Walker, Innoventive Software LLC
  
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: objects aren't added to NSMutableArray [solved]

2008-06-17 Thread Daniel Richman
Makes perfect sense. I hadn't thought about that since I've been doing a 
lot of Interface Builder work recently, and of course those objects get 
allocated and initialized automatically.


Thanks.


Robert Kukuchka wrote:

You're not calling [[numbers alloc] init];

at the point when you try to addObject you're sending a message to 
nil, which is acceptable under Objective-C

On 17-Jun-08, at 5:02 PM, Daniel Richman wrote:

I've got an object which has an NSMutableArray as an instance 
variable. If, in one of my methods, I try to call

[myArray addObject:@"this is a test"];   (for example),

I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null), and
[myArray count];
returns zero.

However, if I just declare the NSMutableArray inside one of the 
methods of the object, everything works fine. However, this is 
clearly not an optimal solution because the array is destroyed after 
the method finishes executing.


I posted a sample project at 
http://danielrichman.com/tmp/NSMutableArray_Problem.tar.gz .


Thanks!
Daniel
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rob.kukuchka%40mac.com

This email sent to [EMAIL PROTECTED]



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: objects aren't added to NSMutableArray

2008-06-17 Thread Robert Kukuchka

You're not calling [[numbers alloc] init];

at the point when you try to addObject you're sending a message to  
nil, which is acceptable under Objective-C

On 17-Jun-08, at 5:02 PM, Daniel Richman wrote:

I've got an object which has an NSMutableArray as an instance  
variable. If, in one of my methods, I try to call

[myArray addObject:@"this is a test"];   (for example),

I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null), and
[myArray count];
returns zero.

However, if I just declare the NSMutableArray inside one of the  
methods of the object, everything works fine. However, this is  
clearly not an optimal solution because the array is destroyed after  
the method finishes executing.


I posted a sample project at http://danielrichman.com/tmp/NSMutableArray_Problem.tar.gz 
 .


Thanks!
Daniel
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rob.kukuchka 
%40mac.com


This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


NSURLConnection didReceiveAuthenticationChallenge weirdness

2008-06-17 Thread Paul E. Robichaux
I'm trying to properly respond to authentication challenges by overriding 
didReceiveAuthenticationChallenge. In the init method of my custom object, I 
take the user name and password passed in and create a NSURLCredential:

EWScreds = [NSURLCredential credentialWithUser: inUserName
   password: inPassword

persistence:NSURLCredentialPersistenceForSession];

When I get an authentication challenge, I answer it with the stored credential:

-(void)connection:(MyURLConnection *)connection
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge 
*)challenge
{
if ([challenge previousFailureCount] == 0)
{
   [[challenge sender] useCredential:EWScreds
forAuthenticationChallenge:challenge];
}
else
NSLog(@"Authentication failed on attempt %d", [challenge 
previousFailureCount]);
}

This fails 100% of the time, even though the user name and password are 
correct. If I create a new credential using literal strings for the user name 
and password, like below, the auth challenge succeeds.

  NSURLCredential *newCreds = nil;
newCreds = [NSURLCredential credentialWithUser: @"[EMAIL PROTECTED]"
password: @"AGreatPassword"
persistence:NSURLCredentialPersistenceNone];
  [[challenge sender] useCredential:newCreds forAuthenticationChallenge: 
challenge];

I’ve verified that the password and user names match in both credentials (by 
using the user and password accessors on the credential objects). They appear 
to match. I’d appreciate any suggestions on what I might be doing wrong with 
this. Thanks in advance!

Cheers,
_Paul
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Andreas Monitzer

On Jun 18, 2008, at 01:22, Louis Gerbarg wrote:


It sounds like what you want to do is here is subclass NSApplication,
with a replacement implementation of sendEvent that decodes the
incoming events, marshals the NSEvent's parameters, then sends them to
your C++ code for processing. If your C++ code uses them you swallow
the event, if not you pass it onto the superclasses implementation and
the app code will handle them just like any other Cocoa application.


Note that this is just what I did for the X-server:

http://www.google.com/codesearch?hl=en&q=monitzer+show:Nu3rlWhknBM:x28_xYSo3mE:b82DNfVvtyQ&sa=N&cd=1&ct=rc&cs_p=http://gentoo.osuosl.org/distfiles/X430src-3.tgz&cs_f=xc/programs/Xserver/hw/darwin/quartz/XApplication.m

This can serve as an example on how to implement something like this.  
Just don't forget to declare this subclass to be the principal class  
of the application bundle.


andy

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


objects aren't added to NSMutableArray

2008-06-17 Thread Daniel Richman
I've got an object which has an NSMutableArray as an instance variable. 
If, in one of my methods, I try to call

[myArray addObject:@"this is a test"];   (for example),

I get no error, but the object isn't added. If I try to do
[myArray objectAtIndex:0];
I get (null), and
[myArray count];
returns zero.

However, if I just declare the NSMutableArray inside one of the methods 
of the object, everything works fine. However, this is clearly not an 
optimal solution because the array is destroyed after the method 
finishes executing.


I posted a sample project at 
http://danielrichman.com/tmp/NSMutableArray_Problem.tar.gz .


Thanks!
Daniel
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Louis Gerbarg
On Tue, Jun 17, 2008 at 2:42 PM, Josh de Lioncourt
<[EMAIL PROTECTED]> wrote:

>> 2. Complex keyboard control.  We need to be able to intercept keystrokes,
>> be able to determine when keys are pressed or released, held in combination,
>> etc.  This includes the pressing of modifier keys alone.  We need to let
>> these keys pass through to the OS unless the game has need of them.  Many
>> games do this sort of keyboard control.  Under Windows we used DirectInput,
>> a component of DirectX to accomplish this.
>>

It sounds like what you want to do is here is subclass NSApplication,
with a replacement implementation of sendEvent that decodes the
incoming events, marshals the NSEvent's parameters, then sends them to
your C++ code for processing. If your C++ code uses them you swallow
the event, if not you pass it onto the superclasses implementation and
the app code will handle them just like any other Cocoa application.

Depending on exactly how complicated your internal event
representation is this might be anywhere from a couple dozen to a
couple hundred lines of objc, but it should be identical from project
to project once you get it done. This kind of thing can be a bit on
the tricky side, but since it should be short and reusable for
basically all of your projects that is probably acceptable.

>> 3. Obviously, timing is everything in most computer games.  Timing down to
>> milliseconds is essential.  Nanoseconds is overkill.  I understand the
>> concepts for getting the timing working with mach_absolute_time() on the Mac
>> using Duration objects to measure the time in milli/micro seconds, but have
>> yet to actually come up with working code.  I suspect this is because I am
>> far from adept in Objective C at this point.  I don't believe I can write
>> such code in C++ to take advantage of mach_absolute_time(), but if would
>> love to be proven wrong.

There is nothing preventing you from directly calling
mach_absolute_time from C++ if you want, it is a pure C function.. I
would recommend using gettimeofday() instead. It has millisecond
precision, and is a standard POSIX API that tons of OSes support (so
there is lots of sample code out there).

Louis
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cocoa-dev Digest, Vol 5, Issue 1071

2008-06-17 Thread Gordon Apple
At the present time, I'm not doing animation.  I just want a layer stack
I can draw into, with one layer for previous drawings and one normal user
drawing activities.  Later, I want to add more layers for user annotation
and (possibly animated) attention directors.  So far, I haven't even been
able to get the drawing right-side-up, no matter what I tell the context.
The underlying view uses flipped coordinates, mainly because some objects
use text and NSLayoutManager just doesn't work with un-flipped views.  I
also haven't been able to get visual feedback when drawing a shape.  I'm
sure I'll eventually figure it out, but it's not as easy as I thought it
would be.

> I am a little bit confused by Scott's statement that "if you use
> layers-hosting views, then you should not rely on view drawing at all ...
> conversely, if you use layer-backed views then you should not directly access
> the views."
>  
> I may just misunderstand what Scott means, but I have used layer-backed views
> with great success.  In a typical scenario, I implement a custom NSView
> subclass just like I would before Core Animation Layers.  To animate the
> view's drawing, I use a timer to trigger calls to -setNeedsDisplay: and
> implement -drawRect: to draw whatever stage of the animation is appropriate
> based on the current time. I have not had any problems when my ordinary custom
> views become layer backed... I don't think...  And I get transparency and
> layering over opengl content for "free" with layer-backed views.
>  
> I used to do similar things before Core Animation too.  Apple provided an
> "overlay view" sample that did the same things.
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSDocument and default file names.

2008-06-17 Thread Godfrey van der Linden
Thanks.  It was indeed overriding the displayName, obvious when you  
think about it.  I think I'll ping docs and ask them to add a comment  
to that effect to [NSDocument displayName].


Godfrey

On 2008-06-18, at 6:27 AM, Quincey Morris wrote:



On Jun 17, 2008, at 00:36, Godfrey van der Linden wrote:

I have been lurking on this list for a while.  It is interesting to  
be on the other side, I used to hang around answering questions on  
the kernel lists oh well, even kernel developers can become indie  
development occasionally ;-)


When I create a new NSPersistentDocument, I recognise it is new and  
ask the user a series of questions to configure the software.  From  
the questions I ask I can get a pretty good guess at what the  
basename of the new document will be, I just don't want to guess  
what the directory will be.


So here is my issue.  How do I suggest to the persistent document  
that it should default the filename to the one I suggest and not  
use 'untitled'.  If I was using NSSavePanel directly I'd just tell  
it what I wanted but the NSDocument is trying to be helpful!  Is  
this just a case of not trying to program around the libraries?


I think overriding -[NSDocument displayName] (to return your  
proposed name for new documents) will do what you want. IIRC, that's  
where the name shown in the initial Save dialog comes from. If, in  
addition, you want the window titles to indicate the difference  
between a new and an already-saved document, you could use - 
[NSWindowController windowTitleForDocumentDisplayName:] to further  
customize window titles without messing up the name in the Save  
dialog.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/gvdl%40mac.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Josh de Lioncourt

Hi Scott,

On Jun 17, 2008, at 12:31 PM, Scott Ribe wrote:

I don't even know that it needs to be off-list. Try giving just a  
little bit
more info about what you want to do. I have an idea how you might  
approach

setting this up, but I'm not clear if it's based on an accurate
understanding of your goals.

OK, I will try to lay them out more concisely here.

The company I work for (www.DraconisEntertainment.com) develops  
computer games for the blind.  THey are very similar to video games,  
but rely on an entirely audio game environment.  They range from  
simple 2D board-style games to complex RPG-style games with rich 3D  
environments, rendered in 3D audio.


Our old titles are Windows only, and aging rapidly, as they were  
acquired by us from a now defunct company.  We want to rewrite them,  
mainly in C++, for cross compatibility under both Windows and Mac OS  
X, as a huge number of blind computer users are making the switch  
and requesting our games for that platform.  I have been a Mac  
convert for several years now, and though a newbie to Mac  
development, am not new to the Mac by any stretch.


The games, when boiled down to their most basic components, consist  
of:


1. Audio Ui. (We believe we've settled on a cross-platform audio  
engine that offers a clean interface for working with OpenAL to do  
both 2D and 3D audio that fits our requirements.)


2. Complex keyboard control.  We need to be able to intercept  
keystrokes, be able to determine when keys are pressed or released,  
held in combination, etc.  This includes the pressing of modifier  
keys alone.  We need to let these keys pass through to the OS unless  
the game has need of them.  Many games do this sort of keyboard  
control.  Under Windows we used DirectInput, a component of DirectX  
to accomplish this.


3. Obviously, timing is everything in most computer games.  Timing  
down to milliseconds is essential.  Nanoseconds is overkill.  I  
understand the concepts for getting the timing working with  
mach_absolute_time() on the Mac using Duration objects to measure  
the time in milli/micro seconds, but have yet to actually come up  
with working code.  I suspect this is because I am far from adept in  
Objective C at this point.  I don't believe I can write such code in  
C++ to take advantage of mach_absolute_time(), but if would love to  
be proven wrong.


4. Limited GUI, primarily for registration of the product via  
entering a registration key.


I had initially considered expanded upon the GUI, to include game  
menus in OS X's Main menu, but given the difficulty building the  
GUI, had pretty much decided to revert back to audio-only game  
menus, which is how are current titles work under Windows.


We need the GUI to be accessible with VoiceOver on the Mac side.   
This limits us to Cocoa UI elements or Java Swing.  I have little  
experience with Java, which is very inaccessible under Windows for  
the blind, so not really an attractive option.


5. We want the bulk of the code, especially game logic/control, to  
be compilable under both Windows and Mac. My goal is to get Mac  
versions working under Mac first, then moving the reusable code to  
projects with Visual Studio.net 2008 under Windows, writing Windows  
specific code for the necessary aspects of the project.


I have a lot of coding experience in a number of languages, though  
some of that is a little rusty at present.  I'm brushing up  
currently on my C++ which I have not used in several years.  Most of  
my recent experience is with Visual Basic and C#.net.  I have also  
developed for the web with PHP/HTML/JavaScript, etc.


I hope this provides a better representation of what I hope to  
accomplish.  Please ask if anything is unclear.


Josh de Lioncourt
Mac-cessibility: http://www.Lioncourt.com
Twitter: http://twitter.com/Lioncourt


"The rich declare themselves poor,
"And most of us are not sure,
"If we have too much,
"But we'll take our chances,
"'cause God stopped keeping score."
Praying for Time--George Michael



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Displaying live NSSlider value

2008-06-17 Thread Omar Qazi


On Jun 17, 2008, at 1:19 PM, Andy Klepack wrote:

I have an NSSlider and while the drag is in progress I would like to  
display the value in a text field. When the drag completes I would  
like the new value to get set in the user preferences and an action  
executed.


As far as I can tell I'll have to set the slider to send its action  
continually in order to find out that value has changed. If that's  
so then I would need a way to determine whether the drag had  
completed and then behave appropriately.


Am I wrong, is there actually some sort of delegate method like  
"valueDidChange:" that could be used to differentiate the drag  
events from the drag-complete event? If I do have to do the  
determination in the action itself how would I find out that the  
drag completed?


This is probably a common usage pattern for a slider but I haven't  
found any previous discussion. Ideally I'd like to display the value  
and its changes in a tooltip as the user drags but that also has  
proven difficult to do.



Bindings? Perhaps I didn't understand your question, since nobody else  
has suggested this, but couldn't you bind the value of the slider to a  
controller, and it set the user preferences / execute the action in  
the accessor method?


Omar Qazi
Hello, Galaxy!
1.310.294.1593



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

RE: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Matthew Youney
I have proceeded in the direction of the tab container today.  Quite
(extremely) easy to do.  Performance is fine.  All of the Cocoa UI objects
seem very lightweight.  I will probably "weigh things down" a bit with some
images, etc. later on.  I do really like the look and feel of the Cocoa/Mac
UI, as do my customers, and the rest of the world I guess.

Also, as a side note:
The structure, documentation of Cocoa, as well as observation of this forum
has helped me to evolve (clean up) my OI technique, and hopefully take my
code to the next level.  Although I have always been a very "hardware
oriented" programmer, and I am enjoying this experience.  A bit of a
learning curve, but anything worth doing...

I just do not want to get into any bad habits early on here, and appreciate
any advice and/or criticism.

Thanks,
Matt

-Original Message-
From: Jens Alfke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2008 4:35 PM
To: Matthew Youney
Cc: Graham Cox; Cocoa
Subject: Re: Newbie interface questions - multiple "modal" windows


On 17 Jun '08, at 7:30 AM, Matthew Youney wrote:

> This certainly can be easily done using a tab control.  The downside
> is that
> the entire NIB is loaded at once, adversely affecting performance/
> resources.

Have you found this to be true in actual operation, or do you just
suspect that it would be slow? I think it would take a very complex
nib, with hundreds of controls, to cause an objectionable pause on
load. Especially since it sounds like you'd load this when the
application first launches and keep it around thereafter.

There are other valid reasons for using multiple nibs - it keeps them
simpler and easier to work with - but don't let premature optimization
alone dictate what you do.

-Jens


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Calendar Store for iCal Server calendar...

2008-06-17 Thread Omar Qazi


On Jun 17, 2008, at 2:12 PM, Charles E. Heizer wrote:


Hello,
I'm trying to find more info on how to get access to calendars  
stored on a
iCal server. Everything I'm finding is for the local iCal calendar  
store.





Charles:

As far as I know (and a quick google search seems to confirm this),  
Apple doesn't provide and API for accessing iCal server. However,  
since iCal Sever is based on the open CalDAV protocol, there is most  
probably an API out there that will let you work with the iCal sever.  
If there isn't a native Cocoa framework, you can still use something  
in C, implement one yourself, or, if you're feeling rebellious, check  
to see if Apple has a framework in /System/Library/Private Frameworks.  
Of course using a private framework is not recommended.


Additionally, if the user is already syncing with the iCal sever in  
iCal, changes to the local calendar should be reflected on the server  
automatically.


Omar Qazi
Hello, Galaxy!
1.310.294.1593



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Keys dependent on NSArrayController's selection

2008-06-17 Thread Hamish Allan
On Thu, May 8, 2008 at 8:02 PM, Sean McBride <[EMAIL PROTECTED]> wrote:

> On 5/8/08 1:45 PM, Dave Dribin said:
>
>>On May 8, 2008, at 9:22 AM, Sean McBride wrote:
>>
>>> On 5/8/08 1:53 AM, Dave Dribin said:
>>>
 For kicks, I did try "peopleController.selectionIndex" as well as
 "peopleController.selectedObjects" to no avail.
>>>
>>> So it seems you have observed the same as I: that
>>> keyPathsForValuesAffectingValueForKey does not seem to work with key
>>> paths, despite the docs saying it should.

I recently tried to make a key dependent on NSArrayController's
selection and ran into the same problem as you did.

Having done some preliminary testing, I think this is yet another
manifestation of my old nemesis, the NSController old/new values bug:

http://www.cocoabuilder.com/archive/message/cocoa/2008/5/20/207407

That is to say, it's not key paths that are the problem; it's bindings
involving NSController subclasses, which always send nil for old and
new values, thereby breaking downstream dependencies.

However, since posting that last message , I have discovered the new
NSKeyValueChangeNotificationIsPriorKey option for addObserver:...
options which means that when using your first suggested workaround
you can at least send willChangeValueForKey: messages *before* the
change occurs

> Otherwise, I suggest you make a sample app and file a Radar.  This is on
> my long and growing list of things to pester people about at WWDC. :)

Did you have any luck with that? I'd love to know straight from the
horse's mouth why on earth this bug (which really dulls the sheen of
bindings) still hasn't been fixed in two major revisions of the OS.

Hamish
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Displaying live NSSlider value

2008-06-17 Thread Michael Ash
On Tue, Jun 17, 2008 at 1:19 PM, Andy Klepack
<[EMAIL PROTECTED]> wrote:
> I have an NSSlider and while the drag is in progress I would like to display 
> the value in a text field. When the drag completes I would like the new value 
> to get set in the user preferences and an action executed.
>
> As far as I can tell I'll have to set the slider to send its action 
> continually in order to find out that value has changed. If that's so then I 
> would need a way to determine whether the drag had completed and then behave 
> appropriately.
>
> Am I wrong, is there actually some sort of delegate method like 
> "valueDidChange:" that could be used to differentiate the drag events from 
> the drag-complete event? If I do have to do the determination in the action 
> itself how would I find out that the drag completed?

There is no delegate method, but it's actually fairly easy to make
your own. However, before you do that, consider whether you really
need to. Do you really need to run the final code once? Will it work
if you just run it every time the value changes? If your code isn't
really slow then this can be the simplest way to go.

However, if your code takes a significant amount of time to run such
that it disturbs the operation of the slider, or there's some other
good reason to do this, you can write code like this:

- (IBAction)sliderMoved:(id)sender
{
   // update the value here
   [NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(sliderDoneMoving:) object:sender];
   [self performSelector:@selector(sliderDoneMoving:)
withObject:sender afterDelay:0];
}

- (void)sliderDoneMoving:(id)sender
{
   // do your expensive update here
}

The reason this works is because while the mouse button is held on the
slider, the runloop is running in a special event tracking mode. The
delayed perform is scheduled in the default mode, and thus won't run
while the mouse button is held down. When you release the mouse
button, the blocked delayed perform finally runs. The cancellation
above it is to make sure you only ever have one, otherwise you'd get
sliderDoneMoving: called repeatedly in a flood when the mouse button
is released. The first time the method runs there is nothing to
cancel, but that's fine because it will just do nothing.

Mike
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Calendar Store for iCal Server calendar...

2008-06-17 Thread Charles E. Heizer
Hello,
I'm trying to find more info on how to get access to calendars stored on a
iCal server. Everything I'm finding is for the local iCal calendar store.

Thanks,
Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: iMovie HD like splash screen

2008-06-17 Thread Omar Qazi

[NSApp terminate:self]

Omar Qazi
Hello, Galaxy!
1.310.294.1593

On Jun 17, 2008, at 5:50 AM, Angelo Chen wrote:


Hi,

I'd like to implement a iMovie HD like splash screen, here are some  
tips needed:


1) when the 'quit' button is clicked, how to quit the entire  
application?





smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: NSOutlineView and weird binding behaviour

2008-06-17 Thread Jerry Krinock


On 2008 Jun, 17, at 3:02, Godfrey van der Linden wrote:

This behaviour is really bending my mind.  I thought I got bindings  
but it is really fooling me.


I have 3 outline views controlled by a NSViewController.  These  
outline views are bound for values to individual tree controllers  
arrangedObjects.shortName and each tree controller has its content  
set bound to representedObject.object.relationshipset


Now when I import objects into the everything is displayed as  
expected.  However if I open a document that is already populated  
nothing is displayed?


Try checking the "Prepares Content" checkbox in the attributes of that  
tree controller.  I believe that checkbox is equivalent to - 
setAutomaticallyPreparesContent.


This is my second-favorite object controller fix, behind "Handles  
Content As Compound Value".  I've never taken the time to understand  
what they do, but one of them often solves problems like this.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Drawing in CALayers

2008-06-17 Thread Erik Buck
I am a little bit confused by Scott's statement that "if you use layers-hosting 
views, then you should not rely on view drawing at all ... conversely, if you 
use layer-backed views then you should not directly access the views."
   
  I may just misunderstand what Scott means, but I have used layer-backed views 
with great success.  In a typical scenario, I implement a custom NSView 
subclass just like I would before Core Animation Layers.  To animate the view's 
drawing, I use a timer to trigger calls to -setNeedsDisplay: and implement 
-drawRect: to draw whatever stage of the animation is appropriate based on the 
current time. I have not had any problems when my ordinary custom views become 
layer backed... I don't think...  And I get transparency and layering over 
opengl content for "free" with layer-backed views.
   
  I used to do similar things before Core Animation too.  Apple provided an 
"overlay view" sample that did the same things.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Josh de Lioncourt

Hi Rush,

If I could get my hands on a NIB file that consisted of an web kit  
control that spanned the window, I suppose I could reuse that across  
several projects.  This sounds like a fantastic idea for the limited  
GUI I need, especially since I have extensive experience in web  
development.  I'll have to find someone to create the initial NIB  
file, I think, but beyond that it should be extremely doable.  The  
only problem with that that I can see, is capturing keystrokes when  
focus is in the window during game play before the OS/Webkit control  
snags them, but that is already an issue anyway. :)


Thanks for this idea.  I think this may be an excellent solution for  
me.  Certainly worth looking into.




Josh de Lioncourt
Mac-cessibility: http://www.Lioncourt.com
Twitter: http://twitter.com/Lioncourt

"Beauty was a savage garden, so why should it wound him that the most  
despairing music is full of beauty?"

The Vampire Lestat--Anne Rice



On Jun 17, 2008, at 12:07 PM, Rush Manbert wrote:

Sorry Josh, I had not read your initial "Cocoa, C++, Keyboard input  
and Timers" post. I assumed you were just a Mac newbie and wasn't  
aware of your "multitude of obstacles".


Maybe you can use a cross-platform GUI toolkit? There is wxWidgets (http://www.wxwidgets.org/ 
), FLTK (http://www.fltk.org/), and probably more. I have not used  
any of them, so can't offer any advice, but their approach might  
make it easier to develop your UI.


You might also consider using WebKit for your Mac UI. Then the  
actual UI code could be developed in HTML/JavaScript. (You would use  
the JavaScript/Cocoa bindings to interact with the application.) You  
still need to get the WebKit control up in a window though, so you  
might still need to use IB. But maybe there's a Carbon way to do  
something that simple? (I haven't used Carbon either.)



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Jens Alfke


On 17 Jun '08, at 7:30 AM, Matthew Youney wrote:

This certainly can be easily done using a tab control.  The downside  
is that
the entire NIB is loaded at once, adversely affecting performance/ 
resources.


Have you found this to be true in actual operation, or do you just  
suspect that it would be slow? I think it would take a very complex  
nib, with hundreds of controls, to cause an objectionable pause on  
load. Especially since it sounds like you'd load this when the  
application first launches and keep it around thereafter.


There are other valid reasons for using multiple nibs — it keeps them  
simpler and easier to work with — but don't let premature optimization  
alone dictate what you do.


—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Displaying live NSSlider value

2008-06-17 Thread I. Savant
> I have an NSSlider and while the drag is in progress I would like to display 
> the value in a text field. When the drag completes I would like the new value 
> to get set in the user preferences and an action executed.
>
> As far as I can tell I'll have to set the slider to send its action 
> continually in order to find out that value has changed. If that's so then I 
> would need a way to determine whether the drag had completed and then behave 
> appropriately.

  This isn't really how the target/action mechanism is designed to
work. I remember seeing a far more elegant solution to this somewhere
recently - it was a custom NSSlider (or cell) that shows the value in
a small bubble above the handle while it's being dragged. If you used
such a control, you could avoid the "continuous" mode (setting the
actual value only when the drag is complete) while still giving your
users visual feedback of the "intended" value.

  I tried to google around for this control but couldn't find it.
Perhaps you'll have better luck or some helpful soul will point the
way.

--
I.S.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSDocument and default file names.

2008-06-17 Thread Quincey Morris


On Jun 17, 2008, at 00:36, Godfrey van der Linden wrote:

I have been lurking on this list for a while.  It is interesting to  
be on the other side, I used to hang around answering questions on  
the kernel lists oh well, even kernel developers can become indie  
development occasionally ;-)


When I create a new NSPersistentDocument, I recognise it is new and  
ask the user a series of questions to configure the software.  From  
the questions I ask I can get a pretty good guess at what the  
basename of the new document will be, I just don't want to guess  
what the directory will be.


So here is my issue.  How do I suggest to the persistent document  
that it should default the filename to the one I suggest and not use  
'untitled'.  If I was using NSSavePanel directly I'd just tell it  
what I wanted but the NSDocument is trying to be helpful!  Is this  
just a case of not trying to program around the libraries?


I think overriding -[NSDocument displayName] (to return your proposed  
name for new documents) will do what you want. IIRC, that's where the  
name shown in the initial Save dialog comes from. If, in addition, you  
want the window titles to indicate the difference between a new and an  
already-saved document, you could use -[NSWindowController  
windowTitleForDocumentDisplayName:] to further customize window titles  
without messing up the name in the Save dialog.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Displaying live NSSlider value

2008-06-17 Thread Andy Klepack
I have an NSSlider and while the drag is in progress I would like to display 
the value in a text field. When the drag completes I would like the new value 
to get set in the user preferences and an action executed.

As far as I can tell I'll have to set the slider to send its action continually 
in order to find out that value has changed. If that's so then I would need a 
way to determine whether the drag had completed and then behave appropriately.

Am I wrong, is there actually some sort of delegate method like 
"valueDidChange:" that could be used to differentiate the drag events from the 
drag-complete event? If I do have to do the determination in the action itself 
how would I find out that the drag completed?

This is probably a common usage pattern for a slider but I haven't found any 
previous discussion. Ideally I'd like to display the value and its changes in a 
tooltip as the user drags but that also has proven difficult to do.

Thanks all,
-Andy

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Database Visualization For All Cocoa Applications

2008-06-17 Thread lbland

hi-

This movie:

http://www.vvi.com/movies/database

might be of interest to the list, showing a custom IB plugin and db  
access within IB, etc.


thanks!-

-lance

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How to implement floating HUD on fullscreen NSOpenGLView ?

2008-06-17 Thread Sean McBride
On 6/8/08 5:53 PM, Mike said:

>I think this is more related to general cocoa so I post it here.
>
>I have OpenGL-view which can be toggled to fullscreen or not. (  [self
>enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; )
>
>This seems to work very well and is extremely simple solution. However
>I was hoping to get menubar to slide visible when mouse cursor is on
>top but that doesn't seem to work?
>
>So my next option is to have a floating HUD (like in aperture).
>
>How do I implement that?
>I created HUD-window which is topmost but as soon as I go fullscreen
>it's below NSOpenGLView. I am a little lost what is the current way or
>am I even on the right track at all.

I suggest you stay away from enterFullScreenMode:withOptions: if you are
serious about fullscreen support.  It has a host of problems, which you
can read about in the archives.  Basically, when it goes fullscreen it
makes your view's level kCGMaximumWindowLevel-1 and so the menu bar,
dock, and your floating window will always be below it.  It also doesn't
play nice with SetSystemUIMode() so getting auto show/hide of the
menubar and dock is not going to happen.  Sorry to bring bad news. :)
Do file bugs.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: nib and xib

2008-06-17 Thread Jonathan Hess

Hey William -

This blog post explains XIB files quite nicely: 
http://speirs.org/2007/12/05/what-are-xib-files/

Jon Hess

On Jun 16, 2008, at 5:54 PM, William Squires wrote:


What's the difference? (assuming 'xib's aren't under NDA here...)

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jhess%40apple.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: noob question regarding (programmatic) bindings and data type coercion

2008-06-17 Thread Keary Suska
6/17/08 11:16 AM, also sprach [EMAIL PROTECTED]:

> 0) my app has an AppController object that is instantiated in the
> main Nib
> 1) on the main Nib's window is an NSTextField that is connected (via
> Nib loading) to an outlet of the AppController (named "valueTextField")
> 2) my app has a Person class with a single property "age" which is
> KVC compliant (also: the underlying age ivar is initialized to 0 in
> Person's -init)
> 3) the Person class has an -increaseAge instance method (which uses
> the accessors to get then set the age, so it is KVO compliant)
> 4) the AppController instantiates a single person object (in its init
> method) and holds on to this with an ivar
> 5) also on the main window is an NSButton that is connected to an
> action handler in the AppController -- which in turn invokes [person
> increaseAge];
> 6) in the AppController's awakeFromNib, I bind the person object's
> age property (key?) to the NSTextField thusly:
> [valueTextField bind:@"value"
> toObject:person
> withKeyPath:@"age"
> options:nil];
> The app works -- when I press the button, the displayed age
> increases. Wonderful... but here's my questions:
> 
> (btw: context: Tiger 10.4.11 using Xcode 2.4.1)
> 
> 1) from what (or where) does the property "value" of the NSTextField
> arise? Neither the class reference for NSTextField or NSControl have
> such an instance method (at least not that I've yet found).

It doesn't have to be a "real" property or ivar, nor does it need to have
public accessors. Why NSTextField doesn't have accessors for the keypath, is
up to Apple. In your own code, you would probably have public accessors.
Bottom line is that according to OOP rules, how NSTextField handles the
"value" keypath is none of your business; better known as "encapsulation".
It is also not relevant to a thorough understanding of bindings.
 
> 2) I used "value" for the binding because that is how I saw some
> sample code. Given that I don't quite know what "value" is, I changed
> to bind to "intValue" (presuming that setIntValue would be invoked on
> the textField).  This works, but changed the behavior of the app in
> one small way:

This is probably bad idea, and is really getting away from the core of
bindings. Just because you can, doesn't mean you should.

> In the Nib, the valueTextField has a string value "hello" in place
> because I wanted to see if the initial value of the Person's object
> would be displayed when the binding is established. When I bind to
> "value" the textField is immediately set to 0 (that is, I never see
> the word "hello"), but NOT when I bind to "intValue" the textField
> shows "hello" until I click the button to increase the age property
> -- why the difference?

Because your binding is probably broken. This is not a proper binding set
up. Don't do it. If the binding is proper, the field will always display the
current value of the "bind-to" property (i.e. "age"). Or, more precisely,
the last retrieved value.

> 3) Then I got curious about what ensures compliance of data types,
> and wondered if II'd cause runtime errors if I passed the wrong data
> type, so I tried changing the bind invocation to bind to
> "stringValue" -- that worked just fine. As did binding to
> "floatValue".  I'm presuming something must be coercing the person
> object's age (which is int data) but what? Is this an artifact of the
> control, the textField, or the binding mechanism?

The "coercion", if you want to look at it that way, is a function of KVC
(Key Value Coding). This is evident in the docs. Understanding KVC is
essential to understanding bindings. Many of the question you are asking
here imply a weak understanding of KVC.

> 4) Further, using "floatValue" does not cause the initial value of
> age (0) to be displayed (same result as with intValue), but using
> stringValue does (which matches use of "value"). Why?

See above.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Drawing in CALayers

2008-06-17 Thread Scott Anguish

no, you can't.

if you use layers-hosting views, then you should not rely on view  
drawing at all



conversely, if you use layer-backed views then you should not directly  
access the views.



On Jun 17, 2008, at 3:21 PM, Gordon Apple wrote:

2.  Can you mix standard view drawing with CALeyers?  If so, what is  
the
draw order of the view drawing relative to the CALayers?  (In spite  
of the
reference to such, the view drawing guide still doesn't cover  
CALayers.)  I
prefer to do interactive drawing into the top layer in the same  
manner as I

currently do in the view.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Scott Ribe
> That shuts me out of GUI development with IB, forcing me
> to rely on using code for what little GUI I do need, something not
> covered in these books either.

Not covered, but not hard, especially compared to any other way of building
a UI via code.

> I do have some sample code for
> building a GUI, and I plan to draw from it, but seems exceptionally
> complex.

Probably is over-complex for you, because it's probably intended as a basis
to support a lot more of the visual UI.

> And, you know, if anyone is out there who would like to take me under
> their wing for a few days off list and try to get me up to speed, I'd
> not object. LOL.

I don't even know that it needs to be off-list. Try giving just a little bit
more info about what you want to do. I have an idea how you might approach
setting this up, but I'm not clear if it's based on an accurate
understanding of your goals.

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cocoa-dev Digest, Vol 5, Issue 1067

2008-06-17 Thread Jacob Bandes-Storch
Not to mention that XIBs that have been compiled to NIBs can't be  
opened in Interface Builder, meaning you can't edit the interfaces of  
newer applications. It takes the fun out of it :(


On Jun 17, 2008, at 12:37 AM, [EMAIL PROTECTED] wrote:

On Jun 16, 2008, at 5:54 PM, William Squires wrote:


What's the difference? (assuming 'xib's aren't under NDA here...)


A xib is an XML file that is ostensibly the same thing as a NIB file.
It opens in interface builder and opens and edits just like a nib
would. When you compile your project the XML file is converted to a
nib and included in your application bundle.

The idea behind this is that source control systems like Subversion
that had problems with NIB files will work nicely with the XML files,
but the end result is the same for the developer and the user.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Drawing in CALayers

2008-06-17 Thread Gordon Apple
I'm trying to migrate to using CALayers and having nothing but problems.
I'm currently trying to use two simple CALayers, one for accumulated prior
layers (my own list of draw lists) and one for the current layer.  I'm using
Cocoa to draw.  No filters or transitions yet, just simple drawing.  I'll
keep my first questions simple:

1.  How do you deal with flipped NSView coordinates?  The drawLayer call
gets the NSGraphicsContext using nsGraphicsContext = [NSGraphicsContext
graphicsContextWithGraphicsPort:ctx flipped:YES ]   but seems to ignore the
flipped parameter for either YES/NO.  Am I going to have to implement a
transform to make this work right?

2.  Can you mix standard view drawing with CALeyers?  If so, what is the
draw order of the view drawing relative to the CALayers?  (In spite of the
reference to such, the view drawing guide still doesn't cover CALayers.)  I
prefer to do interactive drawing into the top layer in the same manner as I
currently do in the view.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Rush Manbert
Sorry Josh, I had not read your initial "Cocoa, C++, Keyboard input  
and Timers" post. I assumed you were just a Mac newbie and wasn't  
aware of your "multitude of obstacles".


Maybe you can use a cross-platform GUI toolkit? There is wxWidgets (http://www.wxwidgets.org/ 
), FLTK (http://www.fltk.org/), and probably more. I have not used any  
of them, so can't offer any advice, but their approach might make it  
easier to develop your UI.


You might also consider using WebKit for your Mac UI. Then the actual  
UI code could be developed in HTML/JavaScript. (You would use the  
JavaScript/Cocoa bindings to interact with the application.) You still  
need to get the WebKit control up in a window though, so you might  
still need to use IB. But maybe there's a Carbon way to do something  
that simple? (I haven't used Carbon either.)


- Rush

On Jun 17, 2008, at 10:52 AM, Josh de Lioncourt wrote:


Hi Rush,

Thanks for the advice.  Being visually impaired, I haven't been able  
to find *ANY* up-to-date Cocoa/Objective C books in an accessible  
format.  I have a couple of books that were written around 2002-ish,  
but have been hesitant to delve into those before being able to  
determine how much of what they teach is no longer applicable.  The  
other drawback to these books is they rely heavily on Interface  
Builder, which Apple hasn't yet made accessible with their VoiceOver  
technology.  That shuts me out of GUI development with IB, forcing  
me to rely on using code for what little GUI I do need, something  
not covered in these books either.  I do have some sample code for  
building a GUI, and I plan to draw from it, but seems exceptionally  
complex.


As you can see, I have a multitude of obstacles to work through. :)

And, you know, if anyone is out there who would like to take me  
under their wing for a few days off list and try to get me up to  
speed, I'd not object. LOL.


Thanks again to all who have been very helpful so far.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


[MEET] LA CocoaHeads this Thursday, 6/19 at 7:30pm

2008-06-17 Thread Rob Ross

Howdy LA CocoaHeads!

We will be meeting this Thursday, 6/19/08 at 7:30pm. We don't have a  
formal presentation prepared, but we do have several members who went  
to WWDC, so we can talk about all the non-NDA things they learned  
there, specifically all the latest on  iPhone development. We also  
have CocoaHeads polo shirts for those that haven't picked theirs up yet!


LA CocoaHeads website: http://cocoaheadsla.org/

Please sign up on the local mailing list if you're not subscribed  
already. It's very low traffic.


We meet on Thursday at the offices of E! Entertainment at 7:30pm.

Our meeting location is

5750 Wilshire Blvd
Los Angeles, CA 90036.

Here's a google map of the location:

http://www.google.com/maps?f=q&hl=en&q=5750+Wilshire+Blvd,+Los+Angeles 
+CA+90036&ie=UTF8&z=15&om=1&iwloc=addr


Free street parking is available. I'd suggest trying Masselin Ave,  
which is one block East of Courtyard Place.


We meet near the lobby of the West building at 5750 Wilshire Blvd, on  
the West side of Courtyard Place. There are picknick tables in front  
of the lobby and we'll gather there starting at 7:20pm. From there we  
go inside and up to conference room 3A at around 7:45pm .


If you arrive late, please ask the building security personnel in the  
lobby to direct you to the E! Security office, and they will be able  
to contact the group in conference room 3A and send someone down to  
meet you.


If you have any questions, please email Rob Ross at rross at  
comcastnetsdhotcom




Rob Ross, Lead Software Engineer
E! Networks

---
"Beware of he who would deny you access to information, for in his  
heart he dreams himself your master." -- Commissioner Pravin Lal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: duplicating views

2008-06-17 Thread Jonathan Hess

Hey Torsten -

It would probably be easiest to factor your view into a separate NIB  
and then load that nib multiple times. If you have reasons for not  
doing that, you could instead take the approach you suggested below.  
To get your outlets to roundtrip through the keyed archiver, you need  
to implement the NSCoding protocol on the various objects that are  
referenced by 'myView'.


NSCoding : 
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSCoding_Protocol/Reference/Reference.html

Good Luck -
Jon Hess

On Jun 13, 2008, at 12:55 PM, Torsten Curdt wrote:

I have a NSView "template" in my nib that I am duplicating in a  
container view like this:


- (void) awakeFromNib
{
   NSView *view;

   NSData *templateView = [NSArchiver  
archivedDataWithRootObject:myView];


   view = [NSUnarchiver unarchiveObjectWithData:templateView];
   [self addSubview:view];

   view = [NSUnarchiver unarchiveObjectWithData:templateView];
   [self addSubview:view];

Unfortunately (but to no big surprise) this does not set the  
IBOutlets.

Is there any other way but injecting the references myself?

cheers
--
Torsten
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jhess%40apple.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Scott Ellsworth
On Tue, Jun 17, 2008 at 10:52 AM, Josh de Lioncourt
<[EMAIL PROTECTED]> wrote:

> Thanks for the advice.  Being visually impaired, I haven't been able to find
> *ANY* up-to-date Cocoa/Objective C books in an accessible format.  I have a
> couple of books that were written around 2002-ish, but have been hesitant to
> delve into those before being able to determine how much of what they teach
> is no longer applicable.  The other drawback to these books is they rely
> heavily on Interface Builder, which Apple hasn't yet made accessible with
> their VoiceOver technology.  That shuts me out of GUI development with IB,
> forcing me to rely on using code for what little GUI I do need, something
> not covered in these books either.  I do have some sample code for building
> a GUI, and I plan to draw from it, but seems exceptionally complex.

That makes life a lot more complex - IB is the 'main line' of most mac
app development, so not being able to use it will make things harder.

For what it is worth, though, I really would try to learn ObjC and
Cocoa for your UI.  That UI may very quickly call back to your cross
platform C++ code, but ObjC is in your future if you want to deliver a
good mac app.  The language is not that hard, really, so you will
spend most of your time learning the Cocoa APIs.

There are Ruby, Python, and Perl bindings for ObjC, but based on
hallway conversations with people using those, you will still need to
be able to understand the ObjC core language to figure out Apple's
sample code.  The leg up these other bindings give you will be
somewhat reduced if you do not already know the appropriate language
well.

You might want to contact Apple's Developer Relations group to see if
they have any suggestions.  They certainly do not want to become known
as an impairment-hostile company, given how much effort they put into
accessibility in the OS itself.

> As you can see, I have a multitude of obstacles to work through. :)
>
> And, you know, if anyone is out there who would like to take me under their
> wing for a few days off list and try to get me up to speed, I'd not object.
> LOL.

You might want to contact Aaron Hillegas of Big Nerd Ranch, to see if
he has ever run his Cocoa training class with someone with similar
accessibility needs.  The training is not cheap, but it is incredibly
valuable.  Aaron is a wonderful teacher, according to the half dozen
people I know personally who have taken his course.  He is also a
great guy on a personal level.

> Thanks again to all who have been very helpful so far.
>
> Josh de Lioncourt
>
> ...my other mail provider is an owl...
>
>
>
> On Jun 17, 2008, at 10:24 AM, Rush Manbert wrote:
>
>> Hi Josh,
>>
>> Just my opinion, but I have written cross-platform apps recently. Your
>> approach sounds basically good. Use the Boost libraries as much as you can
>> in your C++ code because they are cross platform, and may help you avoid
>> implementing certain things (filesystem stuff, for instance) separately on
>> each platform. Define a very clear API for your C++ code that will be used
>> by the native code on each platform. (It helps to think of your C++ code as
>> a library that you link against on each platform.)
>>
>> For the Mac side, get "Cocoa Programming for Mac OS X" by Aaron Hillegass.
>> I assume there is a current version that corresponds with Xcode 3. You will
>> need this because the way the GUI part of a Mac app is put together is
>> frankly difficult to get your head around when you're new at it. Learn
>> Objective-C. It's not hard, given your background, and you really do want to
>> use the native tools to build your GUI, even if it's simple (and Cocoa is
>> really very cool). I also use it to build an adapter between my C++ API and
>> my Obj-C app code.
>>
>> If all you need is a command line app, then just use C++ and treat the OS
>> like the Unix system that it (mostly) is. Works great.
>>
>> Best regards,
>> Rush
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/scott_ellsworth%40alumni.hmc.edu
>
> This email sent to [EMAIL PROTECTED]
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Josh de Lioncourt

Hi Rush,

Thanks for the advice.  Being visually impaired, I haven't been able  
to find *ANY* up-to-date Cocoa/Objective C books in an accessible  
format.  I have a couple of books that were written around 2002-ish,  
but have been hesitant to delve into those before being able to  
determine how much of what they teach is no longer applicable.  The  
other drawback to these books is they rely heavily on Interface  
Builder, which Apple hasn't yet made accessible with their VoiceOver  
technology.  That shuts me out of GUI development with IB, forcing me  
to rely on using code for what little GUI I do need, something not  
covered in these books either.  I do have some sample code for  
building a GUI, and I plan to draw from it, but seems exceptionally  
complex.


As you can see, I have a multitude of obstacles to work through. :)

And, you know, if anyone is out there who would like to take me under  
their wing for a few days off list and try to get me up to speed, I'd  
not object. LOL.


Thanks again to all who have been very helpful so far.

Josh de Lioncourt

...my other mail provider is an owl...



On Jun 17, 2008, at 10:24 AM, Rush Manbert wrote:


Hi Josh,

Just my opinion, but I have written cross-platform apps recently.  
Your approach sounds basically good. Use the Boost libraries as much  
as you can in your C++ code because they are cross platform, and may  
help you avoid implementing certain things (filesystem stuff, for  
instance) separately on each platform. Define a very clear API for  
your C++ code that will be used by the native code on each platform.  
(It helps to think of your C++ code as a library that you link  
against on each platform.)


For the Mac side, get "Cocoa Programming for Mac OS X" by Aaron  
Hillegass. I assume there is a current version that corresponds with  
Xcode 3. You will need this because the way the GUI part of a Mac  
app is put together is frankly difficult to get your head around  
when you're new at it. Learn Objective-C. It's not hard, given your  
background, and you really do want to use the native tools to build  
your GUI, even if it's simple (and Cocoa is really very cool). I  
also use it to build an adapter between my C++ API and my Obj-C app  
code.


If all you need is a command line app, then just use C++ and treat  
the OS like the Unix system that it (mostly) is. Works great.


Best regards,
Rush


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


[MODERATOR] Re: Adding calendar-entries to iPhone's iCal

2008-06-17 Thread Scott Anguish

discussion of creating iPhone applications is NOT allowed on this list.
from the guidelines


Discussing NDA Projects (Snow Leopard and iPhone OS) and Private API


This list is not an appropriate forum for the discussion of issues  
that are covered by non-disclosure. This includes Snow Leopard and  
iPhone OS 2.0. Doing so will violate your NDA and the message will be  
forwarded to WWDR.


The discussion of Private API is also not appropriate for this list.  
Using private API is strongly discouraged as it can (and often does)  
change in future software revisions. If you feel some private API  
should be made public contact WWDR directly or file a bug using  
bugreporter.apple.com. Please do not advocate for those changes here,  
it isn't effective.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Rush Manbert


On Jun 17, 2008, at 10:00 AM, Josh de Lioncourt wrote:


Hi all,

Thanks for the responses yesterday. They were quite helpful.   
However, they have led me down a number of other rivers of thought,  
and it seems that there should be a better way to handle the  
projects I'm working on than what I had originally planned.  I have  
two main questions.  The first is a simple one: is there a good,  
large repository of sample/open source code specifically in OBJC and/ 
or C++, in XCode Project form, specifically for Mac development?   
I've found some small repositories, but nothing that has been very  
useful. I learn much better from dissecting projects.


The second question is: Is the approach I had laid out the best  
one?  It is as follows:


I have a number of WIndows applications that need to be rewritten.   
I want them to be easily compiled under XCode and Visual Studio.net.  
To that end, the bulk of the application logic will be rewritten in C 
++, a language with which I have had passed experience and which I'm  
currently brushing up on.  Precision timing, keyboard input, and  
limited GUI will be written platform specific.  If I understand  
correctly, there is absolutely no way to do this in XCode without  
using Objective C.  C++ cannot do any of these three. (Please  
correct me if I am wrong.)  This should require me to use a mix of C+ 
+ and Objective C (Objective C++) in XCode, through .mm files.  The C 
++ code will, when necessary, need to call upon the ObjC functions/ 
objects/methods/etc.  I understand that classes/objects cannot  
inherit/be derived from those of the other language.


This has posed a new problem, though.  My familiarity of Objective C  
is limited, and I am disinclined to spend a large amount of time  
learning yet another language strictly to accomplish these three  
tasks within the confines of a mainly C++ project.


Because the project has virtually no GUI, relying mainly on an audio  
interface, I'm wondering if there's techniques in C++ to, at the  
very least, generate a simple window for the application, as well as  
performing the other tasks that does not require Objective C.


Another option might be to locate some open source code I can draw  
understanding from for just these three tasks in Objective C.


...or maybe someone out there knows a better solution?

Hi Josh,

Just my opinion, but I have written cross-platform apps recently. Your  
approach sounds basically good. Use the Boost libraries as much as you  
can in your C++ code because they are cross platform, and may help you  
avoid implementing certain things (filesystem stuff, for instance)  
separately on each platform. Define a very clear API for your C++ code  
that will be used by the native code on each platform. (It helps to  
think of your C++ code as a library that you link against on each  
platform.)


For the Mac side, get "Cocoa Programming for Mac OS X" by Aaron  
Hillegass. I assume there is a current version that corresponds with  
Xcode 3. You will need this because the way the GUI part of a Mac app  
is put together is frankly difficult to get your head around when  
you're new at it. Learn Objective-C. It's not hard, given your  
background, and you really do want to use the native tools to build  
your GUI, even if it's simple (and Cocoa is really very cool). I also  
use it to build an adapter between my C++ API and my Obj-C app code.


If all you need is a command line app, then just use C++ and treat the  
OS like the Unix system that it (mostly) is. Works great.


Best regards,
Rush
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Scott Ribe
> If I understand  
> correctly, there is absolutely no way to do this in XCode without
> using Objective C.

Sure, use Carbon. It's likely that's a dead-end in terms of Apple's
evolution of APIs, and it absolutely does not eliminate the requirement of
some Mac-specific code that will not compile under Windows, but it does get
rid of Objective-C.

I wouldn't recommend this approach though; it seems like the amount of
Objective-C/Cocoa you'll need to use is tiny, and won't really be more work
than learning the appropriate Carbon APIs. (Objective-C is an extremely
simple language compared to C++, and you won't need to become more than a
beginner to do what you've described.)

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


noob question regarding (programmatic) bindings and data type coercion

2008-06-17 Thread Stuart Malin
I'm still trying to gain a deep and thorough understanding of  
bindings. I've made a very small app in which I am establishing a  
binding programmatically.  I see different behaviors depending upon  
how I describe the bound property.  Let me first describe my rather  
trivial app:


0) my app has an AppController object that is instantiated in the  
main Nib
1) on the main Nib's window is an NSTextField that is connected (via  
Nib loading) to an outlet of the AppController (named "valueTextField")
2) my app has a Person class with a single property "age" which is  
KVC compliant (also: the underlying age ivar is initialized to 0 in  
Person's -init)
3) the Person class has an -increaseAge instance method (which uses  
the accessors to get then set the age, so it is KVO compliant)
4) the AppController instantiates a single person object (in its init  
method) and holds on to this with an ivar
5) also on the main window is an NSButton that is connected to an  
action handler in the AppController -- which in turn invokes [person  
increaseAge];
6) in the AppController's awakeFromNib, I bind the person object's  
age property (key?) to the NSTextField thusly:

[valueTextField bind:@"value"
toObject:person
 withKeyPath:@"age"
 options:nil];
The app works -- when I press the button, the displayed age  
increases. Wonderful... but here's my questions:


(btw: context: Tiger 10.4.11 using Xcode 2.4.1)

1) from what (or where) does the property "value" of the NSTextField  
arise? Neither the class reference for NSTextField or NSControl have  
such an instance method (at least not that I've yet found).


2) I used "value" for the binding because that is how I saw some  
sample code. Given that I don't quite know what "value" is, I changed  
to bind to "intValue" (presuming that setIntValue would be invoked on  
the textField).  This works, but changed the behavior of the app in  
one small way:


In the Nib, the valueTextField has a string value "hello" in place  
because I wanted to see if the initial value of the Person's object  
would be displayed when the binding is established. When I bind to  
"value" the textField is immediately set to 0 (that is, I never see  
the word "hello"), but NOT when I bind to "intValue" the textField  
shows "hello" until I click the button to increase the age property  
-- why the difference?


3) Then I got curious about what ensures compliance of data types,  
and wondered if II'd cause runtime errors if I passed the wrong data  
type, so I tried changing the bind invocation to bind to  
"stringValue" -- that worked just fine. As did binding to  
"floatValue".  I'm presuming something must be coercing the person  
object's age (which is int data) but what? Is this an artifact of the  
control, the textField, or the binding mechanism?


4) Further, using "floatValue" does not cause the initial value of  
age (0) to be displayed (same result as with intValue), but using  
stringValue does (which matches use of "value"). Why?


TIA.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How does an instance variable in the ObjC code get connected to an interface element in the NIB file? BACK ON TRACK

2008-06-17 Thread Paul Archibald
Well, Erik, you know that sometimes we inherit working code without  
knowing much about its history. I don't want to break something that  
already works (and ships), and re-factoring the whole codebase is not  
part of my charter. I am trying to add my stuff without disturbing  
the working app. I think I will be moving a lot of the outlets that  
concern my module, but as for the rest ...


If it ain't broke, don't fix it.

(The message thread you mention looks like a rich source. I will have  
to read the whole thing. I have only been on the forum a couple of  
weeks, and I am running to catch up.)


On Jun 17, 2008, at 12:37 AM, [EMAIL PROTECTED] wrote:

Over 130 outlets! Holy Sassafras Tea!  That is ten to fifteen times  
more outlets than I have ever seen in a single class in 20 years of  
Objective-C programming!


  I suspect you are doing something very wrong.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Rethinking my approach; rather overwhelmed.

2008-06-17 Thread Josh de Lioncourt

Hi all,

Thanks for the responses yesterday. They were quite helpful.  However,  
they have led me down a number of other rivers of thought, and it  
seems that there should be a better way to handle the projects I'm  
working on than what I had originally planned.  I have two main  
questions.  The first is a simple one: is there a good, large  
repository of sample/open source code specifically in OBJC and/or C++,  
in XCode Project form, specifically for Mac development?  I've found  
some small repositories, but nothing that has been very useful. I  
learn much better from dissecting projects.


The second question is: Is the approach I had laid out the best one?   
It is as follows:


I have a number of WIndows applications that need to be rewritten.  I  
want them to be easily compiled under XCode and Visual Studio.net. To  
that end, the bulk of the application logic will be rewritten in C++,  
a language with which I have had passed experience and which I'm  
currently brushing up on.  Precision timing, keyboard input, and  
limited GUI will be written platform specific.  If I understand  
correctly, there is absolutely no way to do this in XCode without  
using Objective C.  C++ cannot do any of these three. (Please correct  
me if I am wrong.)  This should require me to use a mix of C++ and  
Objective C (Objective C++) in XCode, through .mm files.  The C++ code  
will, when necessary, need to call upon the ObjC functions/objects/ 
methods/etc.  I understand that classes/objects cannot inherit/be  
derived from those of the other language.


This has posed a new problem, though.  My familiarity of Objective C  
is limited, and I am disinclined to spend a large amount of time  
learning yet another language strictly to accomplish these three tasks  
within the confines of a mainly C++ project.


Because the project has virtually no GUI, relying mainly on an audio  
interface, I'm wondering if there's techniques in C++ to, at the very  
least, generate a simple window for the application, as well as  
performing the other tasks that does not require Objective C.


Another option might be to locate some open source code I can draw  
understanding from for just these three tasks in Objective C.


...or maybe someone out there knows a better solution?


Josh de Lioncourt
Mac-cessibility: http://www.Lioncourt.com
Twitter: http://twitter.com/Lioncourt

...my other mail provider is an owl...



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: duplicating views

2008-06-17 Thread Torsten Curdt
I've just thought of another solution that might be cleaner and more  
obvious.


If your substrate view (the one that contains the rest of the  
controls) is a custom view class, you need only implement the  
NSCoding protocol and conditionally encode the outlets yourself.  
Then when the view is copied by the archiving process, the outlets  
will be correctly dearchived as well.


Thanks for the suggestions guys!

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


PDF manipulation and fine control over page layout in Cocoa

2008-06-17 Thread Ewan Delanoy
 Hello all,

 the usual print machinery (NSPrintOperation) for a Cocoa-based
text editor (TextEdit, say) allows one to use a variety of page layouts.
Unfortunately, in many cases the only layout available to the user
involves a considerable waste of paper space, and this does not seem
to be fixable without some developer's work.

  Specifically, I should like to put four mini-pages in each page of the
final PDF, with minimal space waste (ideally the user would have almost
total control over the parameters involved).

 The Cocoa-made "CocoaBooklet" and "PDFLab" apps by Fabien Conus
are almost the perfect solution to my problem, but unfortunately I have
several
quarrels with them and besides I should like to integrate the "print to
booklet"
feature directly in my Cocoa text editor, not in a "plug-in" way as it is
with
CocoaBooklet. I have already tried to contact Fabien Conus over this, but
as he explains on his web site he often hasn't got the time to reply to
those kind of requests.

   For the layout I intend to have,which is the best path from the initial
NSTextView (or series of NSTextViews in a "multi-page" view) to the
final PDF? (I have made several unsuccessful attempts, including using
an intermediary "print" view and using the -rectForPage: method of NSView,
or storing each page in an NSImage and then drawing four NSImages on each
page of the PDF ).

   Any kind of feedback would be appreciated ...

TIA,

 Ewan

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: clickable NSImageView

2008-06-17 Thread Mattias Arrelid
Hi Angelo,

2008/6/17 Angelo Chen <[EMAIL PROTECTED]>:
> Hi,
>
> I use the code at the end to let user click on an image and open a URL, this 
> works, but not really satisfactory as when the mouse is moved over the image, 
> the cursor was not changed to point-hand shape, any idea to improve this? 
> Thanks,
>
> Angelo
>
>
> @interface BannerView : NSImageView
> {
> }
>
>
> - (void)mouseDown:(NSEvent *)theEvent
> {
>if ([theEvent clickCount] ==1) {
>NSURL *url = [NSURL URLWithString:@"http://www.cnn.com";];
>[[NSWorkspace sharedWorkspace] openURL: url];
>}
> }

You really shouldn't create new threads for a question you've already
asked about; it would have been enough to bump the original thread
("opening default email and browser from the code") again. The
original mail did include two questions, which number one had already
been answered.

Regards
Mattias
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Prevent Asynchronous operation of beginSheetModalForWindow

2008-06-17 Thread John Love
I have your previous message typed out and I really have read it ... and I
will re-read it and re-read until it clicks. You know how I feel about
compartmentalization.  I really don't want to abandon it because
compartmentalization does work for me for the NSProgressIndicator that I
have, as well as my Toolbar.

The only saving grace is that I've got sheets down to a science when I meld
my sheet code into FileController ... and you have no idea how happy that
makes me.  Right now, I'm cleaning up the code ... renaming outlets and some
instance variables so they sound like "plain English".

When I am finished with this housekeeping, I fully intend to return to sheet
compartmentalization ... I have not given up ... I just wanted to get sheets
to work.

I will give you all the feedback when the elevator reaches the top.

With regards,

John Love
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Michael Ash
On Mon, Jun 16, 2008 at 7:06 PM, Omar Qazi <[EMAIL PROTECTED]> wrote:
> On Jun 16, 2008, at 4:38 PM, Matthew Youney wrote:
>>
>> 1.  What is the best way to instantiate the "other" windows?  In this
>> application, all of the windows are quite unique, and there will never be
>> more than one instance of each.  Should this be done in the "main"
>> controller by loading the NIB, instantiating the other controller, and
>> then
>> showing the window?
>
> I agree that this sounds like a bad idea, but if you have good reason to,
> you might want to have a NSWindowController and nib for each window.

I disagree that this sounds like a bad idea.Having one
NSWindowController and nib per window is a fantastic idea, and is how
everything should be done. Breaking your program into smaller modules
is a fundamental part of programming and it's one of the best things
you can do to make the program easier to write, easier to modify, and
easier to understand.

Mike
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


question on layer setup in Covertflow sample code

2008-06-17 Thread Wayne Shao
Hi,

I was reading the code (part of Core Animation sample code) and could
not understand the part
 that the reflection layer is a sublayer of the desktop image layer.

e.g,  in Controller.m

layer = [CALayer layer];

desktopImageLayer = [CALayer layer];


[layer setSublayers:[NSArray arrayWithObject:desktopImageLayer]];

...

CALayer *sublayer = [CALayer layer];  // for reflection

[desktopImageLayer addSublayer:sublayer];

[sublayer addSublayer:gradientLayer];

the image ref will later to set as the content of desktopImageLayer,
and sublayer


layer
|-- desktopImageLayer
   |---sublayer

   | gradientLayer


if (image != NULL)
{
// main image
[layer setContents:(id)image];<--  Line A
[layer setBackgroundColor:NULL];
NSArray *sublayers = layer.sublayers;
// reflection
CALayer *sublayer = (CALayer *)[sublayers 
objectAtIndex:0];
[sublayer setContents:(id)image];<- 
Line B.
[sublayer setBackgroundColor:NULL];
CGImageRelease (image);
}

Two questions
 1)  I would think  sublayer above should be child of layer (and
sibling of desktopImageLayer). what is the reason for the current
setup?
With this setup, is it true that a sublayer is not geometrically
constraint to be inside the bounds of its superlayer?

 2) In Line A noted above,  the content of layer is set. What is the
impact of this to its sublayers?  Later, the sublayer's content is
also set.

Thanks for any insights on this.

--
Wayne Shao
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: clickable NSImageView

2008-06-17 Thread Tolga Katas

check out, resetCursorRects


- (void) resetCursorRects
{
[super resetCursorRects];
[self addCursorRect: [self bounds] cursor: [NSCursor  
pointingHandCursor]];


}

On Jun 17, 2008, at 8:17 AM, Angelo Chen wrote:


Hi,

I use the code at the end to let user click on an image and open a  
URL, this works, but not really satisfactory as when the mouse is  
moved over the image, the cursor was not changed to point-hand  
shape, any idea to improve this? Thanks,


Angelo


@interface BannerView : NSImageView
{
}


- (void)mouseDown:(NSEvent *)theEvent
{
if ([theEvent clickCount] ==1) {
NSURL *url = [NSURL URLWithString:@"http://www.cnn.com";];
[[NSWorkspace sharedWorkspace] openURL: url];   
}
}




 Yahoo! Mail具備一流的網上安全保護功能,請前往  
http://hk.antispam.yahoo.com/ 了解更多相關資訊!

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/tolgakatas 
%40gmail.com


This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: clickable NSImageView

2008-06-17 Thread I. Savant
> I use the code at the end to let user click on an image and open a URL, this 
> works, but not really satisfactory as when the mouse is moved over the image, 
> the cursor was not changed to point-hand shape, any idea to improve this? 
> Thanks,

  Have you taken a second to search the documentation for "cursor"?

http://developer.apple.com/documentation/Cocoa/Conceptual/CursorMgmt/Tasks/ChangingCursors.html#//apple_ref/doc/uid/2796

--
I.S.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Programatically placing panels inside a window

2008-06-17 Thread Mike Abdullah

Also, Cathy Shive has some stuff that may be of help:

http://katidev.com/blog/2008/04/09/nsviewcontroller-the-new-c-in-mvc-pt-1-of-3/

On 17 Jun 2008, at 00:59, Ken Tozier wrote:


Hi

I'm not sure If I'm going about this the right way but I created a  
bunch of panels in IB and want to swap individual panels in and out  
of a window at runtime. Basically what I'm doing is making a master/ 
detail window where the items listed in the master are objects that  
handle editing of different kinds of database tables. For example  
The master list might display


fruit
vegetables
dairy
etc...

Clicking on the fruit item should load the fruit detail panel.  
Clicking on vegetables should load the vegetable detail panel etc.


How would I do something like that programatically?

Thanks


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


clickable NSImageView

2008-06-17 Thread Angelo Chen
Hi,

I use the code at the end to let user click on an image and open a URL, this 
works, but not really satisfactory as when the mouse is moved over the image, 
the cursor was not changed to point-hand shape, any idea to improve this? 
Thanks,

Angelo


@interface BannerView : NSImageView
{
}


- (void)mouseDown:(NSEvent *)theEvent
{
if ([theEvent clickCount] ==1) {
NSURL *url = [NSURL URLWithString:@"http://www.cnn.com";];
[[NSWorkspace sharedWorkspace] openURL: url];   
}
}




  Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Ricky Sharp


On Jun 17, 2008, at 9:30 AM, Matthew Youney wrote:

The screens in out operator interfaces have to be mutually exclusive  
for a

number of reasons.  Configuration in one area cannot be altered unless
configuration in another area has been completed.  Product  
configuration

cannot be taking place while a machine is running production, etc.



This sounds quite a bit like what my kiosk-style app does.  The user  
is able to navigate amongst 'screens' and only interact with one at a  
time.  Clicking on 'buttons' often take users to a different screen.


Anyhow, you could set up a single window and dynamically load up your  
nibs (one for each 'step' in the process) and swap out the window's  
content view.  The nib owner can be the particular controller that  
will work with a specific step.


For bonus points, add in some nice view transitions when going to the  
next step.


___
Ricky A. Sharp mailto:[EMAIL PROTECTED]
Instant Interactive(tm)   http://www.instantinteractive.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread glenn andreas


On Jun 17, 2008, at 9:30 AM, Matthew Youney wrote:

This certainly can be easily done using a tab control.  The downside  
is that
the entire NIB is loaded at once, adversely affecting performance/ 
resources.
This is not the end of the world, however I am starting with a  
"clean slate"

here, and I want to design the best app possible, as well as learn and
implement Cocoa's best practices early on.



You can load views into tabs from multiple NIBs as needed - under 10.5  
using NSViewController (or some manual grunt work under 10.4).


Basically just have a "place holder view" that is in the tab view, and  
set up the tab views delegate to replace the place holder view with  
the "real" contents when that tab is about to be shown.


I've done this in the past (not so much due to the performance issues  
of NIB loading, but rather due to the pain of editing deeply nested  
views within tab views that manifests in various ways in different  
versions of IB)




Glenn Andreas  [EMAIL PROTECTED]
  wicked fun!
JSKit | the easy way to unite JavaScript and Objective C



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


RE: Newbie interface questions - multiple "modal" windows

2008-06-17 Thread Matthew Youney
Jens, Graham, List,

First, a bit of background :
Yes, I am coming from multiple other platforms (ms c++; ms.net, national
instruments CVI, multiple industrial HMI/SCADA, Kiel for proprietary
embedded, etc, etc.).  We write machine control applications for a variety
of industries.  www.youney.com The applications that I am speaking of are
not your typical desktop applications, and are not designed as such.  There
are very specific hardware, software, and safety reasons why our GUIs are
laid out the way that they are.  I do not mean to be closed minded, and I do
realize that there is always a better solution, and strongly believe in
constant improvement.

The screens in out operator interfaces have to be mutually exclusive for a
number of reasons.  Configuration in one area cannot be altered unless
configuration in another area has been completed.  Product configuration
cannot be taking place while a machine is running production, etc.

This certainly can be easily done using a tab control.  The downside is that
the entire NIB is loaded at once, adversely affecting performance/resources.
This is not the end of the world, however I am starting with a "clean slate"
here, and I want to design the best app possible, as well as learn and
implement Cocoa's best practices early on.

I greatly appreciate the experience, wisdom, and expertise of the pros on
this list.  Much of this lists traffic is at a very high level of expertise,
and I am somewhat embarrassed with my rudimentary questions.

Thanks to all,
Matt

-Original Message-
From: Graham Cox [mailto:[EMAIL PROTECTED]
Sent: Monday, June 16, 2008 9:36 PM
To: Jens Alfke
Cc: Matthew Youney; Cocoa
Subject: Re: Newbie interface questions - multiple "modal" windows


On 17 Jun 2008, at 10:39 am, Jens Alfke wrote:

>> I would think that this is a common application architecture (it is
>> to me)
>
> You may be coming from another platform? I can't think of any Mac
> apps that do this, and frankly, I wouldn't want to use one that did.


It does sort of sound like a wizard or agent type interface, where
each "step" is completed one at a time, like the Installer or Apple
Setup Assistant. If so, those might be a better model, where there is
one window and a forward/backward button? I may have misunderstood
however - it certainly does sound like a terrible UI if each one *has*
to be in a separate window. Modal hell.


Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: iMovie HD like splash screen

2008-06-17 Thread Uli Kusterer

Am 17.06.2008 um 15:10 schrieb Angelo Chen:
Thanks for the fast response, I tried the - 
setContentBorderTHickness, it does not work with me as I'm using  
Tiger 10.4.11, any equivalent of the method in this OS X?



 Use a brushed metal window and a custom NSView subclass that draws  
the white area? Or alternately, you could use a custom view that just  
draws the bottom part using NSImage and graphics you provide.  
NSRectClear() or whatever it was called may let you erase the window  
background so the corners are transparent, or maybe you have to  
override an isOpaque method to get anything other than black, it's  
been a while.


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: iMovie HD like splash screen

2008-06-17 Thread Angelo Chen
Hi,

Thanks for the fast response, I tried the -setContentBorderTHickness, it does 
not work with me as I'm using Tiger 10.4.11, any equivalent of the method in 
this OS X? 

Angelo

>   Use NSWindow's new
> -setContentBorderThickness:forEdge: method.
> 
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.zathras.de


  Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: launching finder with optionschi

2008-06-17 Thread Uli Kusterer

Am 16.06.2008 um 18:36 schrieb Memo Akten:

tell application "Finder"
activate
if not (exists Finder window 1) then
make new Finder window to startup disk
end if
select Finder window 1
set target of Finder window 1 to folder "documents" of home
set current view of Finder window 1 to flow view
end tell



 Don't reuse an already open window like that. The user may have a  
window open that they still want to use later. I'd recommend you  
always open a new window, or check in com.apple.finder.plist whether  
the option to open folders in a new window is on, and at least do it  
in that case.


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Programatically placing panels inside a window

2008-06-17 Thread Uli Kusterer

Am 17.06.2008 um 09:59 schrieb Ken Tozier:
I'm not sure If I'm going about this the right way but I created a  
bunch of panels in IB and want to swap individual panels in and out  
of a window at runtime. Basically what I'm doing is making a master/ 
detail window where the items listed in the master are objects that  
handle editing of different kinds of database tables. For example  
The master list might display


fruit
vegetables
dairy
etc...

Clicking on the fruit item should load the fruit detail panel.  
Clicking on vegetables should load the vegetable detail panel etc.


How would I do something like that programatically?



 Check out NSTabView (especially the properties that let you make it  
borderless and not show its tabs) and NSViewController.


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: iMovie HD like splash screen

2008-06-17 Thread Uli Kusterer

Am 17.06.2008 um 14:50 schrieb Angelo Chen:
I'd like to implement a iMovie HD like splash screen, here are some  
tips needed:


1) when the 'quit' button is clicked, how to quit the entire  
application?


 Hook it up to the same action as your quit menu item?

2) the bottom of the splash is grey with rounded corners, how to do  
that?



 Use NSWindow's new -setContentBorderThickness:forEdge: method.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


iMovie HD like splash screen

2008-06-17 Thread Angelo Chen
Hi,

I'd like to implement a iMovie HD like splash screen, here are some tips needed:

1) when the 'quit' button is clicked, how to quit the entire application?

2) the bottom of the splash is grey with rounded corners, how to do that?

Thanks,

Angelo


  Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Programatically placing panels inside a window

2008-06-17 Thread Graham Cox

I have used a tabless NSTabView for this and it works well.

hth,

G.


On 17 Jun 2008, at 5:59 pm, Ken Tozier wrote:


Hi

I'm not sure If I'm going about this the right way but I created a  
bunch of panels in IB and want to swap individual panels in and out  
of a window at runtime. Basically what I'm doing is making a master/ 
detail window where the items listed in the master are objects that  
handle editing of different kinds of database tables. For example  
The master list might display


fruit
vegetables
dairy
etc...

Clicking on the fruit item should load the fruit detail panel.  
Clicking on vegetables should load the vegetable detail panel etc.


How would I do something like that programatically?

Thanks


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/graham.cox%40bigpond.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: launching finder with optionschi

2008-06-17 Thread Hengist Podd

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Adding calendar-entries to iPhone's iCal

2008-06-17 Thread Georg Schuster
Ouch, I better remember that. Thank you.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Adding calendar-entries to iPhone's iCal

2008-06-17 Thread Michael Kaye

Hi Georg,

Unfortunately all things "iPhone SDK" are still under NDA...so can't  
be discussed here yet.


M.

On 17 Jun 2008, at 12:35, Georg Schuster wrote:


Hi,

I was wondering if it is possible to create an iPhone application that
can add calendar-entries such as events or meetings to the iPhone's
local calendar.
I read that you can use ScriptingBridge on OSX, but that doesn't  
work on

the iPhone as far as I know.
Is there a similar approach for the iPhone?

Btw. I don't suppose that there already exist UI-Elements that help  
you

to create your own calendar-Application, (like UICalendarView or
something)?

Regards,

 Georg Schuster
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/michaelkaye%40mac.com

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Adding calendar-entries to iPhone's iCal

2008-06-17 Thread Georg Schuster
Hi,

I was wondering if it is possible to create an iPhone application that
can add calendar-entries such as events or meetings to the iPhone's
local calendar.
I read that you can use ScriptingBridge on OSX, but that doesn't work on
the iPhone as far as I know.
Is there a similar approach for the iPhone?

Btw. I don't suppose that there already exist UI-Elements that help you
to create your own calendar-Application, (like UICalendarView or
something)?

Regards,

  Georg Schuster
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


  1   2   >