NSSearchField set Predicate Binding format dynamically

2012-10-22 Thread Heizer, Charles
Hello,
I would like to set NSSearchField predicate binding format dynamically, but I'm 
not sure how. I tried to create a property called  NSPredicate 
*aFilterPredicate; and set it's format and then tried to set the predicate 
format in Interface Builder to self. aFilterPredicate but it won't take it. 

Any help on this would be great,

Thanks,
Charlie
___

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


Toggle row selection using checkbox

2012-07-04 Thread Heizer, Charles
Hello,
I'm using a NSArrayController as the delegate and datasource for aNSTableView. 
In my table view I would like to use a checkbox in my first column to toggle 
the row selection.

I have been searching thought the docs and I must be using the wrong 
terminology or something. Does anyone have an example on how to do this or what 
the right notification method I need to be using?

Thanks,
Charlie


___

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


Override NSUserDefaults search domain order.

2011-12-01 Thread Heizer, Charles
Hello,
I'm playing around with NSUserDefaults and I would like to override which 
domain takes precedence, but have been unsuccessful. I would really like to 
know how I can either force all of the NSUserDefaults to come from 
/Library/Preferences or read from ~/Library/Preferences then 
/Library/Preferences.

I hope this makes sense, thanks!

Charles



___

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

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

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

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


Multi-OS API Question

2011-06-03 Thread Heizer, Charles
Hello,
I'm using some API's which are only available on 10.5 and above but I want to 
compile my app to run on 10.4 and higher. How can I include multiple bits of 
code so that if the system is running 10.4 it will run Code A and if 10.5 and 
higher run Code B?

Example 
if ( os == 104 ) {
// Run 10.4 Code
} elseif ( os = 105 ) {
// Run 10.5 and higher API
}

Thanks,
Charles___

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

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

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

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


Test for TCP port

2011-04-08 Thread Heizer, Charles
Hello,
What is the best way to test to see if a TCP port is reachable and will answer 
connections? I was trying to use NSSocketPort and NSConnection but I'm not 
getting a valid connection.

Thanks,
Charles


NSSocketPort *sendPort = [[NSSocketPort alloc] initRemoteWithTCPPort:3600 
host:@test.myhost.comhttp://test.myhost.com];
NSConnection *connection = [NSConnection connectionWithReceivePort:nil 
sendPort:sendPort];


[connection setRequestTimeout:10.0];
[connection setReplyTimeout:10.0];


NSLog(@theConnection 0x%X, connection);
NSLog(@Connect is valid? %d, (int)[connection isValid]);
___

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: Test for TCP port

2011-04-08 Thread Heizer, Charles
Thanks,
This is what I kind of suspected. Are there any wrappers around bsd socket to 
make it easier?

Thanks,
Charles



On Apr 8, 2011, at 5:17 PM, Dave Carrigan wrote:

 
 On Apr 8, 2011, at 3:26 PM, Heizer, Charles wrote:
 
 What is the best way to test to see if a TCP port is reachable and will 
 answer connections? I was trying to use NSSocketPort and NSConnection but 
 I'm not getting a valid connection.
 
 You have to connect to it. Unfortunately, neither NSSocketPort nor 
 NSConnection attempt to connect until you send data, so with those, you have 
 no way of immediately knowing that anything is actually listening. The best 
 way is to get down a level and use socket(2) and friends.
 
 -- 
 Dave Carrigan
 d...@openshut.net
 Seattle, WA, USA
 

--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 



___

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: Remove characters from string

2011-03-18 Thread Heizer, Charles
I'm looking to clean up some system profiler data before sending it to a
database to have it displayed on a web page. Wile I can insert the data in
to the MySQL database just fine. The copyright and registered symbols do
not display properly on a web page. I was just thinking to make life easy
I could just remove them before posting to my database so that I don¹t
have to deal with it on the web end.

Charles






On 3/17/11 12:12 PM, Gary L. Wade garyw...@desisoftsystems.com wrote:

Is it possible you're assuming text being given to you is in ASCII format
but is actually in UTF-8 or some other encoding?  Try looking at the text
you have in other encodings before trying to remove characters.

On 03/17/2011 6:03 AM, Heizer, Charles heiz...@llnl.gov wrote:

Hello,
I would like to know how to remove certain characters from a NSString.
The
characters are ©. I thought I could just use encodings and convert the
string using NSASCIIStringEncoding but that did not work and I'm not sure
what the car codes are for these as well.

Thanks,
Charles


___

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

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

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

This email sent to heiz...@llnl.gov

___

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


Remove characters from string

2011-03-17 Thread Heizer, Charles
Hello,
I would like to know how to remove certain characters from a NSString. The
characters are ©. I thought I could just use encodings and convert the
string using NSASCIIStringEncoding but that did not work and I'm not sure
what the car codes are for these as well.

Thanks,
Charles

___

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

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

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

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


Re: Remove characters from string

2011-03-17 Thread Heizer, Charles
I really don¹t want to search though the entire string to find a replace.
The © is just an example of the characters I would like to remove. I
guess my real question is how do I remove all Unicode characters from a
string?

Thanks,
Charles






On 3/17/11 7:31 AM, Conrad Shultz con...@synthetiqsolutions.com wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/17/11 7:03 AM, Heizer, Charles wrote:
 Hello,
 I would like to know how to remove certain characters from a NSString.
The
 characters are ©. I thought I could just use encodings and convert
the
 string using NSASCIIStringEncoding but that did not work and I'm not
sure
 what the car codes are for these as well.

Perhaps I am missing something, but since NSString handles Unicode fine,
just use either NSString's
stringByReplacingOccurrencesOfString:withString: or NSMutableString's
replaceOccurrencesOfString:withString:options:range: ?

This makes for less work and more readable code since you should be able
to literally paste the foreign characters into your search string and
not have to fuss around with character codes.

Of course, if your input contains the problem characters in multiple
underlying representations (say, from different languages), this
complicates matters.  Such a situation happened to me a while back,
wherein an application on the system and the terminal had different
notions of how to store accented characters.  Suffice it to say this led
to much hair pulling when it came time to do source code management
(file X is been added, file X has been removed).



- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2CGzoACgkQaOlrz5+0JdWj4ACfd2ZCBIVmqGjFT29EmBE7tdaS
D/cAnRsLDoDRD3r336J27udk6GTpCh/j
=eAiC
-END PGP 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 arch...@mail-archive.com


Select server based on proximity

2010-12-06 Thread Heizer, Charles
I'm writing a app that will download and install some software. I would
like to use a distributed download model where the client has a list of
servers and determines which is the one closest to it's self and uses that
one.

Is there a API or something to do this?

Thanks,
Charles


___

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

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

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

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


spawn_via_launchd() failed, errno=5 in Mac OS X 10.6.x

2010-09-30 Thread Heizer, Charles
Hello,
I'm trying to launch my Reboot application for the current user but I keep 
seeing this message in the system.log. This used to work just fine under Mac OS 
X 10.5.x.

Error Message:
9/30/10 5:50:01 PM  /Library/mp/Client/oraw[6379]   spawn_via_launchd() 
failed, errno=5 label=[0x0-0x18c18c].gov.llnl.MPReboot 
path=/Library/mp/Client/MPReboot.app/Contents/MacOS/MPReboot flags=1

Does anyone know how to resolve this, this is a big part of my app.

Thanks,
Charles

--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 



___

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


Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Heizer, Charles
Hello,
I have been googling for a while now and have tried a few suggestions I
have found in other like posts but have not had much success.

I'm trying to create a stand alone Foundation tool which will connect to
MySQL and I can get this to work if I link to the libmysqlclient.dylib
library. But as others have also wanted :) I do not want the user to have
to install the MySQL connector software. 

I have added the Other linker flags -lmysql -lpthread -lz $(inherited)
and no luck, I always need the libmysqlclient.dylib in my DYLB path for
it to work.

Any help to get this going would be much appreciated.

Thanks,
Charles

___

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

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

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

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


Re: Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Heizer, Charles
Thanks for the quick response. So I just tried this and I'm having the
same issue.

I changed my Other linker flags as suggested and when I try to run this
without the libmysqlclient.dylib in my path it still complains ...

/Users/local/Desktop/new/MySQLTest2 
dyld: Library not loaded: libmysql.16.dylib
  Referenced from: /Users/local/Desktop/new/MySQLTest2
  Reason: image not found
Trace/BPT trap



Thanks,
Charles

 
--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 







On 8/20/10 10:34 AM, Sherm Pendley sherm.pend...@gmail.com wrote:

On Fri, Aug 20, 2010 at 1:26 PM, Heizer, Charles heiz...@llnl.gov wrote:

 I have been googling for a while now and have tried a few suggestions I
 have found in other like posts but have not had much success.

 I'm trying to create a stand alone Foundation tool which will connect to
 MySQL and I can get this to work if I link to the libmysqlclient.dylib
 library. But as others have also wanted :) I do not want the user to
have
 to install the MySQL connector software.

 I have added the Other linker flags -lmysql -lpthread -lz
$(inherited)
 and no luck, I always need the libmysqlclient.dylib in my DYLB path
for
 it to work.

The -l linker flag will always prefer dynamic libraries over static.
To link with a static library when both are present, just provide the
full path to the library, without the -l. For example:
/usr/local/lib/mysql.a -lpthread -lz $(inherited).

sherm--

-- 
Cocoa programming in Perl:
http://*camelbones.sourceforge.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/archive%40mail-archive.com

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


Re: Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Heizer, Charles
So I did a Clean All and here is what is in the link step.

Ld build/Release/MySQLTest2 normal i386
cd /Users/heizer1/Desktop/MySQLTest2
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot
/Developer/SDKs/MacOSX10.5.sdk
-L/Users/local/Desktop/MySQLTest2/build/Release
-F/Users/local/Desktop/MySQLTest2/build/Release -filelist
/Users/local/Desktop/MySQLTest2/build/MySQLTest2.build/Release/MySQLTest2.b
uild/Objects-normal/i386/MySQLTest2.LinkFileList -mmacosx-version-min=10.5
/usr/local/lib/libmysqlclient.a -framework Foundation -lmysqlclient -o
/Users/local/Desktop/MySQLTest2/build/Release/MySQLTest2


Thanks,
Charles

--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 







On 8/20/10 11:14 AM, Sherm Pendley sherm.pend...@gmail.com wrote:

On Fri, Aug 20, 2010 at 2:03 PM, Heizer, Charles heiz...@llnl.gov wrote:
 Thanks for the quick response. So I just tried this and I'm having the
 same issue.

 I changed my Other linker flags as suggested and when I try to run
this
 without the libmysqlclient.dylib in my path it still complains ...

What did the link step have to say when you rebuilt your app? Did you
try a clean  rebuild?

sherm--

-- 
Cocoa programming in Perl:
http://*camelbones.sourceforge.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/archive%40mail-archive.com

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


Re: Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Heizer, Charles
I found it -lmysqlclient I removed the libmysqlclient.a from my
external frameworks. And I was good to go. I had the External Frameworks
and Libraries group closed so I did not see it.

Thanks for all of your help!

Charles


--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 







On 8/20/10 11:26 AM, Heizer, Charles heiz...@llnl.gov wrote:

So I did a Clean All and here is what is in the link step.

Ld build/Release/MySQLTest2 normal i386
cd /Users/heizer1/Desktop/MySQLTest2
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot
/Developer/SDKs/MacOSX10.5.sdk
-L/Users/local/Desktop/MySQLTest2/build/Release
-F/Users/local/Desktop/MySQLTest2/build/Release -filelist
/Users/local/Desktop/MySQLTest2/build/MySQLTest2.build/Release/MySQLTest2.
b
uild/Objects-normal/i386/MySQLTest2.LinkFileList -mmacosx-version-min=10.5
/usr/local/lib/libmysqlclient.a -framework Foundation -lmysqlclient -o
/Users/local/Desktop/MySQLTest2/build/Release/MySQLTest2


Thanks,
Charles

--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 







On 8/20/10 11:14 AM, Sherm Pendley sherm.pend...@gmail.com wrote:

On Fri, Aug 20, 2010 at 2:03 PM, Heizer, Charles heiz...@llnl.gov
wrote:
 Thanks for the quick response. So I just tried this and I'm having the
 same issue.

 I changed my Other linker flags as suggested and when I try to run
this
 without the libmysqlclient.dylib in my path it still complains ...

What did the link step have to say when you rebuilt your app? Did you
try a clean  rebuild?

sherm--

-- 
Cocoa programming in Perl:
http://**camelbones.sourceforge.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/heizer1%40llnl.gov

This email sent to heiz...@llnl.gov


___

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


NSFileHandle weirdness on 10.5 ...

2010-01-12 Thread Heizer, Charles
Hello,
I'm hoping someone can help me out here. I'm trying to use IPC (Unix domain 
socket AF_UNIX) to pass data between two applications.

I have a console application which is sending data to the socket path and a 
Cocoa GUI app which is reading it using NSFileHandle. The problem I'm seeing is 
on 10.5 systems I'm not getting all of the data. I'm only getting 502 
characters, but on 10.6 i'm getting the whole thing.

Is there some kind of buffer size I can adjust, I'm not really sure what to do?

Thanks,
Charles




___

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

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

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

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


kAELogOut and no dialog

2009-09-19 Thread Heizer, Charles
Hello,
Does anyone know if there is a way to send a kAELogOut event and not  
display the logout dialog message?

Thanks,
Charles
___

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

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

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

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


Re: Shutdown/Restart computer

2009-09-17 Thread Heizer, Charles

I use a variation of this...

http://developer.apple.com/mac/library/qa/qa2001/qa1134.html

On Sep 14, 2009, at 5:59 PM, PCWiz wrote:


How would I shut down and restart the computer using Objective-C code?

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/heizer1%40llnl.gov

This email sent to heiz...@llnl.gov



--
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
P: 925-422-0197 





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