Re: How to create a GUID?

2008-09-08 Thread I. Savant

On Sep 7, 2008, at 10:44 PM, Adam R. Maxwell wrote:

In addition to all the CFUUID solutions, there's also  
[[NSProcessInfo processInfo] globallyUniqueString]; a one-liner, but  
not thread safe.


  This, according to the documentation, "includes the host name,  
process ID, and a time stamp, which ensures that the ID is unique for  
the network."


  I admit that I do not know "everything there is to know" about the  
subject, but as I recall from the very wiki page I originally posted,  
this is not "unique enough" across all computers in the world.


  Can anybody verify this?

--
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: What is a Delegate?

2008-09-08 Thread dreamcat7

Hi
Often people see "delegate method" in the Cocoa documentation and  
believe they cant use those ones because it requires a special object  
that they dont have.

However delegation is a very useful programming method.

Usually another developer writes a library class that requires a  
delegate to filling in the missing functions. Much like the idea of of  
asking you to write a callback function to fill-in the spaces that  
they cannot know. The delegate methods they ask for must each have a  
clearly defined purpose that is documented. They are called at  
convenient times on the 'partner' object which you (probably are  
already writing).


A delegate is needed for a persistent object that needs more  
information from you at an unspecified time, and well after the object  
was created / initialized.
And this allows the class to avoid having many or complex initializer  
(that may never be used). By contrast, a delegate method can be  
optional and simply ignored if it is not needed.


The best way to learn the concept delegation is to use the  
NSURLConnection class in synchronous mode. Another common class which  
should be attempted with delegation is NSTableView.  I strongly  
recommend to try either of these and then put a breakpoint in the  
delegate function.


The way a library class declares its additional delegate interface  
with the NSObject informal protocol. This is just a category extension  
of NSObject. So as long as your object is inherited from NSObject then  
you can implement these delegate methods.


@interface NSObject (ServiceProviderInformalProtocol)
// Delegate Methods
- (BOOL)serviceProviderWillRespondNextEvent:(ServiceProvider*)sender;
- (void)serviceProviderDidSetNextEvent:(ServiceProvider*)sender;
- (NSArray*)object:(ServiceProvider*)sender requiresMoreData: 
(NSData*)data;// If nil, the action will stop

- (NSComparisonResult)wasEqual:(ServiceProvider*)sender;

@end


If you implement a delegate method in your own object, the library  
class will try to call the delegate method when they require more  
data, when an event occur or to finish the job. Dont worry, in most  
cases the domumentation will tell you all you need to know.


So really when people talk about delegation in Cocoa they mean this  
callback interface and not a special kind of a niche object that you  
are required to write.
If you are migrating to Cocoa from another language, you may have seen  
this concept already, such as X-Windows API or Java @interface.




___

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]


NSTableView bindings and current selection

2008-09-08 Thread Jason Wiggins

Hello all,

I have a tableView (showing query results) that has its values bound  
to an array controller; that works fine. I also have a NSPathControl  
showing the path of the selected item; this works fine too. I have  
implemented a right-click contextual menu to "Show in Finder..." the  
selected item in the tableView.
My question is, how do I get the path of the selected item so my  
showInFinderMenuAction: method does as it's supposed to do?
To be totally honest, even though I have got the menu working (it's a  
menuForEvent:theEvent method) and I can log the selected row  
correctly, I'm unsure of what to do next to implement the contextual  
menu.
As the tableView implements bindings, I can't see a way of getting the  
selected items row/column value, let alone that row's path reference.


Any help would be greatly appreciated.

Regards,
Jason
___

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 create a GUID?

2008-09-08 Thread Chris Suter
On Mon, Sep 8, 2008 at 8:28 PM, I. Savant <[EMAIL PROTECTED]> wrote:

> On Sep 7, 2008, at 10:44 PM, Adam R. Maxwell wrote:
>
>  In addition to all the CFUUID solutions, there's also [[NSProcessInfo
>> processInfo] globallyUniqueString]; a one-liner, but not thread safe.
>>
>
>  This, according to the documentation, "includes the host name, process ID,
> and a time stamp, which ensures that the ID is unique for the network."


>
>  I admit that I do not know "everything there is to know" about the
> subject, but as I recall from the very wiki page I originally posted, this
> is not "unique enough" across all computers in the world.
>
>  Can anybody verify this?


On Leopard (and possibly earlier–I haven't checked), it appears that the
string returned is actually a UUID created with the CFUUID functions
concatenated with the process ID and the result of mach_absolute_time() so
the result isn't a proper UUID. I'm not sure where the host name is coming
from; it's possible that the CFUUID functions incorporate it somehow.

-- Chris
___

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: User input while reading document

2008-09-08 Thread Kyle Sluder
On Mon, Sep 8, 2008 at 7:47 AM, Randy Widell <[EMAIL PROTECTED]> wrote:
> If I am reading that right, it assumes that there is at least one window
> already open (an empty document created when the app starts).  The user
> cannot create new documents; they can only edit existing documents.  So,
> initially at least, there will not be any windows to which the options and
> password sheets can attach.

The code makes no assumptions about starting off with an empty
document.  The only assumption it makes is that every document will
have at least one window associated with it, and that window is the
one you want to display the sheet.  All of this stuff happens in
response to a document being opened or an untitled document being
created.

> I was also thinking it would be a little more intuitive if the sheets were
> attached to the document window to which they apply.  That is one reason why
> I was thinking of deferring the work of reading the whole document until
> after windowControllerDidLoadNib:.  At that point, I would be able to attach
> the sheets to the document's own window.  Also, I didn't know you could
> query the document controller for a window.  That's good to know.

Unless I made a glaring error in the code, that's what it's supposed
to be doing.  The document controller gets asked to open an untitled
document (-openUntitledDocumentAndDisplay:) or to open an existing
document (-openDocumentWithContentsOfURL:display:error:).  Since you
don't care about the first case, forget it exists.  The
MyDocumentController implementation of
-openDocumentWithContentsOfURL:display:error: invokes the super
implementation (which creates the MyDocument instance, adds it to the
document controller's collection, and displays it), and then it tells
the document to display its config sheet.  The document obliges by
starting a sheet attached to its first window ([self.windowControllers
objectAtIndex:0].window).

Hope that clarifies things a bit for you.
--Kyle Sluder
___

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: Using control:didFailToFormatString:errorDescription:

2008-09-08 Thread Matt Neuburg
On Mon, 8 Sep 2008 11:23:30 +1000, Rohan Lloyd <[EMAIL PROTECTED]> said:
>I don't like the vague "Format Error" and want to display my own
>message, so I've written my own
>control:didFailToFormatString:errorDescription: method (In my
>NSWindowController subclass), and set the text field delegate to point
>at it.
>
>- (BOOL)control: (NSControl*)control didFailToFormatString:
>(NSString*)str errorDescription: (NSString*)errDescription
>{
> NSError *error = [NSError errorWithDomain: NSCocoaErrorDomain
>code: NSFormattingError userInfo: nil]; // Add custom description later
> [control presentError: error modalForWindow: [self window]
>  delegate: nil
>didPresentSelector: nil
>   contextInfo: nil];
>
> return YES;
>}

First thing's first. Documentation says return value should be:

> Return Value
> YES if the value in the string parameter should be accepted as is; otherwise,
> NO if the value in the parameter should be rejected.

If you don't like the string, you should not be returning YES. m.

-- 
matt neuburg, phd = [EMAIL PROTECTED], 
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: 
AppleScript: the Definitive Guide - Second Edition!




___

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 create a GUID?

2008-09-08 Thread Sean McBride
On 9/6/08 7:51 PM, Clark Cox said:

>The original works with both GC and non-GC, while the version with
>autorelease will leak under GC (because the string is never
>CFRelease'd). In order to work with both runtimes, either use the
>original, or do this:
>
>- (NSString *)uuid
>{
> CFUUIDRef uuidRef = CFUUIDCreate(NULL);
> CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
> CFRelease(uuidRef);
> return [NSMakeCollectable(uuidStringRef) autorelease];
>}

One last correction: CFUUIDCreate() may return null, and one can't pass
null to CFRelease().  So an "if (uuidRef)" is needed.  (You can pass
null to NSMakeCollectable, but not to CFMakeCollectable).

--

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]


NSTableView works in 10.5 but not in 10.4

2008-09-08 Thread Ellen Chou
I have a tree view window that uses NSTableView and NSOutlineView lists out
all the sub folders under user's home directory.  For some reason, this
window shows the folder contents correctly in Mac OS 10.5.2, but not in Mac
OS 10.4.x running on iMac which is PowerPC host running on Intel Duel Core
CPUs.

It seems to me the Notification/Event was not functioning properly in Mac OS
10.4.x iMac.  I don't get a chance to run on MacBook 10.4.x.  If any one has
MacBook Intel CPU running 10.4.x, please let me know.

Anyone run into the similar problem?

Thanks,
Ellen
___

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: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2008-09-08 Thread Adam Strzelecki
Don't want to hammer here too much, but I just want to have any  
feedback from Apple if this problem is known and if there's any chance  
to get it fixed.


I've already send some more details to Douglas Davidson month ago that  
provides here great support I see, but after that I haven't got any  
more word from him, too bad.


Maybe anyone else from Apple can have a look at this problem.

Just imagine how annoying it is when you write mails in two languages,  
and you need to restart Mail.app every time you change the spell  
checker language. And this affects all user that use CheckSpell or  
CocoaSpell, which are Universe minus AppleSpell provided languages  
only speaking ppl.


Below are details sent to Douglas:
Get me a copy of your spellchecker and instructions for reproducing  
the problem (including system version and configuration  
information) and I will take a look at it.



http://checkspell.apple.eu.org/ or direct download link 
http://web.mac.com/heidi17/Heidikowa_witryna/CheckSpell_files/CheckSpell-1.3.dmg

(The author of this service (software) is in the CC. I got direct  
contact with him as well. Please contact him if you need any  
information regarding the source-code.)


The installer will create /Library/Services/CheckSpell.service which  
is spell server based on NSSpellServer Cocoa API.
Once it is installed you should see additional languages such as  
Polski or Cestina. Let's try reproduce the bug with Polish<->English  
switching.


Try to open Mail.app and write new mail as below:

-
Here below is some Polish sentence.
Tutaj u góry jest tekst po angielsku.
-

1st line should be valid only in English (AppleSpell), 2nd should be  
valid only in Polish (CheckSpell).
Unfortunately when I start writing mail with English spelling,  
switching to Polish doesn't really make 2nd line valid, I get  
absolutely no response from Polish spell checker (probably  
AppleSpell called with "pl" instead of CheckSpell)


Then once the mail is saved and Mail.app restarted, it starts with  
Polish, everything is fine with the spelling (Polish this time),  
until switch back to English. Then CheckSpell is complaining that it  
is getting called with "en" language which it wasn't registered for  
(AppleSpell should be called).


IMPORTANT CLUE: When I do: "killall AppleSpell CheckSpell" prior  
running Mail.app, switching spelling languages works somehow fine!  
So the problem appears when AppleSpell & CheckSpell service  
processes are already running in the system. So the problem may not  
appear 1st time when you run Mail.app after installation of  
CheckSpell, please rerun it once both spelling service processes are  
running.


So the diagnosis is that once single application using  
Foundation.framework contacts the NSSpellServer that is already  
running, it will always use THIS one regardless of selected language  
and other NSSpellServer that may be proper.


Just as a reminder, I'd like to ask you (Apple) for focusing also  
the problem of revalidation of spelling on language change.  
Regardless of the bugs above, there is also slight annoyance with  
NSTextView based GUIs such as Mail.app that everytime you change the  
language in Spelling & Gramma window and you got Check spelling as  
you type ON the spelling is not revalidated with current language,  
you need to click Next many many times, or scroll your cursor trough  
whole document in order to make the spelling underline incorrect  
words in current language.
This is also the case when you open the saved mail in Mail.app,  
incorrect words are not underlined on open.



Opps forgot my configuration:

MacBookPro3,1 2.2GHz 2GB RAM, 250GB HD, MBP31.0070.B07

Mac OSX 10.5.4 w/latest security update, preferred language set to  
Polish, but I've also checked problem with English.


Problem appears since first time I've installed CheckSpell around  
Feb 2008 @ 10.5.2.


I got couple of friends that also has this problem with spell  
checker on other Mac computers.



Regards,
--
Adam Strzelecki

___

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: NSTableView works in 10.5 but not in 10.4

2008-09-08 Thread Stéphane Sudre


On Sep 8, 2008, at 12:58 PM, Ellen Chou wrote:

I have a tree view window that uses NSTableView and NSOutlineView  
lists out
all the sub folders under user's home directory.  For some reason,  
this
window shows the folder contents correctly in Mac OS 10.5.2, but not  
in Mac
OS 10.4.x running on iMac which is PowerPC host running on Intel  
Duel Core

CPUs.

It seems to me the Notification/Event was not functioning properly  
in Mac OS
10.4.x iMac.  I don't get a chance to run on MacBook 10.4.x.  If any  
one has

MacBook Intel CPU running 10.4.x, please let me know.

Anyone run into the similar problem?


Are you referring to a specific sample code?

Which notification/event are you referring to?

When there's a display strangeness in NSTableView/NSOutlineView, the  
first thing to check is that reloadData is called before at least once.



___

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]


Crash in DRBurnSetupPanel

2008-09-08 Thread David
I'm sometimes getting a crash in DRBurnSetupPanel. Its when the panel is
starting up and a device is loading media. Does anyone know if there's a
workaround? Could I be doing something to cause this?
Here's a back trace

#0  0x90ed46e8 in objc_msgSend ()

#1  0x00175701 in NotificationCallback ()

#2  0x0014e764 in DRNotificationCenterObject::AddObserver ()

#3  0x00175341 in _DRNotificationCenterAddObserver ()

#4  0x00175218 in -[DRNotificationCenter addObserver:selector:name:object:]
()

#5  0x0004c483 in -[DRDeviceChooserCell setFilter:] ()

#6  0x0004bfc6 in -[DRDeviceChooserCell init] ()

#7  0x968b8b4b in -[NSControl initWithFrame:] ()

#8  0x968cf16e in -[NSCustomView nibInstantiate] ()

#9  0x968b0ff1 in -[NSIBObjectData instantiateObject:] ()

#10 0x968b0712 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:]
()

#11 0x968a6e12 in loadNib ()

#12 0x968a6774 in +[NSBundle(NSNibLoading)
_loadNibFile:nameTable:withZone:ownerBundle:] ()

#13 0x968a63b7 in +[NSBundle(NSNibLoading)
loadNibFile:externalNameTable:withZone:] ()

#14 0x0004bd1c in _DRUILoadNibPanelFromBundle ()

#15 0x0004b816 in -[DRSetupPanel initWithNibName:] ()

#16 0x0004b63c in -[DRBurnSetupPanel initWithNibName:] ()

#17 0x0004b5fa in -[DRBurnSetupPanel init] ()

#18 0x0004b5b8 in +[DRBurnSetupPanel setupPanel] ()

...
___

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]


Connecting Menu across Nib

2008-09-08 Thread sheen mac
Hi All,

In my app, I have 4 Nib files.In the MainMenu.nib  have password 
asking window and menus. After the password check I loaded another
Nib. This Nib has no menu. The MainMenu's menu still in menu bar.
But the shortcut keys not working (Preferences and quit ) . This 
working with MainMenu.Nib ,but not working with other nibs.

Kindly help me.

Thanks In advance,
Sheen


  
___

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: Connecting Menu across Nib

2008-09-08 Thread Charles Steinman
--- On Mon, 9/8/08, sheen mac <[EMAIL PROTECTED]> wrote:

> In my app, I have 4 Nib files.In the MainMenu.nib  have
> password 
> asking window and menus. After the password check I loaded
> another
> Nib. This Nib has no menu. The MainMenu's menu still in
> menu bar.
> But the shortcut keys not working (Preferences and quit ) .
> This 
> working with MainMenu.Nib ,but not working with other nibs.

Your problem does not seem likely to be related to nib loading. There is no 
concept of "the current nib." Are you running a modal window/sheet, maybe?

Cheers,
Chuck


  
___

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]


SSCrypto to PHP

2008-09-08 Thread Walter Johnson
 Greetings,
 I need help with encrypting data to send to a php script to be
decrypted. I stumbled across the SSCrypto framework and I've been
using it to encrypt and decrypt a simple NSString. However, when I
attempt to plug this into my php script, it only outputs gibberish.
Can someone give me a hand here and perhaps guide me?
 Here's the cocoa code:
-
NSString * secretMessage = @"Hello World!";
 NSString * secretKey = MY_BF_KEY;
 NSLog(@"secretMessage: %@", secretMessage);
 NSLog(@"secretKey: %@", secretKey);
 NSData *seedData1 = [secretKey
dataUsingEncoding:NSUTF8StringEncoding];
 SSCrypto * crypto = [[SSCrypto alloc]
initWithSymmetricKey:seedData1];
 NSArray *ciphers = [NSArray arrayWithObjects:@"bf-cbc", nil];
 NSString *password = secretMessage;
 [crypto setClearTextWithString:password];
 int n;
 for(n = 0; n < [ciphers count]; n++)
 {
 NSData *cipherText = [crypto encrypt:[ciphers objectAtIndex:n]];
 NSString *cipherString = [crypto cipherTextAsString];
 NSData *clearText = [crypto decrypt:[ciphers objectAtIndex:n]];
 NSLog(@"Original password: %@", password);
 NSLog(@"Cipher text: '%@' using %@", [cipherText
encodeBase64WithNewlines:NO], [ciphers objectAtIndex:n]);
 NSLog(@"Cipher text as hex: '%@' using %@", [cipherText hexval],
[ciphers objectAtIndex:n]);
 NSLog(@"Cipher string: '%@'", cipherString);
 NSLog(@"Clear text: '%s' using %@", [clearText bytes], [ciphers
objectAtIndex:n]);
 NSLog(@" ");
 }
-
and the output
-
2008-09-08 14:25:50.925 tybit-blowfish[2588:10b] secretMessage: Hello
World!
 2008-09-08 14:25:50.927 tybit-blowfish[2588:10b] secretKey: pass
 2008-09-08 14:25:50.929 tybit-blowfish[2588:10b] Original password:
Hello World!
 2008-09-08 14:25:50.930 tybit-blowfish[2588:10b] Cipher text:
'nUYw6WbDs0M7NjXB6q6r2g==' using bf-cbc
 2008-09-08 14:25:50.930 tybit-blowfish[2588:10b] Cipher text as hex:
'9d4630e966c3b3433b3635c1eaaeabda' using bf-cbc
 2008-09-08 14:25:50.932 tybit-blowfish[2588:10b] Cipher string:
'ùF0Èf√≥C;65¡ÍÆ´⁄'
 2008-09-08 14:25:50.932 tybit-blowfish[2588:10b] Clear text: 'Hello
World!' using bf-cbc
-
Now, I take the cipherText encoded as Base64 (the line right below
'Original password') and plug it into my base-64/blowfish decoder in
PHP.
-
-
I know the base64 encode/decode is working properly because I can
successfully send and interpret data that is only base64 encoded. But
I want to add another layer of encryption to further secure the data.
Base64 is really only serving to allow the encoded string transport
over http.
 I can also vouch that the php code can successfully decrypt a
message encrypted with blowfish. I have similar code in another
script which reads encrypted data from a hex string delivered from a
windows application. So my concern is why won't it work with
SSCrypto/openssl? Any help will be much appreciated.
-
Message sent via tyBit Mail - http://www.tyBitMail.com/ 
 Search the Entire Web From Your Desktop!
 tyBit™ Unified Search™ 
 Download your FREE copy today! 
 www.tyBit.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: NSTableView bindings and current selection

2008-09-08 Thread Benjamin Stiglitz
I have a tableView (showing query results) that has its values bound  
to an array controller; that works fine. I also have a NSPathControl  
showing the path of the selected item; this works fine too. I have  
implemented a right-click contextual menu to "Show in Finder..." the  
selected item in the tableView.
My question is, how do I get the path of the selected item so my  
showInFinderMenuAction: method does as it's supposed to do?
To be totally honest, even though I have got the menu working (it's  
a menuForEvent:theEvent method) and I can log the selected row  
correctly, I'm unsure of what to do next to implement the contextual  
menu.
As the tableView implements bindings, I can't see a way of getting  
the selected items row/column value, let alone that row's path  
reference.


You can get the clickedRow of the table view, and use that as an index  
into the array controller’s arranged content. (Be sure to use the  
clicked row, not the array controller’s selection, unless you change  
the selection itself on the right-click).


-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: NSTableView bindings and current selection

2008-09-08 Thread Corbin Dunn

On Sep 8, 2008, at 3:30 AM, Jason Wiggins wrote:

Hello all,

I have a tableView (showing query results) that has its values bound  
to an array controller; that works fine. I also have a NSPathControl  
showing the path of the selected item; this works fine too. I have  
implemented a right-click contextual menu to "Show in Finder..." the  
selected item in the tableView.
My question is, how do I get the path of the selected item so my  
showInFinderMenuAction: method does as it's supposed to do?
To be totally honest, even though I have got the menu working (it's  
a menuForEvent:theEvent method) and I can log the selected row  
correctly, I'm unsure of what to do next to implement the contextual  
menu.
As the tableView implements bindings, I can't see a way of getting  
the selected items row/column value, let alone that row's path  
reference.


Any help would be greatly appreciated.


In addition to what Ben said, please look at the DragNDropOutlineView  
demo app, which does this (albeit without bindings).


corbin
___

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]


How do create a DMG with license agreement?

2008-09-08 Thread David
Hello,
I've seen many applications present a license agreement before their
DMG can be mounted. I read in the "Software Delivery Guide" about a
SLA for UDIF SDK. So I got the SDK. But its dated from 2003. Within
its documentation it says you need to use ResEdit and gives a location
of
http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/Utilities/ResEdit_2.1.3.sea.bin.

However that turns out to be a classic application which doesn't run
on Intel machines.

Am I looking in the right place on how to add a license agreement to a DMG?

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: How do create a DMG with license agreement?

2008-09-08 Thread Dave Carrigan


On Sep 8, 2008, at 1:41 PM, David wrote:

Am I looking in the right place on how to add a license agreement to  
a DMG?


You're looking in the right place, but IMHO, you're better off just  
forking over $20 for DropDMG, which does it all for you.


--
Dave Carrigan
[EMAIL PROTECTED]
Seattle, WA, USA



PGP.sig
Description: This is a digitally signed message part
___

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]

NSCharacterSet :+ (id)newlineCharacterSet

2008-09-08 Thread Filip van der Meeren

Hello,

I have the most puzzling question:

The documentation of XCode for NSCharacterSet includes the following:

newlineCharacterSet
Returns a character set containing the newline characters.

+ (id)newlineCharacterSet

Return Value
A character set containing the newline characters (U+000A–U+000D, U 
+0085).


Availability
Available in Mac OS X v10.5 and later.
See Also
+ whitespaceAndNewlineCharacterSet
+ whitespaceCharacterSet
Declared In
NSCharacterSet.h



But when I try to invoke this method I get the following:
warning: 'NSCharacterSet' may not respond to '+newlineCharacterSet'

And when I check the actual header file, the "+  
(id)newlineCharacterSet" declaration isn't to be found...


Is this a mistake on my side or Apples?

Thanks,

Filip vdm



___

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: NSCharacterSet :+ (id)newlineCharacterSet

2008-09-08 Thread Aki Inoue

The method was added to 10.5.

So, if your project is not targeting 10.5 and later, you get the  
warning.


Aki

On 2008/09/08, at 13:57, Filip van der Meeren wrote:


Hello,

I have the most puzzling question:

The documentation of XCode for NSCharacterSet includes the following:

newlineCharacterSet
Returns a character set containing the newline characters.

+ (id)newlineCharacterSet

Return Value
A character set containing the newline characters (U+000A–U+000D, U 
+0085).


Availability
Available in Mac OS X v10.5 and later.
See Also
+ whitespaceAndNewlineCharacterSet
+ whitespaceCharacterSet
Declared In
NSCharacterSet.h



But when I try to invoke this method I get the following:
warning: 'NSCharacterSet' may not respond to '+newlineCharacterSet'

And when I check the actual header file, the "+ (id) 
newlineCharacterSet" declaration isn't to be found...


Is this a mistake on my side or Apples?

Thanks,

Filip vdm



___

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/aki%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: NSCharacterSet :+ (id)newlineCharacterSet

2008-09-08 Thread Kyle Sluder
On Mon, Sep 8, 2008 at 4:57 PM, Filip van der Meeren
<[EMAIL PROTECTED]> wrote:
> But when I try to invoke this method I get the following:
> warning: 'NSCharacterSet' may not respond to '+newlineCharacterSet'

Is your deployment target set to 10.5?  Are you using the right SDK?

> And when I check the actual header file, the "+ (id)newlineCharacterSet"
> declaration isn't to be found...

/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Versions/Current/Headers/NSCharacterSet.h,
lines 36-38:

#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
+ (id)newlineCharacterSet;
#endif

--Kyle Sluder
___

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: NSCharacterSet :+ (id)newlineCharacterSet

2008-09-08 Thread Bill Cheeseman
on 2008-09-08 4:57 PM, Filip van der Meeren at [EMAIL PROTECTED] wrote:

> And when I check the actual header file, the "+
> (id)newlineCharacterSet" declaration isn't to be found...
> 
> Is this a mistake on my side or Apples?

On my 10.5.4 system, this appears in the NSCharacterSet.h header:

#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
+ (id)newlineCharacterSet;
#endif

--

Bill Cheeseman - [EMAIL PROTECTED]
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com

PreFab Software - www.prefabsoftware.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: NSTableView works in 10.5 but not in 10.4

2008-09-08 Thread Ellen Chou
Hi Stephane,

Indeed, reloadData is not called at all.  But why can it work fine in
10.5.2?

When and where I should call reloadData?

Thanks,
Ellen

On Mon, Sep 8, 2008 at 9:52 AM, Stéphane Sudre <[EMAIL PROTECTED]> wrote:

>
> On Sep 8, 2008, at 12:58 PM, Ellen Chou wrote:
>
> I have a tree view window that uses NSTableView and NSOutlineView lists out
>> all the sub folders under user's home directory.  For some reason, this
>> window shows the folder contents correctly in Mac OS 10.5.2, but not in
>> Mac
>> OS 10.4.x running on iMac which is PowerPC host running on Intel Duel Core
>> CPUs.
>>
>> It seems to me the Notification/Event was not functioning properly in Mac
>> OS
>> 10.4.x iMac.  I don't get a chance to run on MacBook 10.4.x.  If any one
>> has
>> MacBook Intel CPU running 10.4.x, please let me know.
>>
>> Anyone run into the similar problem?
>>
>
> Are you referring to a specific sample code?
>
> Which notification/event are you referring to?
>
> When there's a display strangeness in NSTableView/NSOutlineView, the first
> thing to check is that reloadData is called before at least once.
>
>
>
___

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: text view example

2008-09-08 Thread Douglas Davidson


On Sep 6, 2008, at 4:10 AM, Roland Silver wrote:

Can anyone point me to a Cocoa app or tutorial or example whose code  
I can adapt which has a window with a scrollable text view into  
which I can post text?


Try /Developer/Examples/AppKit/TextSizingExample for starters.

Douglas Davidson

___

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]


Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Jerry Krinock
My app works fine on an Intel Mac running 10.5, and on my old 800 MHz  
Powerbook G4 running 10.4.11.  But after the latest update I received  
complaints from two users with G3 processors.  Upon investigation, it  
turns out that the message


   -[NSBundle classNamed:]

logs an error [1] and returns nil instead of loading the bundle and  
returning the requested Class.  If I didn't know better, I'd say this  
is an apparent case of insufficient hardware to load needed  
resources.  But, duh, that's supposed to be impossible with virtual  
memory.


One user has an iBook with a 800 MHz G3 processor and 640 MB RAM.  The  
other has a "Paris" Clamshell iBook with a 466 MHz G3 and RAM maxxed  
out at 512 MB.  She says it's "the oldest iBook that can run OS X".


Now, the user with the 800 MHz iBook has been using my app for over  
two years.  Also, I myself have run previous versions of my app on my  
old 500 MHz G3 iBook with 320 MB RAM, 10.4.?, and it worked.  (But I  
have since downgraded that puppy to 10.3.9, and my app does not try to  
load the problem bundle under 10.3.9.)


It looks like something got changed in the latest build that G3  
processors don't like.  Any ideas what that might be?


Jerry

[1] The error is:

*** -[NSBundle load]:
Error loading code /Applications/MyApp.app/Contents/Resources/ 
BmTiger.bundle/Contents/MacOS/BmTiger

for bundle /Applications/MyApp.app/Contents/Resources/BmTiger.bundle,
error code 4
(link edit error code 4,
error number 0 (
Library not loaded:
@executable_path/../Frameworks/SSSQLiter.framework/ 
Versions/A/SSSQLiter


which says that the SSSQLiter framework will not load, but I checked  
and it ^is^ at the promised path, and ^is^ a universal binary, and of  
course this all works fine on my Powerbook G4.  MyApp's package  
structure:


MyApp
Contents
MacOS
MyApp
Resources
BmTiger.bundle
Contents
MacOS
BmTiger (universal binary)
...
Frameworks
SSSQLiter.framework
Versions
A
SSSQLiter (universal binary)
...

___

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: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Nick Zitzmann


On Sep 8, 2008, at 4:05 PM, Jerry Krinock wrote:


*** -[NSBundle load]:
Error loading code /Applications/MyApp.app/Contents/Resources/ 
BmTiger.bundle/Contents/MacOS/BmTiger

for bundle /Applications/MyApp.app/Contents/Resources/BmTiger.bundle,
error code 4
   (link edit error code 4,
   error number 0 (
   Library not loaded:
   @executable_path/../Frameworks/SSSQLiter.framework/ 
Versions/A/SSSQLiter



What is the output of "lipo -info {path to the app contents folder}/ 
Frameworks/SSSQLiter.framework/SSSQLiter"?


Nick Zitzmann


___

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 do create a DMG with license agreement?

2008-09-08 Thread Seth Willits

On Sep 8, 2008, at 1:47 PM, Dave Carrigan wrote:

Am I looking in the right place on how to add a license agreement  
to a DMG?


You're looking in the right place, but IMHO, you're better off just  
forking over $20 for DropDMG, which does it all for you.


http://www.araelium.com/dmgcanvas/


--
Seth Willits




___

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: NSTableView works in 10.5 but not in 10.4

2008-09-08 Thread Corbin Dunn


On Sep 8, 2008, at 2:36 PM, Ellen Chou wrote:


Hi Stephane,

Indeed, reloadData is not called at all.  But why can it work fine in
10.5.2?

When and where I should call reloadData?



That's easy; after you change your model. When do you initialize your  
arrays, etc? After that point, call reloadData. Possibly in - 
awakeFromNib.


If it is working by chance on Leopard, then it is probably because of  
some ordering issue that changed slightly.


corbin




Thanks,
Ellen

On Mon, Sep 8, 2008 at 9:52 AM, Stéphane Sudre <[EMAIL PROTECTED]>  
wrote:




On Sep 8, 2008, at 12:58 PM, Ellen Chou wrote:

I have a tree view window that uses NSTableView and NSOutlineView  
lists out
all the sub folders under user's home directory.  For some reason,  
this
window shows the folder contents correctly in Mac OS 10.5.2, but  
not in

Mac
OS 10.4.x running on iMac which is PowerPC host running on Intel  
Duel Core

CPUs.

It seems to me the Notification/Event was not functioning properly  
in Mac

OS
10.4.x iMac.  I don't get a chance to run on MacBook 10.4.x.  If  
any one

has
MacBook Intel CPU running 10.4.x, please let me know.

Anyone run into the similar problem?



Are you referring to a specific sample code?

Which notification/event are you referring to?

When there's a display strangeness in NSTableView/NSOutlineView,  
the first

thing to check is that reloadData is called before at least once.



___

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: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2008-09-08 Thread Kyle Sluder
2008/9/8 Adam Strzelecki <[EMAIL PROTECTED]>:
> Don't want to hammer here too much, but I just want to have any feedback
> from Apple if this problem is known and if there's any chance to get it
> fixed.

If you want a response from Apple, file a bug report at
bugreport.apple.com.  Otherwise, there's no guarantee anyone from
Apple will even see your message.

--Kyle Sluder
___

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]


Crash in NSOpenPanel. Garbage collection thread

2008-09-08 Thread David
I've found other reports of NSOpenPanel crashing with garbage collection,
but I haven't found a workaround.
Does anyone know what scenarios cause this? It appears random or timing
dependent, but is a serious issue.

It happens in my application sometimes frequently, sometimes not.

With this current crash, the NSOpenPanel showed up except without listing
any files, then it crashed.

Here's the stack trace for the offending thread,

#0  0x94ea4cf0 in __CFTypeCollectionRelease ()

#1  0x94e71d49 in __CFDictionaryDeallocate ()

#2  0x913a42d1 in -[NSCFDictionary finalize] ()

#3  0x90ec9976 in finalizeOneObject ()

#4  0x9264ddab in foreach_block_do ()

#5  0x90ec9b3b in batchFinalize ()

#6  0x90ec9e02 in batchFinalizeOnTwoThreads ()

#7  0x9264ef0e in auto_collect_internal ()

#8  0x9264fb8f in auto_collection_thread ()

#9  0x962206f5 in _pthread_start ()

#10 0x962205b2 in thread_start ()


Here are all the threads editing out my application specific layers


Thread 12 (process 10123 thread 0xa17b):

#0  0x961ef506 in semaphore_timedwait_signal_trap ()

#1  0x9622184f in _pthread_cond_wait ()

#2  0x962230d3 in pthread_cond_timedwait_relative_np ()

#3  0x92c601ba in TSWaitOnConditionTimedRelative ()

#4  0x92c80ecc in MPWaitOnQueue ()

#5  0x905e2f24 in TFolderSizeTask::FolderSizeTaskProc ()

#6  0x92c7f463 in PrivateMPEntryPoint ()

#7  0x962206f5 in _pthread_start ()

#8  0x962205b2 in thread_start ()


Thread 11 (process 10123 thread 0xa083):

#0  0x961ef506 in semaphore_timedwait_signal_trap ()

#1  0x9622184f in _pthread_cond_wait ()

#2  0x962230d3 in pthread_cond_timedwait_relative_np ()

#3  0x92c601ba in TSWaitOnConditionTimedRelative ()

#4  0x92c80ecc in MPWaitOnQueue ()

#5  0x905e2f24 in TFolderSizeTask::FolderSizeTaskProc ()

#6  0x92c7f463 in PrivateMPEntryPoint ()

#7  0x962206f5 in _pthread_start ()

#8  0x962205b2 in thread_start ()


Thread 10 (process 10123 thread 0x9b03):

#0  0x9623f5e2 in select$DARWIN_EXTSN ()

#1  0x94ead50f in __CFSocketManager ()

#2  0x962206f5 in _pthread_start ()

#3  0x962205b2 in thread_start ()


Thread 9 (process 10123 thread 0x9403):

#0  0x9621ff66 in kevent ()

#1  0x94e7749f in __monitor_file_descriptor__ ()

#2  0x962206f5 in _pthread_start ()

#3  0x962205b2 in thread_start ()


Thread 8 (process 10123 thread 0x8703):

#0  0x961ef506 in semaphore_timedwait_signal_trap ()

#1  0x9622184f in _pthread_cond_wait ()

#2  0x962230d3 in pthread_cond_timedwait_relative_np ()

#3  0x92c601ba in TSWaitOnConditionTimedRelative ()

#4  0x92c80ecc in MPWaitOnQueue ()

#5  0x905e8901 in TPropertyTask::PropertyTaskProc ()

#6  0x92c7f463 in PrivateMPEntryPoint ()

#7  0x962206f5 in _pthread_start ()

#8  0x962205b2 in thread_start ()


Thread 7 (process 10123 thread 0x7f5b):

#0  0x961f668e in __semwait_signal ()

#1  0x96221986 in _pthread_cond_wait ()

#2  0x9622136d in pthread_cond_wait$UNIX2003 ()

#3  0x92c8124f in TSWaitOnCondition ()

#4  0x92c6018e in TSWaitOnConditionTimedRelative ()

#5  0x92c80ecc in MPWaitOnQueue ()

#6  0x905e0fda in TNodeSyncTask::SyncTaskProc ()

#7  0x92c7f463 in PrivateMPEntryPoint ()

#8  0x962206f5 in _pthread_start ()

#9  0x962205b2 in thread_start ()


Thread 6 (process 10123 thread 0x7003):

#0  0x961ef4a6 in mach_msg_trap ()

#1  0x961f6c9c in mach_msg ()

#2  0x94ea20ce in CFRunLoopRunSpecific ()

#3  0x94ea2d54 in CFRunLoopRun ()

#4  0x905d601c in TFSEventsNotificationTask::FSEventsNotificationTaskProc ()

#5  0x92c7f463 in PrivateMPEntryPoint ()

#6  0x962206f5 in _pthread_start ()

#7  0x962205b2 in thread_start ()


Thread 5 (process 10123 thread 0x6b03):

#0  0x961ef4a6 in mach_msg_trap ()

#1  0x961f6c9c in mach_msg ()

#2  0x94ea20ce in CFRunLoopRunSpecific ()

#3  0x94ea2d54 in CFRunLoopRun ()

#4  0x905d5ea3 in TSystemNotificationTask::SystemNotificationTaskProc ()

#5  0x92c7f463 in PrivateMPEntryPoint ()

#6  0x962206f5 in _pthread_start ()

#7  0x962205b2 in thread_start ()


Thread 4 (process 10123 thread 0x640f):

#0  0x961ef506 in semaphore_timedwait_signal_trap ()

#1  0x9622184f in _pthread_cond_wait ()

#2  0x962230d3 in pthread_cond_timedwait_relative_np ()

#3  0x912dbe8c in -[NSCondition waitUntilDate:] ()

#4  0x912dbca0 in -[NSConditionLock lockWhenCondition:beforeDate:] ()

#5  0x912dbc05 in -[NSConditionLock lockWhenCondition:] ()

#6  0x96946470 in -[NSUIHeartBeat _heartBeatThread:] ()

#7  0x91295f1d in -[NSThread main] ()

#8  0x91295ac4 in __NSThread__main__ ()

#9  0x962206f5 in _pthread_start ()

#10 0x962205b2 in thread_start ()


Thread 3 (process 10123 thread 0x5613):

#0  0x961ef4a6 in mach_msg_trap ()

#1  0x961f6c9c in mach_msg ()

#2  0x94ea20ce in CFRunLoopRunSpecific ()

#3  0x94ea2cf8 in CFRunLoopRunInMode ()

#4  0x90d49a32 in CFURLCacheWorkerThread ()

#5  0x962206f5 in _pthread_start ()

#6  0x962205b2 in thread_start ()


Thread 2 (process 10123 thread 0x2903):

#0  0x94ea4cf0 in __CFTypeCollectionRelease ()

#1  0x94e71d49 in __CFDictionaryDeallocate ()

#2  0x913a42d1 in -[N

Re: NSRunLoop run semantics

2008-09-08 Thread Chris Kane

On Sep 7, 2008, at 9:33, Roman Kishchenko wrote:

Hi,
I am new to Cocoa and have been experimenting with NSRunLoop. I would
appreciate clarification about 'run' method semantics. The  
documentation

states that:

"If no input sources or timers are attached to the run loop, this  
method

exits immediately"

Yet, in my thread example below, the 'run' invocation blocks and  
does not
exit. MyThread is a simple NSThread subclass. No custom input  
sources or

timers are registered with the run loop. Unless I misunderstand the
documentation or there are some 'hidden' input sources or timers are
registered with the run loop, I would expect 'run' to exist  
immediately.

Would much appreciate help with sorting this out!

Thanks,
Roman Kishchenko

@implementation MyThread

- (void)main {
   NSLog(@"++ start");
   NSRunLoop *loop = [NSRunLoop currentRunLoop];
   [loop run];
   NSLog(@"++ finish");
}

@end
___



This has come up before several times on this list over the years, so  
there are a few answers already in the archives.  But I have an idea  
for a new way to explain it.


The documentation is correct.  However, it's trying to warn you that  
the method *can* return, not explain how to get it to return.


The mistake people make is in assuming that they control the contents  
of a run loop (or even a run loop mode).  However, the run loop is a  
global object, accessible to all code run on that thread (and perhaps  
other threads if you squirrel away a copy of the pointer somewhere).   
In particular, all frameworks that you call into, directly or  
indirectly, may access it and do things to it, including putting  
things in it.


I think you are intuiting exactly this when you mention "custom" and  
"hidden" input sources.


Try the -run...BeforeDate: method in a conditional loop if you want  
block in the run loop most of the time, but want to bail under some  
conditions (which would then be the test of the loop).



Chris Kane
Cocoa Frameworks, Apple

___

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 do create a DMG with license agreement?

2008-09-08 Thread David
Is it just me or should an Apple operating system facility have a
public API rather than apparently a non-published API?

Are there many things in the Mac world with unpublished APIs where you
have to rely on 3rd party tools to access operating system functions?
Or is the DMG format unique because of some legacy issue?

Thanks

On Mon, Sep 8, 2008 at 6:16 PM, Seth Willits <[EMAIL PROTECTED]> wrote:
> On Sep 8, 2008, at 1:47 PM, Dave Carrigan wrote:
>
>>> Am I looking in the right place on how to add a license agreement to a
>>> DMG?
>>
>> You're looking in the right place, but IMHO, you're better off just
>> forking over $20 for DropDMG, which does it all for you.
>
> http://www.araelium.com/dmgcanvas/
>
>
> --
> Seth Willits
>
>
>
>
> ___
>
> 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/enki1711%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: How do create a DMG with license agreement?

2008-09-08 Thread Seth Willits

On Sep 8, 2008, at 5:22 PM, David wrote:


Is it just me or should an Apple operating system facility have a
public API rather than apparently a non-published API?

Are there many things in the Mac world with unpublished APIs where you
have to rely on 3rd party tools to access operating system functions?


The APIs involved *are* published.

Just because there's an API does not mean there shouldn't be a tool  
that does it.






Or is the DMG format unique because of some legacy issue?



The reason creating a DMG _with a license_ is such a PITA is a legacy  
issue. It's still documented though.



--
Seth Willits




___

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: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Jerry Krinock


On 2008 Sep, 08, at 15:14, Nick Zitzmann wrote:

What is the output of "lipo -info {path to the app contents folder}/ 
Frameworks/SSSQLiter.framework/SSSQLiter"?


Thanks for reading, Nick.  The answer is:

Architectures in the fat file: /Users/jk/Documents/Programming/Builds/ 
Release/Bookdog.app/Contents/Frameworks/SSSQLiter.framework/SSSQLiter  
are: ppc7400 i386


Looks like I better go find out if ppc7400 == {G3,G4} or only {G4},  
which would explain the problem.


Maybe a new "feature" in Xcode which I have just discovered the hard  
way?


Jerry
___

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: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Shawn Erickson
On Mon, Sep 8, 2008 at 5:30 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote:

> Looks like I better go find out if ppc7400 == {G3,G4} or only {G4}, which
> would explain the problem.

PowerPC 7400 is targeting G4 or G5 processors only.

What target SDK and target OS is the project configured for? IIRC
specifying a target of 10.5 for both enables the use of ppc7400 for
ARCHS (or in theory it coudl...). ...or maybe you have AltiVec
enabled?

-Shawn
___

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: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Andrew Farmer

On 08 Sep 08, at 17:30, Jerry Krinock wrote:

On 2008 Sep, 08, at 15:14, Nick Zitzmann wrote:
What is the output of "lipo -info {path to the app contents folder}/ 
Frameworks/SSSQLiter.framework/SSSQLiter"?


Thanks for reading, Nick.  The answer is:

Architectures in the fat file: /Users/jk/Documents/Programming/ 
Builds/Release/Bookdog.app/Contents/Frameworks/SSSQLiter.framework/ 
SSSQLiter are: ppc7400 i386


Looks like I better go find out if ppc7400 == {G3,G4} or only {G4},  
which would explain the problem.


G3 = PPC750, G4 = PPC7400/7450, G5 = PPC970. Check your build settings.
___

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: NSTableView bindings and current selection

2008-09-08 Thread Jason Wiggins

On 09/09/2008, at 06:19 , Corbin Dunn wrote:


On Sep 8, 2008, at 3:30 AM, Jason Wiggins wrote:

Hello all,

I have a tableView (showing query results) that has its values  
bound to an array controller; that works fine. I also have a  
NSPathControl showing the path of the selected item; this works  
fine too. I have implemented a right-click contextual menu to "Show  
in Finder..." the selected item in the tableView.
My question is, how do I get the path of the selected item so my  
showInFinderMenuAction: method does as it's supposed to do?
To be totally honest, even though I have got the menu working (it's  
a menuForEvent:theEvent method) and I can log the selected row  
correctly, I'm unsure of what to do next to implement the  
contextual menu.
As the tableView implements bindings, I can't see a way of getting  
the selected items row/column value, let alone that row's path  
reference.


Any help would be greatly appreciated.


In addition to what Ben said, please look at the  
DragNDropOutlineView demo app, which does this (albeit without  
bindings).


corbin



Thanks Ben and Corbin, I'll check this out.

Regards,
Jason
___

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: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Jerry Krinock


On 2008 Sep, 08, at 17:52, Shawn Erickson wrote:


On Mon, Sep 8, 2008 at 5:30 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote:

Looks like I better go find out if ppc7400 == {G3,G4} or only {G4},  
which

would explain the problem.


PowerPC 7400 is targeting G4 or G5 processors only.


Yup.


What target SDK and target OS is the project configured for? IIRC
specifying a target of 10.5 for both enables the use of ppc7400 for
ARCHS


Yup.  Although my Target's architecture setting was the generic "ppc  
i386", some mouse had snuck in and changed its SDK setting from  
MacOSX10.4u.sdk to MacOSX10.5.sdk.  Since Leopard won't run on a G3,  
gcc decided to change the product's architecture to ppc7400.  Changed  
it back to 10.4u, rebuilt, and now lipo gives the correct answer of  
"i386 ppc".


Thanks, all.  So I've learned another near-obsolete fact today.  Oh,  
well.


 
___


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 do create a DMG with license agreement?

2008-09-08 Thread David Melgar

Great!
Can you give me a hint where to look for documentation on the API?  
I've looked and couldn't find it.


Thanks


Sent from my iPhone

On Sep 8, 2008, at 8:29 PM, Seth Willits <[EMAIL PROTECTED]> wrote:


On Sep 8, 2008, at 5:22 PM, David wrote:


Is it just me or should an Apple operating system facility have a
public API rather than apparently a non-published API?

Are there many things in the Mac world with unpublished APIs where  
you

have to rely on 3rd party tools to access operating system functions?


The APIs involved *are* published.

Just because there's an API does not mean there shouldn't be a tool  
that does it.






Or is the DMG format unique because of some legacy issue?



The reason creating a DMG _with a license_ is such a PITA is a  
legacy issue. It's still documented though.



--
Seth Willits




___

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/enki1711%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]


Finding out in code how much memory my application uses

2008-09-08 Thread Aaron VonderHaar
Hi,  I am trying to write some automated scenario tests that verify
that my application meets it's the memory usage constraint
requirements.

What API is available to find out how much memory an
application/process/thread has allocated?

I have looked at the documentation for NSZone, NSProcessInfo,
NSThread, NSAutoreleasePool, NSTask, NSApplication, the "Interacting
with the Operating System" guide and the "Memory Management
Programming Guide for Cocoa" guide but I have not found any
information about how to find out the number of pages, bytes or
objects that are in use.

Has anyone accessed this type of information in their own programs?

Thanks,
--Aaron VonderHaar
___

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: Finding out in code how much memory my application uses

2008-09-08 Thread Jason Coco
I would suggest using the DTrace stuff... either using instruments or  
using DTrace scripts directly... there is tons of good information  
about DTrace at google.


You can also look at /usr/include/mach directory for various mach  
calls regarding process statistics, including memory usage (all the  
stats can be grok'd from there including phyiscal memory used, virtual  
memory used, wired memory used as well as faults and other memory  
info)...


On Sep 8, 2008, at 21:04 , Aaron VonderHaar wrote:


Hi,  I am trying to write some automated scenario tests that verify
that my application meets it's the memory usage constraint
requirements.

What API is available to find out how much memory an
application/process/thread has allocated?

I have looked at the documentation for NSZone, NSProcessInfo,
NSThread, NSAutoreleasePool, NSTask, NSApplication, the "Interacting
with the Operating System" guide and the "Memory Management
Programming Guide for Cocoa" guide but I have not found any
information about how to find out the number of pages, bytes or
objects that are in use.

Has anyone accessed this type of information in their own programs?

Thanks,
--Aaron VonderHaar
___

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/jason.coco 
%40gmail.com


This email sent to [EMAIL PROTECTED]




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: Using control:didFailToFormatString:errorDescription:

2008-09-08 Thread Rohan Lloyd


On 9 Sep 2008, at 12:48 AM, Matt Neuburg wrote:

On Mon, 8 Sep 2008 11:23:30 +1000, Rohan Lloyd [EMAIL PROTECTED]> said:

I don't like the vague "Format Error" and want to display my own
message, so I've written my own
control:didFailToFormatString:errorDescription: method (In my
NSWindowController subclass), and set the text field delegate to  
point

at it.

- (BOOL)control: (NSControl*)control didFailToFormatString:
(NSString*)str errorDescription: (NSString*)errDescription
{
   NSError *error = [NSError errorWithDomain: NSCocoaErrorDomain
code: NSFormattingError userInfo: nil]; // Add custom description  
later

   [control presentError: error modalForWindow: [self window]
delegate: nil
  didPresentSelector: nil
 contextInfo: nil];

   return YES;
}


First thing's first. Documentation says return value should be:


Return Value
YES if the value in the string parameter should be accepted as is;  
otherwise,

NO if the value in the parameter should be rejected.


If you don't like the string, you should not be returning YES. m.


You're right I should have read that part of the documentation.  
However, I had tried returning NO, and it didn't really help.


If I return NO, not only do I get my error displayed, but the standard  
error dialog is also shown. Which suggests that the return value is  
overloaded with a "I have handled this error" meaning. This is backed  
up by the following page that I read:


  ://initgraf.blogspot.com/2007/11/customizing-errors-generated-by.html

Where it says, "You need to return YES, or else you'll get both your  
custom error and the standard error."



--
Rohan Lloyd


___

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]


While we're on the subject of DMG's for software distribution...

2008-09-08 Thread Chris Markle
Hi Folks,

(Not super saavy about Mac OS X here so bear with me please...)

On the subject of DMG's... I inherited a software product that
currently ships using some moldy-oldy version of the Wise installer. I
think basically all it does is put the application _folder_ into the
Applications folder. In the application folder I am referring to is
the application bundle, some PDFs (doc) and a Plugins folder with one
plugin bundle in it. I think the application expects the plugins to be
in this specific place i.e., the Plugins folder in the applications
folder.

I'd prefer to ship this as a DMG... But if I understand DMG-based
delivery correctly, the idea is that Mac users are used to this and
"know" to copy the application bundle to the Applications folder. But
I need the user to copy the application folder (not just the bundle)
into the Applications folder. otherwise the plugin won't be found and
life as we know it will cease ;)

Is DMG just a non-starter for this or is there a way with a DMG format
to someone clue in the user that the folder needs to be copied, not
just the application bundle.

Thanks in advance...

Chris
___

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: While we're on the subject of DMG's for software distribution...

2008-09-08 Thread David
I'm certainly no expert but...
Application bundles are just directories which some special
characteristics that makes Finder hide the fact that its a directory
to make it look like an application. Finder just looks at any
directory that ends in .app and thinks its an application. It then
looks inside for an application, but in anycase, it doesn't show the
user the directory as a directory.

If the files you need are shipped as part of the application, the
appropriate place to put them is somewhere within the application
bundle (directory).

If the files are added during runtime or after installation, then they
typically go in the user directory in ~/Library/Application
Support/programName.

Some of this is spelled out in "File System Overview",
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/BPFileSystem.html

On Mon, Sep 8, 2008 at 11:31 PM, Chris Markle <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> (Not super saavy about Mac OS X here so bear with me please...)
>
> On the subject of DMG's... I inherited a software product that
> currently ships using some moldy-oldy version of the Wise installer. I
> think basically all it does is put the application _folder_ into the
> Applications folder. In the application folder I am referring to is
> the application bundle, some PDFs (doc) and a Plugins folder with one
> plugin bundle in it. I think the application expects the plugins to be
> in this specific place i.e., the Plugins folder in the applications
> folder.
>
> I'd prefer to ship this as a DMG... But if I understand DMG-based
> delivery correctly, the idea is that Mac users are used to this and
> "know" to copy the application bundle to the Applications folder. But
> I need the user to copy the application folder (not just the bundle)
> into the Applications folder. otherwise the plugin won't be found and
> life as we know it will cease ;)
>
> Is DMG just a non-starter for this or is there a way with a DMG format
> to someone clue in the user that the folder needs to be copied, not
> just the application bundle.
>
> Thanks in advance...
>
> Chris
> ___
>
> 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/enki1711%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: How do create a DMG with license agreement?

2008-09-08 Thread Markus Spoettl

On Sep 8, 2008, at 6:02 PM, David Melgar wrote:

Great!
Can you give me a hint where to look for documentation on the API?  
I've looked and couldn't find it.



Yes here: http://developer.apple.com/sdk/

Look for: Software License Agreements for UDIFs (DMG), it says:

Mac OS X's Disk Copy has the ability to display a multi-lingual  
software license agreement (SLA) before mounting a disk image. This  
SDK explains how to add license agreements to Mac OS X-native UDIF  
disk images.



And you can download it here:



However, I think the OP's point was that the SDK - while it describes  
what you need to do in order to get this into your DMG - offers no  
tools or help to actually do it, it just outlines the major steps  
involved.


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: SSCrypto to PHP

2008-09-08 Thread Jerry Krinock

Hello Walter,

Since your message has been languishing for over 8 hours now I figured  
that my two cents might be better than nothing.  I spent a few minutes  
reading your code but got too confused.  Example:



NSString *password = secretMessage;


Seems weird to set your password equal to the message.

Anyhow, assuming that you've done all this for good reason, you have  
to realize that you're dealing with some pretty poorly documented API  
there, OpenSSL and SSCrypto.  I recently had the fun of creating an  
RSA signature using Perl's OpenSSL wrapper and verifying with the  
openssl library in my Cocoa app.  It took a day or two of guessing  
before I got it working.  The only advice I can give is to not assume  
anything, doubt the documentation, watch out for hidden hash  
functions, try to strip your code down to the barest essential and  
don't be afraid to poke around inside SSCrypto.


___

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: While we're on the subject of DMG's for software distribution...

2008-09-08 Thread Seth Willits

On Sep 8, 2008, at 8:31 PM, Chris Markle wrote:


I'd prefer to ship this as a DMG... But if I understand DMG-based
delivery correctly, the idea is that Mac users are used to this and
"know" to copy the application bundle to the Applications folder. But
I need the user to copy the application folder (not just the bundle)
into the Applications folder. otherwise the plugin won't be found and
life as we know it will cease ;)


You can set the background image of the dmg to explain it, but some  
users will not do what you say and manually copy it incorrectly.


Your two options to ensure correct installation would be to:
a) use a package installer
b) put the plugins and docs inside of your application's bundle.



--
Seth Willits




___

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 create a GUID?

2008-09-08 Thread Phil
On Tue, Sep 9, 2008 at 12:13 AM, Chris Suter <[EMAIL PROTECTED]> wrote:
> On Leopard (and possibly earlier–I haven't checked), it appears that the
> string returned is actually a UUID created with the CFUUID functions
> concatenated with the process ID and the result of mach_absolute_time() so
> the result isn't a proper UUID. I'm not sure where the host name is coming
> from; it's possible that the CFUUID functions incorporate it somehow.
>

The documentation doesn't specify any particular format for the string
returned, only the information used to seed it---I wouldn't recommend
depending on this method always returning a UUID incase this changes
(even though it probably won't).

Phil
___

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: While we're on the subject of DMG's for software distribution...

2008-09-08 Thread Peter N Lewis

At 20:31 -0700 8/9/08, Chris Markle wrote:

In the application folder I am referring to is
the application bundle, some PDFs (doc) and a Plugins folder with one
plugin bundle in it. I think the application expects the plugins to be
in this specific place i.e., the Plugins folder in the applications
folder.


My recommendation for this would be:

1 Put the PDFs in the Resources folder in the app, and add Help menu 
entries to display them.


2a Put the Plug-Ins folder in the Contents folder in the app and use 
it from there; OR
2b Put the Plug-Ins folder in the Resources folder, and on launch 
copy it in to ~/Library/Application Support/Your App Name/Plug-Ins 
and use it there.


3 Forget about the dmg and use .zip instead.  There is no real reason 
to use dmg except for the pretty background, and it adds confusion to 
the users who run it from within the disk image and don't understand 
why it then disappears when they log out.  We switcher from .dmg to 
.zip and (like other developers) got zero comments about the change.


BTW, would someone please standardize on the spelling and 
capitalization of "Plug-Ins"?!  It is spelled


Plug-Ins
Plug-ins
PlugIns
Plugins

and probably othes.

Plug-Ins seems the most common.

Enjoy,
   Peter.

--
  Keyboard Maestro 3 Now Available!
Now With Status Menu triggers!

Keyboard Maestro  Macros for your Mac
   
___

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: While we're on the subject of DMG's for software distribution...

2008-09-08 Thread Kyle Sluder
On Tue, Sep 9, 2008 at 1:34 AM, Peter N Lewis <[EMAIL PROTECTED]> wrote:
> 1 Put the PDFs in the Resources folder in the app, and add Help menu entries
> to display them.

Pro Tools does this.  It's incredibly frustrating to have to launch
the app just to get at the documentation.  I happen to know that you
can open the app bundle, but who is to expect that a normal user will
know?

> 2a Put the Plug-Ins folder in the Contents folder in the app and use it from
> there; OR

This makes sense, because you can then use -[NSBundle
builtInPlugInsPath] to get to them.

> 2b Put the Plug-Ins folder in the Resources folder, and on launch copy it in
> to ~/Library/Application Support/Your App Name/Plug-Ins and use it there.

This isn't helpful to the user if they want to move or copy the
application.  The OS does a good job of presenting the user the
appearance of a monolithic application object.  Granted, your plug-in
might rely on code that gets installed elsewhere, so this might not
matter.  But, for example, I expect that when I add Dreamweaver
plugins, like the very important updated WebDAV plugin bundle, that I
can move the app around and not lose it.

Better yet, search not only in the bundle but also in a few other
sensible locations.

> 3 Forget about the dmg and use .zip instead.  There is no real reason to use
> dmg except for the pretty background, and it adds confusion to the users who
> run it from within the disk image and don't understand why it then
> disappears when they log out.  We switcher from .dmg to .zip and (like other
> developers) got zero comments about the change.

ZIP files don't get the special treatment Internet-enabled DMGs do.
For one, if your Internet-enabled DMG only contains your app bundle,
Safari will unwrap the executable and throw away the DMG.  Also, it is
a very convenient wrapper for holding things like documentation,
uninstallers, etc.  I can also very easily burn a CD from the DMG --
very important as I found out when I accidentally trashed my network's
repository of software.

> BTW, would someone please standardize on the spelling and capitalization of
> "Plug-Ins"?!  It is spelled
>
> Plug-Ins
> Plug-ins
> PlugIns
> Plugins

According to the documentation
(http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingCode/Tasks/LoadingBundles.html#//apple_ref/doc/uid/20001273-99488-BAJFBAJB),
PlugIns is correct.  Plug-ins is used as a fallback.

--Kyle Sluder
___

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]