Re: My alert is not firing at all

2015-12-26 Thread Jack Carbaugh
Is it connected to the interface ? if you’re tapping the button and it’s not 
working, first place to look is to see if the button is connected to the action.

> On Dec 26, 2015, at 7:11 AM, Roland King  wrote:
> 
> What do you mean by it doesn’t fire? It doesn’t show the alert, or it doesn’t 
> do anything after it shows the alert when you hit the dismiss button? 
> 
> I wrote code very similar to this today .. with an extra button or two, and 
> it was fine. 
> 
>> On 26 Dec 2015, at 19:40, Scott Berry  wrote:
>> 
>>  Hello there,
>> 
>> Here is the code I wrote to fire off my alert but when I run the program on 
>> the device the alert doesn’t want to fire so I am wondering what I have done 
>> wrong.  I use Voiceover.
>> 
>> // Alert Message for first load.
>>   @IBAction func buttonTapped(sender: AnyObject) {
>>   let alertController = UIAlertController(title: "First Run Database 
>> Alert", message:
>>   "Welcome to Flying With Voice!  Please allow us to gather some 
>> airport information.  Talking Technologies is not responsible if you do not 
>> allow us to gather this information every 56 (fifty-six) days.", 
>> preferredStyle: UIAlertControllerStyle.Alert)
>>   alertController.addAction(UIAlertAction(title: "Dismiss", style: 
>> UIAlertActionStyle.Default,
>>   handler: nil))
>> 
>>   self.presentViewController(alertController, animated: true, 
>> completion: nil)
>>   }
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
>> 
>> This email sent to r...@rols.org
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com
> 
> This email sent to intrn...@aol.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: a way to clear inactive RAM

2012-11-06 Thread Jack Carbaugh

On Nov 6, 2012, at 3:25 PM, Jack Carbaugh intrn...@me.com wrote:

 Facebook is a safari killer. if left open, it will bring down a system. And 
 by bring down I mean, make it so unresponsive that the only option is a 
 forced reboot via power button. It happened everyday on my other half's clean 
 system, until i set up automatic log off. (He could never remember to just 
 close the tab.)
 
 
 
 On Nov 6, 2012, at 2:41 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote:
 
 On 06.11.2012, at 16:08, Alex Zavatone z...@mac.com wrote:
 Actually, that's not always the case.  As I use Safari through out the day, 
 Safari ends up eating 6 to 12 GB of data on my 16 GB system.  Frequently, I 
 need to issue a purge to get back a spare GB or few hundred MB.  Plus, if 
 you're booting off, or have your swap file on an SSD disk related 
 performance penalties will be much less than if using an HD to hold the 
 swap file.  
 
 
 Err ... if I understand correctly, you're nuking the caches used by the 
 system and other applications to compensate for the problem that Safari, 
 when left open, leaks like a sieve ... ? Those two things are orthogonal.
 
 Cheers,
 -- Uli Kusterer
 The Witnesses of TeachText are everywhere...
 http://www.masters-of-the-void.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:
 https://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com
 
 This email sent to intrn...@aol.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: a way to clear inactive RAM

2012-11-06 Thread Jack Carbaugh
Facebook is a safari killer. if left open, it will bring down a system. And by 
bring down I mean, make it so unresponsive that the only option is a forced 
reboot via power button. It happened everyday on my other half's clean system, 
until i set up automatic log off. (He could never remember to just close the 
tab.)
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [iOS] setting table style for root view controller of a navigation controller

2010-12-02 Thread Jack Carbaugh
The controller won't have a way to specify the style of the uitableview, but 
the actual instantiated uitableview in the XIB will however ... select the 
uitableview from the list view of the xib contents and you can select it's 
style in the inspector.

inline: Screen shot 2010-12-02 at 8.44.14 AM.png

On Dec 1, 2010, at 9:58 PM, Donald Hall wrote:

 Matt, Jack, and Roland,
 
 Thanks for your replies.
 
 I have come to the conclusion that what I wanted to do is not easily done 
 unless the table view controller has its own nib file. In IB if you don't 
 specify that the table view controller that is the root view controller of a 
 navigation controller has its own nib file, there is no access to the actual 
 table view in IB, so no way there to specify the table style. (The inspector 
 window for a table view controller has no setting to specify the style.) 
 Hitting the disclosure triangle for the custom table view controller in the 
 main window nib file in that case only shows the Navigation Item - it doesn't 
 show the table view. To access the controller's table view you have to have a 
 separate nib file for the table view controller and tell the main window nib 
 in the Attributes Inspector to load from this other nib.
 
 After re-creating my class with its own nib file I now have it working.
 
 I would say the table view not showing under the table view controller in the 
 main window nib file is a bug, but perhaps there is a reason for this that I 
 don't see.
 
 Thanks again,
 
 Don
 
 On Wed, 1 Dec 2010 00:02:00 -0600, Donald Hall d...@appsandmore.com said:
 What is the best way to set the style of the table views? I want at
 least one of my table views to have a grouped style, but I can see no
 easy way of specifying this.
 
 You don't see:
 
 (1) table view's initWithFrame:style:
 
 (2) table view controller's initWithStyle:
 
 (3) the style pop-up menu in the nib
 
 ??? m.
 
 --
 matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/
 A fool + a tool + an autorelease pool = cool!
 AppleScript: the Definitive Guide - Second Edition!
 http://www.apeth.net/matt/default.html#applescriptthings
 
 
 -- 
 Donald S. Hall, Ph.D.
 Apps  More Software Design, Inc.
 d...@appsandmore.com
 http://www.appsandmore.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/intrntmn%40aol.com
 
 This email sent to intrn...@aol.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 arch...@mail-archive.com

Re: [iOS] setting table style for root view controller of a navigation controller

2010-12-01 Thread Jack Carbaugh
set the style property of the table view to  UITableViewStyleGrouped

controller.view.style = UITableViewStyleGrouped

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html

On Dec 1, 2010, at 1:02 AM, Donald Hall wrote:

 Hi all,
 
 I have a tab bar based iOS application. The controllers for each tab bar item 
 are UINavigationControllers, and the root view controllers for each 
 navigation controller are custom UITableViewControllers.
 
 What is the best way to set the style of the table views? I want at least one 
 of my table views to have a grouped style, but I can see no easy way of 
 specifying this.
 
 Here is what I have come up with so far. It seems rather convoluted.
 
 1. In my app delegate in didFinishLaunchingWithOptions create an instance 
 of the custom table view controller using initWithStyle and the Grouped 
 style.
 
 2. Create an instance of UINavigationController using 
 initWithRootViewController, specifying the controller created in step 1 as 
 the root view controller.
 
 3. Alter the viewControllers property of my UITabBarController (the root 
 controller of the app) to include the navigation controller created in step 2.
 
 Is there a simpler way that I am missing? I pored over the docs, but could 
 not find anything easier that the above.
 
 Thanks in advance for any assistance.
 
 Don
 -- 
 Donald S. Hall, Ph.D.
 Apps  More Software Design, Inc.
 d...@appsandmore.com
 http://www.appsandmore.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/intrntmn%40aol.com
 
 This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: [iOS] setting table style for root view controller of a navigation controller

2010-12-01 Thread Jack Carbaugh
You are correct ... my apologies ... you can set the table style in the XIB or 
when programmatically with the initWithFrame:style: 


initWithFrame:style:

On Dec 1, 2010, at 8:17 AM, Roland King wrote:

 That property is read only. 
 
 On 01-Dec-2010, at 8:23 PM, Jack Carbaugh wrote:
 
 set the style property of the table view to  UITableViewStyleGrouped
 
 controller.view.style = UITableViewStyleGrouped
 
 http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html
 
 On Dec 1, 2010, at 1:02 AM, Donald Hall wrote:
 
 Hi all,
 
 I have a tab bar based iOS application. The controllers for each tab bar 
 item are UINavigationControllers, and the root view controllers for each 
 navigation controller are custom UITableViewControllers.
 
 What is the best way to set the style of the table views? I want at least 
 one of my table views to have a grouped style, but I can see no easy way of 
 specifying this.
 
 Here is what I have come up with so far. It seems rather convoluted.
 
 1. In my app delegate in didFinishLaunchingWithOptions create an instance 
 of the custom table view controller using initWithStyle and the Grouped 
 style.
 
 2. Create an instance of UINavigationController using 
 initWithRootViewController, specifying the controller created in step 1 as 
 the root view controller.
 
 3. Alter the viewControllers property of my UITabBarController (the root 
 controller of the app) to include the navigation controller created in step 
 2.
 
 Is there a simpler way that I am missing? I pored over the docs, but could 
 not find anything easier that the above.
 
 Thanks in advance for any assistance.
 
 Don
 -- 
 Donald S. Hall, Ph.D.
 Apps  More Software Design, Inc.
 d...@appsandmore.com
 http://www.appsandmore.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/intrntmn%40aol.com
 
 This email sent to intrn...@aol.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/rols%40rols.org
 
 This email sent to r...@rols.org
 

___

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 arch...@mail-archive.com


Re: [iPhone] Make UIWebView content empty before loading next page

2010-11-19 Thread Jack Carbaugh
Could you not also load a local resource/file from bundle that is empty or as a 
placeholder ?
On Nov 19, 2010, at 9:52 PM, Tharindu Madushanka wrote:

 Hi,
 
 [webView 
 stringByEvaluatingJavaScriptFromString:@document.open();document.close()];
 Solution Works as Bruce said :)
 
 Thanks a lot for all.
 
 Tharindu.
 
 
 On Sat, Nov 20, 2010 at 6:51 AM, Bruce Turner bmtur...@optonline.netwrote:
 
 
 On Nov 19, 2010, at 3:02 PM, cocoa-dev-requ...@lists.apple.com wrote:
 
 On Fri, 19 Nov 2010 14:49:11 +0530, Tharindu Madushanka 
 tharindu...@gmail.com said:
 
 Hi,
 
 I would like to make UIWebView content empty while other page is loading.
 I
 tried loading [webview loadRequest:nil];
 
 And also [webview loadHtmlString:@html/html baseUrl:nil];
 
 Just before my [webview loadRequest:request]; method call.
 
 Still I am having previous html page shown a very little time until next
 page is show. I load content for a button click.. so when I click the
 button
 my webview still has  old content for a very small time.
 
 How could I get rid of that.. can somebody kindly point some way..
 
 
 I have not tried this myself, but keeping in mind that views are not
 redrawn until after your code finished running, I'd suggest trying delayed
 performance to give the view a chance to empty itself before doing the load
 request. m.
 
 
 
 
 
 Something that I have used to clear a UIWebView  when reopening with
 previous content is to execute the following command:
 
   [webView stringByEvaluatingJavaScriptFromString:@
 document.open();document.close()];
 
 This resulted in a blank view. Haven't tried it recently, so I don't know
 if there are any problems with current versions.
 
 
 Bruce Turner
 bmtur...@optonline.net
 
 
 
 ___
 
 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/tharindufit%40gmail.com
 
 This email sent to tharindu...@gmail.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/intrntmn%40aol.com
 
 This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: NSApplicationMain question

2010-04-23 Thread Jack Carbaugh


On Apr 23, 2010, at 12:06 PM, Bill Appleton wrote:


(i'm the guy who wrote supercard if that explains anything to the
old-timers)



Mad respect! Kudos dude. Loved supercard!

jack
___

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 arch...@mail-archive.com


Re: NSApplicationMain question

2010-04-22 Thread Jack Carbaugh
Before you go any further, i highly recommend purchasing a book as  
suggested previously. I recommend the book by Hillegass


Work through a few samples from the book and you will better  
understand apples documentation.


I'm working the other side ... writing windows code with a mac  
background. Documentation and examples have been an amazing help for me.


jack

On Apr 22, 2010, at 6:45 PM, Bill Appleton wrote:


hi all,

thanks for the great advice

for better or worse i am porting a large piece of enterprise  
software from

carbon/windows to cocoa/windows

most of the code is platform independent, but i can't make big  
changes to

the overall structure of the program

so like step one is to replace WindowRef with NSWindow and watch the  
carnage

ensue



thx,

bill





On Thu, Apr 22, 2010 at 3:18 PM, Shawn Erickson shaw...@gmail.com  
wrote:



On Thu, Apr 22, 2010 at 1:34 PM, Bill Appleton
billapple...@dreamfactory.com wrote:

hi all,

thanks for the feedback

i wrote a subclass for NSWindow but now i am wondering how usefull  
that

was


do i have to subclass NSWindow to get events, or can I use  
delegates?


i'm still a bit confused on the event model


I suggest a full stop forget your current carbon application  
for a

while and instead learn Cocoa application development.

I highly recommend grabbing a copy of Cocoa Programming for Mac OS  
X

[1] and working thru all of the examples, etc. in the book. (other
excellent books exist as well but this is the one we use to onboard
new developers)

Don't waste your time thrashing around.

-Shawn

[1]
http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=bxgy_cc_b_text_a


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Button frame to screen rect

2010-04-13 Thread Jack Carbaugh
What would be the easiest way to convert the frame rect of a button in  
a window to a screen rect ?


My goal is to have a window animate out from this button.

For some reason (perhaps lack of coffee), i'm not able to wrap my  
brain around the various convert methods for views.


Thanks!

Jack
___

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 arch...@mail-archive.com


Re: Button frame to screen rect

2010-04-13 Thread Jack Carbaugh

Thanks  for your help.

From this then, I would use the origin point ... of the bounds or  
frame of the button rect, which would give me the equivalent in screen  
coordinates and then just adjust the width/height as necessary for my  
window ?


Again, my thanks


On Apr 13, 2010, at 10:42 AM, Fritz Anderson wrote:


On 13 Apr 2010, at 5:30 AM, Jack Carbaugh wrote:

What would be the easiest way to convert the frame rect of a button  
in a window to a screen rect ?


Search the documentation for symbols beginning with convert; among  
the results:



convertBaseToScreen:

Converts a given point from the window’s base coordinate system to  
the screen coordinate system.


- (NSPoint)convertBaseToScreen:(NSPoint)point

Parameters

point
The point expressed in the window’s base coordinate system.

Return Value

point expressed in screen coordinates.

Availability

 • Available in Mac OS X v10.0 and later.


It converts NSPoints, but you can do the math. You may want to start  
with the bounds rect of the button, and use -[NSView  
convertPoint:toView:] with the second argument nil; it will keep  
working if you ever move the button to an enclosing view.


   — F


___

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 arch...@mail-archive.com


Re: What is the best approach for custom tab bar interface?

2010-04-08 Thread Jack Carbaugh
Any control can tell the tab bar to switch the tabview ... or the tab  
bar itself...


what was suggested was go tabless ... then have a button or any other  
control send a message to the tab bar to switch it's tab. Far easier  
to do this than to subclass the tab bar to display its tabs vertically.


On Apr 8, 2010, at 1:10 PM, Philip Mobley wrote:


On Apr 8, 2010, at 8:22 AM, Gideon King wrote:

Absolutely. Use an NSTabView, but set it to be tabless, and create  
your own control to change the selected tab.


My question isn't how to get the Tabs to work, but the control which  
controls the tab switching.  =)


I need to have a tab style interface, but am not able to use the  
built in NSTabView because the style is not customizable.   
Basically I need something similar in look to the Safari tabs, but  
on a VERTICAL direction.  At this point I am thinking about a  
custom NSView with CALayers for each tab element and then handling  
the MouseDown and MouseUp events to capture the button press.  Or  
is there another approach I can take?


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: NSXML Parsing Problem

2010-03-25 Thread Jack Carbaugh
Typically what i do is download the XML into a string ... then if  
there are special characters that i know about in advance, i can use  
string class methods to replace them in the string before passing off  
to the xml parser. just another option to consider.



jack

On Mar 25, 2010, at 10:34 PM, Dave wrote:


Hi Jens,

Thanks for taking the time to reply. We are a startup and basically  
just trying to get thing going with what we have. I'm downloading  
the XML data via a URL and I could just change the database and  
strip out the offending characters. I was wondering if changing the  
XML charset would solve the problem? From searching the Web I think  
the problem could be that we are assuming UTF-8, I was wondering if  
we changed it to one of the ISO char sets if this would solve it.


Maybe a cool option for NSXML would be to be able to specify the   
pound ; sequence and have it map it to whatever...


Thanks again
Dave


On 25 Mar 2010, at 23:13, Jens Alfke wrote:



On Mar 25, 2010, at 8:47 AM, Dave wrote:

I am getting an error using NSXMLParser if it encounters a British  
Pound Sign - it's encoded as  pound ;   (minus the spaces).

Any idea on how to solve this??


Basic XML only defines a handful of character entities. The other  
common ones are part of HTML. Are you sure this document is valid  
XML?


I'm more familiar with NSXMLDocument than NSXMLParser, so I'm not  
sure how you tell the latter to handle arbitrary character  
entities. Sorry I can't be more help.


—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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: UITable Views and display lags

2010-03-21 Thread Jack Carbaugh
You don't need to overcomplicate downloading the images with an  
NSOperation.


In my experience, downloading asynchronously with an NSURLConnection  
and the delegate methods works far better.


Jack

On Mar 21, 2010, at 12:52 PM, Matt Neuburg wrote:


On Fri, 19 Mar 2010 18:55:12 +0100, WT jrca...@gmail.com said:

On Mar 19, 2010, at 6:40 PM, Michael Davey wrote:

OK, so I have changed the code to show a placeholder image, but I  
am a little
uncertain as to how to fetch the images asynchronously.  I could  
start a
background thread with performSelectorInBackground, but am concerned  
that this

would spawn far too many threads - does anyone have any suggestions?


You might want to use an NSOperationQueue. Define NSOperation  
instances, each
fetching one or more images. For each fetching NSOperation you  
define, you
should also define a cleanup NSOperation, dependent on its  
associated fetching
one, so that when the fetching one ends, the cleanup one then swaps  
the
placeholder image out and the fetched images in. Make sure, though,  
that this
swap happens in the main thread, meaning that the cleanup  
NSOperation should
invoke a -performSelectorInMainThread method, rather than access the  
UI

directly.

I'm just curious: Why is it better to have a fetching NSOperation  
and a
cleanup NSOperation dependent on it, rather than a single  
NSOperation that

fetches and then tells the main thread to show the image? m.

--
matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings



___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh
NSURLConnection does this as well. The main issue i had with using an  
NSOperation/OperationQueue was that is was serial ... using the  
NSURLConnection allowed me to handle MULTIPLE asynchronous downloads  
which, when used with properties allowed near instantaneous UI updates.


With the NSOperation avenue, it took longer, UI updates were not as  
fast as the queue would handle only one operation at a time, in series.


For me, the NSURLConnection route was just better for my specific  
needs and, i think may be as well for the OP.


jack

On Mar 21, 2010, at 1:53 PM, WT wrote:


On Mar 21, 2010, at 6:25 PM, Jack Carbaugh wrote:

You don't need to overcomplicate downloading the images with an  
NSOperation.


In my experience, downloading asynchronously with an  
NSURLConnection and the delegate methods works far better.


Jack


I don't think using NSOperation is overcomplicating things. It's  
entirely trivial to use it and, as far as I know, NSOperationQueue  
takes care of scheduling the threads to make the best use of the  
resources available.


W.=


___

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 arch...@mail-archive.com


Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh
hmmm to be honest, I am not sure ... there is a possibility that i did  
NOT adjust the max # of concurrent operations.


I will look into this and THANK YOU for the insight.


On Mar 21, 2010, at 2:22 PM, WT wrote:

It was serial? Did you, by any chance, set the maximum number of  
running operations to 1? I don't recall for sure now, but that may  
be the default, actually. As far as I know, independent NSOperations  
in the same queue are executed in parallel, subjected to resource  
constraints and the maximum number of running operations.


I'm not disputing your results, by the way. As you said, using  
NSURLConnection might be the best approach in some cases, and  
perhaps the OP's situation as well. I only suggested NSOperation  
because that's what I've successfully used a few times, with minimal  
effort.


I'm about to start a project where I have to do precisely what the  
OP needs to do (fetch and display many images off the web), so I'll  
try both ways, time permitting.


W.

On Mar 21, 2010, at 7:06 PM, Jack Carbaugh wrote:

NSURLConnection does this as well. The main issue i had with using  
an NSOperation/OperationQueue was that is was serial ... using  
the NSURLConnection allowed me to handle MULTIPLE asynchronous  
downloads which, when used with properties allowed near  
instantaneous UI updates.


With the NSOperation avenue, it took longer, UI updates were not as  
fast as the queue would handle only one operation at a time, in  
series.


For me, the NSURLConnection route was just better for my specific  
needs and, i think may be as well for the OP.


jack

On Mar 21, 2010, at 1:53 PM, WT wrote:


On Mar 21, 2010, at 6:25 PM, Jack Carbaugh wrote:

You don't need to overcomplicate downloading the images with an  
NSOperation.


In my experience, downloading asynchronously with an  
NSURLConnection and the delegate methods works far better.


Jack


I don't think using NSOperation is overcomplicating things. It's  
entirely trivial to use it and, as far as I know, NSOperationQueue  
takes care of scheduling the threads to make the best use of the  
resources available.


W.=




___

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 arch...@mail-archive.com


Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh

W 

You were correct, I had not altered the queue to something other than  
the default. After reviewing the docs, i found this ...


 If you specify the value  
NSOperationQueueDefaultMaxConcurrentOperationCount (which is  
recommended), the maximum number of operations can change  
dynamically based on system conditions.



... which, really, i think should be the default, rather than 1. Since  
i was using an NSOperation in another area, i adjusted the queue to  
the NSOperationQueueDefaultMaxConcurrentOperationCount value and  
noticed significant improvement.


Again, my thanks ... and yes, it is great to have alternatives.

jack

On Mar 21, 2010, at 2:42 PM, WT wrote:

And thank you for the NSURLConnection suggestion. It's always good  
to have alternatives. :)


W.

On Mar 21, 2010, at 7:25 PM, Jack Carbaugh wrote:

hmmm to be honest, I am not sure ... there is a possibility that i  
did NOT adjust the max # of concurrent operations.


I will look into this and THANK YOU for the insight.


On Mar 21, 2010, at 2:22 PM, WT wrote:

It was serial? Did you, by any chance, set the maximum number of  
running operations to 1? I don't recall for sure now, but that may  
be the default, actually. As far as I know, independent  
NSOperations in the same queue are executed in parallel, subjected  
to resource constraints and the maximum number of running  
operations.


I'm not disputing your results, by the way. As you said, using  
NSURLConnection might be the best approach in some cases, and  
perhaps the OP's situation as well. I only suggested NSOperation  
because that's what I've successfully used a few times, with  
minimal effort.


I'm about to start a project where I have to do precisely what the  
OP needs to do (fetch and display many images off the web), so  
I'll try both ways, time permitting.


W.

On Mar 21, 2010, at 7:06 PM, Jack Carbaugh wrote:

NSURLConnection does this as well. The main issue i had with  
using an NSOperation/OperationQueue was that is was serial ...  
using the NSURLConnection allowed me to handle MULTIPLE  
asynchronous downloads which, when used with properties allowed  
near instantaneous UI updates.


With the NSOperation avenue, it took longer, UI updates were not  
as fast as the queue would handle only one operation at a time,  
in series.


For me, the NSURLConnection route was just better for my specific  
needs and, i think may be as well for the OP.


jack

On Mar 21, 2010, at 1:53 PM, WT wrote:


On Mar 21, 2010, at 6:25 PM, Jack Carbaugh wrote:

You don't need to overcomplicate downloading the images with an  
NSOperation.


In my experience, downloading asynchronously with an  
NSURLConnection and the delegate methods works far better.


Jack


I don't think using NSOperation is overcomplicating things. It's  
entirely trivial to use it and, as far as I know,  
NSOperationQueue takes care of scheduling the threads to make  
the best use of the resources available.


W.=






___

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 arch...@mail-archive.com


Re: Question about NSScrollView

2010-02-19 Thread Jack Carbaugh

tell your NSScrollView to setAutoHidesScrollers:yes

This should hide the scrollbars until needed.
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html


On Feb 19, 2010, at 3:10 AM, Mario Kušnjer wrote:


Hi all !

So I have a question on how to resolve a little issue I have with  
NSScrollView.
I have created everything programmatically (a little exploration  
task to learn and understand how to do stuff without IB).
I have an NSOutlineView enclosed in an NSScrollView (as recommended  
by documentation).
All works good except for little thing. Since NSOutlineView is not  
populated, content area is empty, but vertical scroller knob

is shown (horizontal not showed).

Question: Why ?

I googled for an answer and got some facts together but don't really  
know how to get to the solution to rectify the issue.


Facts: Scroller in this situation is shown because NSOutlineView has  
NSTableHeader shown (instantiated).
If I set NSOutlineView headerView to nil, it gets released and not  
shown in the NSScrollView, and then there is no scroller knob.


But what if I want to have NSTableHeader ?
Seams to me that if the headerView is ON, NSScrollView makes wrong  
calculation of how much is the content area big and

how much should it be shown.
I have been examining the documentation for NSScrollView and  
NSClipView and found couple of methods that has something to do  
regarding

that but I don't know to make a use of them.

If any one knows something which could point me to the solution it  
will be much appreciated.

Thanks in advance. Bye.

P.S. example picture in attachment

window.jpg

Mario Kušnjer
mario.kusn...@sb.t-com.hr
+385957051982
mariokusnjer (at) Skype


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Question about NSScrollView

2010-02-19 Thread Jack Carbaugh
If you review the documentation, it tells you how to show either the  
vertical or the horizontal scroller.

On Feb 19, 2010, at 6:13 AM, Mario Kušnjer wrote:



On 2010.02.19, at 11:43, Jack Carbaugh wrote:


tell your NSScrollView to setAutoHidesScrollers:yes

This should hide the scrollbars until needed.
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSScrollView_Class/Reference/Reference.html


That's one of the solutions. But then I could also remove headerView  
and evade the problem in the first place. What would be solution if  
I want to have
vertical scroller visible ? I'm thinking more in the way of somehow  
recalculating contentView area before it gets send to the NSClipView  
to be displayed.

Correct ? Wrong?
Thanks for suggestions.


Mario Kušnjer
mario.kusn...@sb.t-com.hr
+385957051982
mariokusnjer (at) Skype



=


___

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 arch...@mail-archive.com


Re: Monitoring other application preferences changes

2010-02-19 Thread Jack Carbaugh
i would think you could use FSEvents to be informed of any changes to  
a .plist file.


On Feb 19, 2010, at 8:24 PM, Sandro Noël wrote:


Greetings.

I'm trying to figure out how to monitor the preferences changes in  
another application's preferences
I would like my application to react to changes made in another  
application settings by the user.


besides reloading the plist on a schedule is there a better way? ( I  
don't like this )

if there is a way to KeyValue Observe it that would be dandy.

Can anyone point me in the right direction ?

Regards.
Sandro Noel.

___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: using a tableview delegate

2010-02-05 Thread Jack Carbaugh
your controller, whether its a window controller or an array  
controller can be the delegate ... you either have to set it in IB or  
use tableViewObject setDelegate. since you are using an  
arraycontroller to drive the table, i'd recommend placing it there.



On Feb 5, 2010, at 5:55 AM, Michael Thon wrote:

I have bound an NSTableView to an array controller which is set to  
entity mode to fetch data from the managed object context.  I would  
like override a method in the table view delegate protocol to  
control how data are displayed in the cell.  When I set the table  
view's delegate to the window controller I get this error whenever I  
delete the last element in the table (using the remove: method of  
the array controller):


*** -[NSArray objectAtIndex:]: index (0) beyond bounds (0)

I get this error even when I have not actually overridden any of the  
delegate methods, I have only set the delegate to the window  
controller.  Is there a method in the NSTableViewDelegate protocol  
that I'm required to override?  I thought they were all optional.


The table view programming guide states that the table view delegate  
is usually the same object that provides data to the table view.  In  
my case it would be an NSArrayController.  Instead of putting my  
delegate methods in the window controller, should I instead subclass  
NSArrayController and put the delegate methods in there?  Doesn't  
make sense to me to make a subclass just to add delegate methods.

Thanks
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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Proper Memory Management

2010-01-19 Thread Jack Carbaugh
It is my understanding that, the array returned as result would be  
auto released. Therefore, you would want to retain it for your use,  
then release it later.



On Jan 19, 2010, at 4:14 PM, Philip Vallone wrote:

Thanks.. Good question. The method in question  
PerformXMLXPathQuery is a wrapper that was obtained:


http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html


NSArray *PerformXMLXPathQuery(NSData *document, NSString *query)
{
   xmlDocPtr doc;

   /* Load XML document */
   doc = xmlReadMemory([document bytes], [document length], ,  
NULL, XML_PARSE_RECOVER);


   if (doc == NULL)
   {
   NSLog(@Unable to parse.);
   return nil;
   }

   NSArray *result = PerformXPathQuery(doc, query);
   xmlFreeDoc(doc);

   return result;
}

How can I tell who has ownership of the Array?

Thanks!



On Jan 19, 2010, at 3:56 PM, Dave Carrigan wrote:



On Jan 19, 2010, at 12:52 PM, Dave DeLong wrote:


None of them.

According to the memory management rules, you're only responsible  
for objects you create via an alloc, new, or copy method,  
which none of these are.  All of these objects are autoreleased.


Unless PerformXMLXPathQuery returns an object that you own. But if  
it does that, it should have been given a better name that has the  
word alloc, new or copy in it.


--
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

___

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/philip.vallone%40verizon.net

This email sent to philip.vall...@verizon.net


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Why is [NSArray arrayWithObjects:] failing for me?

2010-01-04 Thread Jack Carbaugh

This has happened to me often.

On Jan 4, 2010, at 8:24 AM, Dave Keck wrote:

Does anyone else find XCode extremely buggy? I have to continually  
close and
reopen my editing window because the code display gets trashed and  
appears
to scramble my code. It doesn't really change the source code file;  
it just
makes it look as if I've randomly gone through the file deleting  
stuff, and
when I see that happen, I immediately save, close, and reopen the  
window,

and everything is fine.


This bug occurs for me fairly often - it usually happens when doing
something using auto-completion. Luckily, as you said, it doesn't
actually corrupt the file. :)
___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Jack Carbaugh
So in this case, would the SUBview want to send the SUPERview the  
touchesbegan event ?


On Dec 9, 2009, at 4:10 PM, Alexander Spohr wrote:



Am 09.12.2009 um 20:32 schrieb Eric E. Dolecki:

I have a main view that uses touchesBegan. I call up and display a  
subView

on top of the main view, and that subView has it's own touchesBegan.

The subView obstructs the touchesBegan in the main view. Is this  
expected?



Yes. Otherwise no subview of the window would ever get any touches...

Sub does not mean below :)

   atze


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Jack Carbaugh
Why not just fake it ... in other words ... since it's a test, just  
supply some generic data for the screen saver to display. Then, when  
they truly activate it, you provide the real data.


Seems that's what others have done, that i've experienced.

Not knowing for sure or not, but i believe you can determine whether  
the button was clicked to test or otherwise.


Jack


On Oct 5, 2009, at 11:45 AM, Gabriel Zachmann wrote:

Thanks a lot for all the responses, and sorry for bothering you  
again with this.


The problem I'm having is the following: is there an elegant way to  
prevent the user from clicking the 'Test' button in the Screen  
Savers panel in System Preferences?


The reason why I'm asking: when the user changes the configuration  
in my screen saver, I start a Spotlight query that could take up to  
30  seconds (about 10 seconds for the initial phase of the search  
itself, plus 20 seconds for retrieveing the results from the query).

The results of that query then change what the screensaver renders.

Therefore, I would like to give the user some feedback that the  
query is still in progress *AND* I would like to prevent the user  
from clicking that 'Test' button in System Preferences' Screensaver  
pane.


Right now I'm using an asynchronous NSMetadataQuery, which seems to  
work, except that the only way to prevent the user from clicking  
that 'Test' button I found was to keep the configuration sheet up  
until the search has completely finished.


IMHO, this doesn't look very elegant ;-/

Any ideas will be highly appreciated.

Best regards,
Gabriel.


___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Making an Outline View delete a rows children when the parent is deleted.

2009-09-05 Thread Jack Carbaugh

That depends on your meaning.

Do you only want them deleted visibly in the table/outline view OR do  
you want the data to be deleted permanently


The table/outline is SEPARATE from the actual data.


On Sep 5, 2009, at 2:14 PM, Joshua Garnham wrote:

How would I make a rows children be deleted when the parent is  
deleted?


Cheers,
Josh.



___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Overriding NSMenu from an NSTextView

2009-08-31 Thread Jack Carbaugh
Change the Key equiv of the menu item when your textview takes on key  
focus, then set it back when finished.



On Aug 31, 2009, at 5:50 PM, Chilton Webb wrote:


Hi!

I have a menu item that defines Command+Shift+Arrow (left and right)  
to do something.


But I'd also like to support the 'normal' NSTextView behavior for  
Command+Shift+Arrow.


How do I tell my app to ignore this particular menu command (and use  
the default NSTextView behavior) when editing a text view, and then  
to go back to using the menu command when I'm done editing the text  
view?


Thanks!
-Chilton
___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


NSTableView and programmatic changing of contextual menu

2009-08-24 Thread Jack Carbaugh
I would like to change the Titles of MenuItems in a contextual menu  
based on the tableview row/cell in which the Right click was initiated.


I've searched several times for various methods to implement this, but  
came up empty. If i were using an imagekit cell, i could use:


- (void) imageBrowser:(IKImageBrowserView *) aBrowser   
cellWasRightClickedAtIndex:(NSUInteger) index withEvent:(NSEvent *)event



does something similar exist for tables? if not, ideas on how to  
sublcass and implement.


Many thanks,

jack
___

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 arch...@mail-archive.com


Re: NSTableView and programmatic changing of contextual menu

2009-08-24 Thread Jack Carbaugh
I understand that clickedRow will give me the proper data that I want  
to use ...


My question is how do i change the contextual menu when the user right  
clicks.



On Aug 24, 2009, at 8:28 PM, Kyle Sluder wrote:

On Mon, Aug 24, 2009 at 5:20 PM, Jack Carbaughintrn...@aol.com  
wrote:
does something similar exist for tables? if not, ideas on how to  
sublcass

and implement.


Use -[NSTableView clickedRow] and -clickedColumn.

--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 arch...@mail-archive.com


devil of a time with an NSImageView

2009-08-19 Thread Jack Carbaugh
I am simply trying to set an NSImageView to an NSImage. I'm certain  
i'm doing the right methods, but alas, no images show.


Suggestions ?

Thanks in advance.

jack

boxPic is an IBOutlet connected to the NSImageView in the NIB.

-(void)setImage:(NSImage *)newImage;
{
   NSLog(@Incoming image: %@, newImage); // verifies that i am getting  
an image

   [boxPic setImage:newImage];
   NSLog(@%@, [boxPic image]); // gives (null)
}
2009-08-19 17:10:42.474 ***[52934:10b] Incoming image: NSImage  
0x63ca520 Name=NSUser Size={32, 32} Reps=(
NSCoreUIImageRep 0x7b1adf0 Size={32, 32}  
ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=0x0 Alpha=YES  
drawOptions={

imageNameKey = image.User;
widget = image;
}
)
2009-08-19 17:10:42.475 ***[52934:10b] (null)

___

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 arch...@mail-archive.com


Re: devil of a time with an NSImageView

2009-08-19 Thread Jack Carbaugh

100% certain it is connected in the xib.


On Aug 19, 2009, at 5:19 PM, Dave DeLong wrote:

Are you sure the outlet hasn't gotten disconnected?  Or maybe you  
connected it, then changed the name of the outlet in Xcode?  That's  
the output you would see if the outlet were null.


Dave

On Aug 19, 2009, at 3:15 PM, Jack Carbaugh wrote:

I am simply trying to set an NSImageView to an NSImage. I'm certain  
i'm doing the right methods, but alas, no images show.


Suggestions ?

Thanks in advance.

jack

boxPic is an IBOutlet connected to the NSImageView in the NIB.

-(void)setImage:(NSImage *)newImage;
{
 NSLog(@Incoming image: %@, newImage); // verifies that i am  
getting an image

 [boxPic setImage:newImage];
 NSLog(@%@, [boxPic image]); // gives (null)
}
2009-08-19 17:10:42.474 ***[52934:10b] Incoming image: NSImage  
0x63ca520 Name=NSUser Size={32, 32} Reps=(
  NSCoreUIImageRep 0x7b1adf0 Size={32, 32}  
ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=0x0 Alpha=YES  
drawOptions={

  imageNameKey = image.User;
  widget = image;
}
)
2009-08-19 17:10:42.475 ***[52934:10b] (null)

___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: devil of a time with an NSImageView

2009-08-19 Thread Jack Carbaugh

You are correct. Logging of boxPic is indeed null.

How do i proceed then?

here is a snippet of the code ...

aWindowController *theWindowController = [[aWindowController alloc]  
initWithMyName:[who name]];


// snip several assignments to theWindowController

if ( [[who serverItems] objectForKey:@image] )
   {
   [theWindowController setImages:[[who serverItems]  
objectForKey:@image]];

   }

// method
-(void)setImages:(NSImage *)newImage;
{
   [newImage retain];
   NSLog(@Incoming image: %@, newImage);
   [boxPic setImage:newImage];
   NSLog(@box:%@, boxPic);

   [newImage release];
}


On Aug 19, 2009, at 6:11 PM, Quincey Morris wrote:


On Aug 19, 2009, at 14:31, Jack Carbaugh wrote:


100% certain it is connected in the xib.


That's not proof it's connected (yet) at the time 'setImage:' is  
invoked. Log the value of 'boxPic' too, and I bet it will be nil.



___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Solved: devil of a time with an NSImageView

2009-08-19 Thread Jack Carbaugh
As others have suggested ... the NIB had not been fully loaded and  
ready for my changes. As a test, i modified the image view in  
awakeFromNib and things worked marvelously.


Thank you for the help!

I knew it had to be something simple that i was missing.

Jack

On Aug 19, 2009, at 8:37 PM, Jonathan Hess wrote:


Hey Jack -

That means that either the outlet isn't connected, or the NIB hasn't  
been loaded yet when setImage: is called.


Also, are you sure you aren't creating more instances of your class  
than you think you are? A common mistake is to instantiate the class  
in code, and tell it to load a NIB, but the NIB file also  
instantiates a second instance of the class because the File's Owner  
was misunderstood.


Hope that helps -
Jon Hess

On Aug 19, 2009, at 5:28 PM, Jack Carbaugh wrote:


The result is null.

On Aug 19, 2009, at 8:04 PM, Jonathan Hess wrote:


What happens if you include this log to your setImage method?

NSLog(@image view: %@, boxPic);

Also, rather than logging you should see if you can find the time  
to learn to use the debugger. It's much more efficient than printf  
debugging.


Good Luck -
Jon Hess

On Aug 19, 2009, at 2:31 PM, Jack Carbaugh wrote:


100% certain it is connected in the xib.


On Aug 19, 2009, at 5:19 PM, Dave DeLong wrote:

Are you sure the outlet hasn't gotten disconnected?  Or maybe  
you connected it, then changed the name of the outlet in Xcode?   
That's the output you would see if the outlet were null.


Dave

On Aug 19, 2009, at 3:15 PM, Jack Carbaugh wrote:

I am simply trying to set an NSImageView to an NSImage. I'm  
certain i'm doing the right methods, but alas, no images show.


Suggestions ?

Thanks in advance.

jack

boxPic is an IBOutlet connected to the NSImageView in the NIB.

-(void)setImage:(NSImage *)newImage;
{
NSLog(@Incoming image: %@, newImage); // verifies that i am  
getting an image

[boxPic setImage:newImage];
NSLog(@%@, [boxPic image]); // gives (null)
}
2009-08-19 17:10:42.474 ***[52934:10b] Incoming image: NSImage  
0x63ca520 Name=NSUser Size={32, 32} Reps=(
 NSCoreUIImageRep 0x7b1adf0 Size={32, 32}  
ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=0x0 Alpha=YES  
drawOptions={

 imageNameKey = image.User;
 widget = image;
}
)
2009-08-19 17:10:42.475 ***[52934:10b] (null)

___

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/intrntmn 
%40aol.com


This email sent to intrn...@aol.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/jhess%40apple.com

This email sent to jh...@apple.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 arch...@mail-archive.com


Re: iPhone: detect if docked?

2009-08-15 Thread Jack Carbaugh
ah but wouldn't this be a FAIL if say, the user was using a battery  
extender for a quick recharge ?



On Aug 15, 2009, at 3:40 AM, David Duncan wrote:


On Aug 14, 2009, at 4:29 AM, Sean Kline wrote:


Is another option to use the External Accessory framework?



I don't think so. A simple charger may not appear as any kind of  
accessory at all (consider the wall-outlet charger) so EA wouldn't  
track it. If you want to know if the device is on external power  
(which in this particular case would likely be a false positive on  
one of those external battery packs) then you want to know if the  
battery status is charging.

--
David Duncan
Apple DTS Animation and Printing

___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


Re: Stripping out between chars in NSString

2009-08-14 Thread Jack Carbaugh
In cases such as this, i've used a combination of NSScanner as well as  
-stringReplacingOccurancesOfString.



On Aug 14, 2009, at 2:00 PM, Eric E. Dolecki wrote:

Is there a pretty easy way to strip out a section of a string based  
on 2

characters?
ie. (#1 - 140/500) Title

I would like to strip out everything including the ( and the )
characters, and then I'll strip out the leading space.

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


NSURLConnection issues

2009-07-30 Thread Jack Carbaugh
I am working on a program that is basically a wrapper around some web  
pages.


I am using NSURLConnection to download the various pages needed,  
however, with 2 specific users, NSURLConnection returns immediately  
with an error, NSURLErrorDomain Code -1005 Lost Network Connection


The request has been verified to be fully formed and present

Both users can connect to the website via Safari and Firefox, using  
the same connection and Leopard software versions.


Any suggestions as to why this may be happening and alternatives/ideas?

Thanks,

Jack


code:

NSURLConnection *theConnection=[[NSURLConnection alloc]  
initWithRequest:LoginRequest delegate:self];



Log:

7/20/09 10:58:04 PM chatlinQ[1670] error:
Error Domain=NSURLErrorDomain Code=-1005 UserInfo=0x17273150 lost  
network connection

7/20/09 10:58:04 PM chatlinQ[1670] response: code: 0
(null)
7/20/09 10:58:04 PM chatlinQ[1670] Connection response string:
7/20/09 10:58:04 PM chatlinQ[1670] Status Code was Not 200: '0'
7/20/09 10:59:10 PM chatlinQ[1674] error:
Error Domain=NSURLErrorDomain Code=-1005 UserInfo=0x18f3db00 lost  
network connection

7/20/09 10:59:10 PM chatlinQ[1674] response: code: 0
(null)
7/20/09 10:59:10 PM chatlinQ[1674] Connection response string:
7/20/09 10:59:10 PM chatlinQ[1674] Status Code was Not 200: '0' 
___


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 arch...@mail-archive.com


Re: Amount of Arguments per Method

2009-06-22 Thread Jack Carbaugh
With that many arguments, i'd make a dictionary and pass only that  
dictionary. I understand your choice for not doing so however.


jack

On Jun 22, 2009, at 4:03 AM, Roland King wrote:

This still the longest one or has Apple outdone themselves since? 11  
args, you really wouldn't want much more than this.


- 
(id 
)initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel 
:


WT wrote:

On Jun 22, 2009, at 8:05 AM, Chunk 1978 wrote:

clearly simplicity is important, but i'd like to know if there is a
limit for the amount of arguments which a method can handle?
I don't know if there's an upper limit, but I don't recall ever   
writing a method with more than 5 or 6 arguments. When I feel  
inclined  to do otherwise, it typically means that there's a flaw  
in my design.

Wagner
___
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/rols%40rols.org
This email sent to r...@rols.org

___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


custom NSViews and subviews - creating in IB

2009-05-11 Thread Jack Carbaugh

I'm not sure if this is possible, but here goes:

I would like to create a subview with various controls in IB.

Then, in code, make a copy of that object and in turn make  
modifications to some of the objects in that view. For example, set a  
text field to a value.


Then, i'd like to add it to a super view.

Thanks for your help.
___

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 arch...@mail-archive.com


Re: NSString and decoding HTML Entities

2009-04-05 Thread Jack Carbaugh

Why don't you just use the features of NSString ?

stringByReplacingPercentEscapesUsingEncoding:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ 
/apple_ref/doc/uid/2154-BCIECHFE


On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote:

I need to convert strings that contain HTML entities (e.g., #8217;   
or #gt;).  I can't seem to find an NSString method to do so (not  
that I sometimes don't easily miss the obvious).  So, I created a  
category on NSString and made two trivial methods that take  
advantage of toll-free bridging between NSString and CFStringRef by  
using CFXMLCreateStringByEscapingEntities and  
CFXMLCreateStringByUnescapingEntities.  Is there a better way?

___

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/intrntmn%40aol.com

This email sent to intrn...@aol.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 arch...@mail-archive.com


re: NSString and decoding

2009-04-05 Thread Jack Carbaugh
it would have helped if I read  digested the WHOLE message. my  
apologies ! what i referenced and what he wanted were two different  
things.


my apologies,

jack
___

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 arch...@mail-archive.com


Persistent Connection to Web Server in cocoa, emulating AJAX

2008-10-22 Thread Jack Carbaugh
What is the best way to emulate, with cocoa, an AJAX persistent  
connection to a web server.


I've reviewed NSURLConnection, but am not sure if it what i need.

Thank you!

Jack
___

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 Programming iPing exercise

2008-10-02 Thread Jack Carbaugh
could it be that [hostField stringValue] is not an object ? isn't  
stringValue just a value ?



On Oct 2, 2008, at Thu-10 /02 /08-10:06 AM, Joe Keenan wrote:



On Oct 2, 2008, at 10:01 AM, Sherm Pendley wrote:

On Thu, Oct 2, 2008 at 9:20 AM, Joe Keenan [EMAIL PROTECTED]  
wrote:


On Oct 1, 2008, at 1:25 PM, Shawn Protsman wrote:

  NSArray *args = [NSArray arrayWithObject:[hostField  
stringValue]];


You forgot the nil argument at the end of the array.

-arrayWithObject: doesn't need one.


Oops.  Good point.  Hmm.

Shawn - are you absolutely SURE that reqkey is in /usr/local/bin?   
On your command line example, you don't specify the path.


Another thing to look at is if keyreq requires some environment  
variable that's present in your command line setup, but not in the  
NSTask environement.


joe

___

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/intrntmn%40aol.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: xcode: how to not Go with Instruments

2008-08-26 Thread Jack Carbaugh
rather than quit xcode, just go into the run menu and select a  
different option. xcode will remember that choice the next time you  
use the command equiv.


jack

On Aug 26, 2008, at Tue-08 /26 /08-5:16 PM, steph thirion wrote:

once I launch Instruments from Xcode (with 'Start with Performance  
Tool'), subsequently everytime I call 'build and go', Instrument  
launches. I need to close and relaunch xcode to stop that behavior.  
How do I 'detach' Instruments from xcode once I use it?


___

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/intrntmn%40aol.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]


Bindings Key Paths question

2008-08-12 Thread Jack Carbaugh
In my program, I download information for a person and stuff the  
items into an NSDictionary.


Several of the keys are of this form:   pictures.0.url


How can I add this value to the bindings area of IB. I've tried  
surrounding with quotes and they are rejected.


Thanks

Jack
___

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]


KVC beginners question

2008-08-10 Thread Jack Carbaugh
I am attempting to understand KVC and am having a bit of trouble  
understanding some of the examples, as well as the documentation.


What i'd like to be able to do is have a label in a window  
automagically updated with the current count of an array. I've tried  
several things in IB and in code but do not actually get the count  
of the items in the array.


in the controller, the array is called browserData and basically  
drives a coverflow view and an IKBrowserView. the label is to show how  
many objects are in the array.


I very much see the value in KVC/O and am wanting to make this a part  
of my basic coding practices but for some reason ( maybe lack of  
coffee/caffeine at this point) is preventing me from actually grasping  
it.


Thanks in advance for any help/guidance.

Jack
___

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]


Bindings array count to a label ( was Re: KVC beginners question )

2008-08-10 Thread Jack Carbaugh
I did see the array operators ... and in IB ... i have the label set  
up to BIND ValueWithPattern ... bound to the controller, keypath  
[EMAIL PROTECTED].


I'm sure i'm just missing something VERY obvious/simple. sigh.

Thanks !!!

Jack
On Aug 10, 2008, at Sun-08 /10 /08-12:37 PM, Keary Suska wrote:


8/10/08 10:09 AM, also sprach [EMAIL PROTECTED]:


I am attempting to understand KVC and am having a bit of trouble
understanding some of the examples, as well as the documentation.

What i'd like to be able to do is have a label in a window
automagically updated with the current count of an array. I've tried
several things in IB and in code but do not actually get the count
of the items in the array.

in the controller, the array is called browserData and basically
drives a coverflow view and an IKBrowserView. the label is to show  
how

many objects are in the array.

I very much see the value in KVC/O and am wanting to make this a part
of my basic coding practices but for some reason ( maybe lack of
coffee/caffeine at this point) is preventing me from actually  
grasping

it.


You need an array operator:
http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Con
cepts/ArrayOperators.html#//apple_ref/doc/uid/20002176-184206

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/intrntmn%40aol.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: Irritating Problem with NSString Method and File Paths

2008-08-04 Thread Jack Carbaugh

when i refer to a file, i used:

file = [[NSMutableDictionary alloc] initWithContentsOfFile:[Folder  
stringByAppendingPathComponent: FileName]];


Folder is set up as:
Folder  = [[NSString alloc] initWithString:[@path  
stringByExpandingTildeInPath]];


and Filename is:
FileName= [[NSMutableString alloc] initWithString:@filename.txt];


perhaps that may help.

jack


On Aug 4, 2008, at Mon-08 /04 /08-12:43 AM, Patrick Walker wrote:

It seems that whenever I use Xcode to spawn the program, it is able  
to find the file but when spawning the program from Finder, it can  
never, ever find the file.  I've been looking online and no one  
seems to have come across this before or maybe it's because it's so  
late that I'm not seeing the obvious.


  NSString *fileContents = [[NSString alloc] initWithContentsOfFile: 
[filename stringValue]
  
encoding:NSASCIIStringEncoding

error:nil];
Filename is an NSTextField outlet, btw.

We've tried all sorts of things to try and find the file,  
File.txt, ./File.txt, ~/File.txt, ./File.txt.   I can understand  
maybe the ~ doesn't work for all shells but explicitly using
./File.txt should be opening the file in the current directory with  
the executable, shouldn't it?  Do I *really* have to append a huge  
long path each time I want to open a file?


Any ideas?  It says path and the documentation says that it has to  
be NSString.  I've used filepaths before for open() but those are C  
strings and those are full paths though, i.e., /dev/stdout.  It's  
such a simple problem what am I missing 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/intrntmn%40aol.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]


2 outline views, selection changes

2008-08-01 Thread Jack Carbaugh
I've been wracking my brain over this and after having too much  
caffeine and little results ...


I have 2 outline views and I'd like to have them operate such that  
selecting an item in OV#1, deselects any item(s) in OV#2 and vice versa.


I have tried many things in

- (void)outlineViewSelectionDidChange:(NSNotification *)notification

and in

- (void)outlineViewSelectionIsChanging:(NSNotification *)notification

however, when I try adjusting the selection in one view, it causes a  
loop where both end up having nothing selected.


I hope this makes sense.

Thanks for any advice.

Jack
___

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]