In my app, I use several colors many times. I'd like to define them
in a separate file or class.
Is there another way to do this than:
#define kNiceBlueColor [NSColor colorWithRed: 20 green: 20 blue: 240
alpha:1];
I would like a more obj-c style, like
globals.h:
ext
Hi Graham,
> Yes, NSMenuItem does not retain its target.
> From the docs: "
That's exactly the documentation I was looking for, but couldn't find. Thanks!
cheers,
Remko
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin r
you might:
* change the buttons programmatically every time.
* drag 2 UIBarButtonItems in your InterfaceBuilder file, set the
connections and the captions in IB. Then in XCode, you can change the
buttons by using
NSArray * topLevelObjs = nil;
topLevelObjs = [[NSbundle mainBndle] loadNibNam
Hi All,
Sorry if the mail is not in correct group. Is it possible to resolve the
system framework addresses for a binary (Addressbook, SyncServices)? Like
can we use some tools like atos on basis of addresses would like to get the
function information etc...If the crash reporter is not able to res
How does Bonjour handle the task of introducing 2 iPhones (located in
2 parts of the world) to each other?
The documentations i've found so far all point to Bonjour working on
local network only, (even on Apple's website).
Can you please point me to the documentation where it explains how
B
James Lin wrote:
How does Bonjour handle the task of introducing 2 iPhones (located in 2
parts of the world) to each other?
it basically doesn't. Bonjour can work over network segments which have
been bridged for multicast dns (I think) but in general it doesn't work
outside a LAN.
The
On 6 Aug 2009, at 04:16, Graham Cox wrote:
A general question. Suppose I wanted to write a Cocoa application
that could be accessed via a PHP script running on another machine
on the local network, what would the general shape of the solution
look like?
:-) That's kind of a general quest
My goal:
1. 1 iPhone running my app working as a server waiting for
connection from another iPhone from the "internet".
2. Another iPhone running my app working as a client connects to
the server iPhone and send a string "hi, I am James".
3. The server iPhone, upon receiving this string re
On 6 Aug 2009, at 09:13, Roland King wrote:
I've never seen any. I assume that as well as multicast dns there
are ways to configure bonjour to point to some central DNS server
which would enable something like that to work
Yes, you can use regular unicast DNS, and query a specified DNS ser
On 6 Aug 2009, at 07:58, Arie Pieter Cammeraat wrote:
I would like a more obj-c style, like
globals.h:
extern NSColor * const kNiceBlueColor
globals.m:
#import globals.h
NSColor * const kNiceBlueColor = [NSColor colorWithRed: 20 green:
20 blue: 240 al
On 6 Aug 2009, at 09:27, James Lin wrote:
[...]
keeps querrying the php/mysql server for message left for it with a
querry to php/mysql server inside a NSTimer (say querry once every
30 seconds).
[...]
Is this my best option given what I want to accomplish?
I'm afraid it isn't, poll
Can you please elaborate a bit more?
What technology option do I have when it comes to a "messaging server"?
What's involved on the iPhone's side?
Thank you in advance...
James
On 2009/8/6, at 下午 4:33, Keith Duncan wrote:
On 6 Aug 2009, at 09:27, James Lin wrote:
[...]
keeps querrying th
is there actually any code for that anywhere? And is there any support
built into the OSX (or iPhone) Bonjour implementation to do that so you
could do say (totally made up code on classes which don't exist)
[ CFBonjour useUnicastDNSWithServer:your server here ]
or are you just saying
> Did you create a mapping model?
> If not, did you specify the NSInferMappingModelAutomaticallyOption option?
Yes, I did create one. But I think that the problem is not there,
since not knowing the source model, Core Data cannot infer the correct
mapping model.
For the manual migration I'm sure o
Maybe the issue is avoiding a lot of typing for a longish list of
colours? Back in the day when struct RGBColor was the mechanism, it
was fairly easy to set up long lists of const values and refer to an
item by name. Doing this with NSColor is not so straightforward, and
making each colour
Yeah, you are right.
I did my own code and is working well for me.
My code is :
srandom(time(NULL));
BOOL val;
val = FALSE;
array = [[NSMutableArray alloc]initWithCapacity:15];
firstNo = random()%15+1;
[array addObject:[NSNumber numberWithInt:firstNo]];
for(i=1;i<15;i++
Is it possible to use accessor methods in category?
I need to add one for UIButton class.
How can I do it?
Thanks in advance
Mahaboob.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to
On 06/08/2009, at 10:11 PM, Mahaboob wrote:
Is it possible to use accessor methods in category?
I need to add one for UIButton class.
How can I do it?
You can add any methods in a category. What you can't add are
additional ivars, so if the base class doesn't have the ivar you need,
you'
I subclassed the UIButton class like:
@interface MoveButton : UIButton {
BOOL canMove;
}
@property(readwrite) BOOL canMove;
@end
@implementation MoveButton
@synthesize canMove;
My main class contains a number of UIButton outlets.
How can I use this function with my outlets ?
On 8/6/09 5:4
On 06/08/2009, at 10:32 PM, Mahaboob wrote:
I subclassed the UIButton class like:
@interface MoveButton : UIButton {
BOOL canMove;
}
@property(readwrite) BOOL canMove;
@end
@implementation MoveButton
@synthesize canMove;
My main class contains a number of UIButton outlets.
How can I use
On 6 Aug 2009, at 13:32, Mahaboob wrote:
I subclassed the UIButton class like:
@interface MoveButton : UIButton {
BOOL canMove;
}
@property(readwrite) BOOL canMove;
@end
@implementation MoveButton
@synthesize canMove;
My main class contains a number of UIButton outlets.
How can I use this
On 6 Aug 2009, at 09:27, James Lin wrote:
Is this my best option given what I want to accomplish?
Thanks in advance...
Stepping back a little bit. Are you trying to build some sort of real
time messaging service? Or does it matter if the second phone doesn't
receive the message straig
On 8/5/09 7:39 PM, Pierce Freeman said:
>Which version of OS X are you using? With the latest of Leopard, it just
>doesn't seem to work.
Are you using the same flags are Ricky?
I use SetSystemUIMode (kUIModeAllSuppressed, 0) and Exposé is allowed
(which I want). Or do you mean this broke in 10
Hi Sean:
Yeah, I completely copied his code and inserted it into my project. Even
odder, it doesn't allow the Apple-Tab function (which is what it is supposed
to do) but lets Exposé work just fine.
I don't mean that it broke in the latest version of Leopard, as the "old"
version I was using stil
It's always the smallest mistake that can frustrate a person no end.
Several people caught what I did not. getElementByName was what I
wanted... getElementsByName is what I typed. Thank you every one for
the catch and I'm sorry for using up bandwidth over a typo.
On Aug 5, 2009, at 8:44 PM,
On 8/6/09 8:38 PM, Graham Cox said:
>Then add a class method to NSColor in a category:
>
>+ (NSColor*) calibratedRGBColorWithValues:(const float*) values;
Nitpick: use CGFloat instead of float to match NSColor. Especially
since you're passing an array of float/doubles.
--
well...I guess you can call it some sort of real time messaging
service...
I just need to send a string from iPhoneA to iPhoneB.
And allow iPhoneB to reply with another string back to iPhoneA.
That's all I am trying to do.
I had no idea it is so difficult and involves so much.
given my state
On Aug 6, 2009, at 8:30 AM, James Lin wrote:
well...I guess you can call it some sort of real time messaging
service...
I just need to send a string from iPhoneA to iPhoneB.
And allow iPhoneB to reply with another string back to iPhoneA.
That's all I am trying to do.
I had no idea it is so d
That's a bit convoluted. How about:
srandom(time(NULL));
array = [[NSMutableArray alloc] init];
while ([array count] < 15)
{
int randomNo = random() % 15 + 1; // Gives biased results, by the
way
NSNumber numberToAdd = [NSNumber numberWithInt: randomNo];
if (![array
Not strictly Cocoa, but a trick I recently incorporated to remove the
mod-bias is (email code):
float frand = (random() * 1.0) / (RAND_MAX * 1.0); // gives
0.0-0.9...
int myRand = frand * 15; // to get a number from 0-14, inclusive.
On Aug 6, 2009, at 9:12 AM, Jeremy Pereira wrote:
T
I dunno about that. Ether give the element an id and use getElementById, or
use getElementsByName(theName)[0].
On Thu, Aug 6, 2009 at 8:20 AM, Development wrote:
> It's always the smallest mistake that can frustrate a person no end.
> Several people caught what I did not. getElementByName was wha
On 6 Aug 2009, at 17:21, Mac First wrote:
Not strictly Cocoa, but a trick I recently incorporated to remove
the mod-bias is (email code):
float frand = (random() * 1.0) / (RAND_MAX * 1.0); // gives
0.0-0.9...
int myRand = frand * 15; // to get a number from 0-14, inclusive.
That isn
Hi Everyone:
I am looking for an easy way to fade into one photo from another photo. In
other words, from the middle "point", you can see both of the photos on top
of each other to compare the changes. I am currently using Quartz to do
this, but am running into a lot of trouble with that, so I a
Hi:
I am getting this message.
Using two-stage rotation animation. To use the smoother single-stage
animation, this application must remove two-stage method
implementations.
Any idea how to change to smoother single-stage animation?
Agha
___
Coc
Look into NSImage and NSCompositingOperation.
On Thu, Aug 6, 2009 at 10:17 AM, Pierce Freeman wrote:
> Hi Everyone:
>
> I am looking for an easy way to fade into one photo from another photo. In
> other words, from the middle "point", you can see both of the photos on top
> of each other to com
On Aug 6, 2009, at 07:46, Kaelten wrote:
I guess what I'm wondering then is how do I handle the
following case. I have several loosely coupled properties which can
read somewhat like this.
(ProjectInstall *)projectInstall {
return [ProjectInstallController
projectInstallWithProjectId:proj
To further investigate the matter, I logged the contents of both the
NSStoreModelVersionHashesKey dictionary from my store metadata and the
dictionary returned by the entityVersionHashesByName: method of my
source model. I did this both for my working app without versioning
and the not working one
This is new in iPhone OS 3.0. From the documentation for
UIViewController:
- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:
(UIInterfaceOrientation) toInterfaceOrientationduration:
(NSTimeInterval)duration
[...]
The default implementation of this method does nothing. If you
If one of your buttons is always hidden, why do you need two buttons?
You can just use one button and change the title, target, and action
when you need to. If necessary you can even replace the whole button.
Hank
On Aug 6, 2009, at 1:47 AM, Agha Khan wrote:
Hi:
I have a UINavigationBar wh
On 2009 Aug 05, at 22:08, Graham Cox wrote:
On 06/08/2009, at 5:41 AM, David M. Cotter wrote:
in carbon, you can have a sub menu that is used in more than one
super menu.
is there a trick to get this to go in Cocoa?
As far as I know a menu has to be a distinct instance - you can't
sha
Kevin --
I've ran into this problem a few times and what ended up fixing it was
rebooting the phone.
It seems to happen more often after I sync my phone with iTunes, but I'm not
100% sure as to if that's the cause or not.
dennis
On Tue, Aug 4, 2009 at 9:28 PM, Kevin Callahan wrote:
> After upd
How are you "adding elements to the XML document"? If you're calling
add... methods on the NSXML... objects, you'd expect the sort of
results you're seeing -- AFAIK the proxy tree maintained by the
NSTreeController has no way of knowing that you changed the underlying
data model, since AFAIK KVO i
Core Image Filters are your friend.
Check out the CIFilter reference documentation and you'll find bunches
of filters to handle compositing.
On Aug 6, 2009, at 1:29 PM, Pavel Dudrenov wrote:
Look into NSImage and NSCompositingOperation.
On Thu, Aug 6, 2009 at 10:17 AM, Pierce Freeman
wro
On Aug 6, 2009, at 12:19, Mark Szymczyk wrote:
I was calling the NSXML add methods. Thanks for pointing that out.
Well, I gave you the wrong answer. That may have been the correct way
after all.
I tried creating the NSXML objects I want to add and adding them to
the tree controller using
Hi Pavel:
Thanks for the suggestion. How would you suggest I get the NSImage to the
screen, a custom NSView, NSImageWell, etc?
On 8/6/09 10:29 AM, "Pavel Dudrenov" wrote:
> Look into NSImage and NSCompositingOperation.
>
> On Thu, Aug 6, 2009 at 10:17 AM, Pierce Freeman
> wrote:
>> Hi Every
Should the following work (assuming it is included in an Objective-C
file with a .mm extension)?
@interface CDBPMDetectOperation : NSOperation
{
class BPMDetect* bpmDetector; // C++ class as an objective-c
class member
}
-Michael
smime.p7s
Description: S/MIME cryptographic signatu
On Thu, Aug 6, 2009 at 1:51 PM, Michael A.
Crawford wrote:
> Should the following work (assuming it is included in an Objective-C file
> with a .mm extension)?
>
> @interface CDBPMDetectOperation : NSOperation
> {
> class BPMDetect* bpmDetector; // C++ class as an objective-c class member
> }
Hi Douglas:
Do you have one that you can suggest? It doesn't have to do much - just
change the opacity.
On 8/6/09 12:46 PM, "douglas welton" wrote:
> Core Image Filters are your friend.
>
> Check out the CIFilter reference documentation and you'll find bunches
> of filters to handle composit
On Aug 5, 2009, at 9:39 PM, Pierce Freeman wrote:
Which version of OS X are you using? With the latest of Leopard, it
just
doesn't seem to work.
When writing my initial response to this thread, it was 10.5.7.
Just tested with 10.5.8 and all is still well (no Expose, no process
switchin
Really odd, do you think you could send me a little example to see if your
same code works on my system?
On 8/6/09 2:59 PM, "Ricky Sharp" wrote:
>
> On Aug 5, 2009, at 9:39 PM, Pierce Freeman wrote:
>
>> Which version of OS X are you using? With the latest of Leopard, it
>> just
>> doesn't s
On Aug 6, 2009, at 10:10 AM, Pierce Freeman wrote:
Yeah, I completely copied his code and inserted it into my project.
Even
odder, it doesn't allow the Apple-Tab function (which is what it is
supposed
to do) but lets Exposé work just fine.
I don't mean that it broke in the latest version
After some more investigation I've discovered that XQuery was updated
in Mac OS X 10.5.8 as part of a security vulnerability in the PCRE
library which it includes.
http://support.apple.com/kb/HT3757 (scroll to bottom of page)
Which also explains why all XQuery functions using regular express
That's definitely a possibility. However, I am basically creating my
windows the same way that you are. The only difference is, I didn't set any
of those attributes and my main window just appears by "Cocoa default".
On 8/6/09 3:10 PM, "Ricky Sharp" wrote:
>
> On Aug 6, 2009, at 10:10 AM, Pi
On Aug 6, 2009, at 10:37 AM, Matteo Manferdini wrote:
What I discovered is that in the first case the hashes are the same
for the model and the store, while in the second case the model has
lost a lot of metadata in the versioning process. Along with my
entities there are also other entities li
On Aug 6, 2009, at 10:37 AM, Matteo Manferdini wrote:
To further investigate the matter, I logged the contents of both the
NSStoreModelVersionHashesKey dictionary from my store metadata and the
dictionary returned by the entityVersionHashesByName: method of my
source model. I did this both for
Problem solved. As it turns out the problem was that the class is
declared in a C++ namespace. I did not properly scope the class nor
was I using a 'using namespace' statement.
-Michael
--
The united stand. The divided get played.
-- Bernie MAC
On Aug 6, 2009, at 4:5
On Aug 6, 2009, at 8:10 AM, Pierce Freeman wrote:
Hi Sean:
Yeah, I completely copied his code and inserted it into my project.
Even
odder, it doesn't allow the Apple-Tab function (which is what it is
supposed
to do) but lets Exposé work just fine.
Pierce, how are you entering Exposé: f
Hi Eric:
I am using the four finger swipe gesture on a Unibody MacBook Pro and the
key. Neither of which SetSystemUIMode over rides. Maybe there is a way to
just set a window to be at the edges of the screen all the time, and then
put the main window in front of that?
On 8/6/09 3:59 PM, "Eric
On Aug 6, 2009, at 4:03 PM, Pierce Freeman wrote:
Hi Eric:
I am using the four finger swipe gesture on a Unibody MacBook Pro
and the
key. Neither of which SetSystemUIMode overrides.
Yes, that's the problem. SetSystemUIMode doesn't prevent entering
Exposé via that method. Please file a
I am implementing a non-editable custom table view cell (a bit similar to
the network connection listing in the System Preferences Network preference
pane) in a single-column, no header NSTableView.
The cell consists of an image, another image, two stacked strings (left
aligned), another string (r
Hi Eric:
I'll make sure to file a big about that - hopefully it can get resolved
before shipment. But, when using the key, it should stop Exposé, shouldn't
it? I have also tested this and it still doesn't work. Any ideas?
On 8/6/09 5:02 PM, "Eric Schlegel" wrote:
>
> On Aug 6, 2009, at 4:0
And is there any way to make reproduce the "display capture effect" without
using this or SetSystemUIMode. I am attempting to make a full screen app,
and don't want the user to have to disable this in the system preferences.
On 8/6/09 5:02 PM, "Eric Schlegel" wrote:
>
> On Aug 6, 2009, at 4:0
On Aug 6, 2009, at 17:08, Grant Erickson wrote:
However, with regard to the strings, particularly concerning the
right-alignment of the non-stacked string, nudging around the X
points to
achieve the proper right-alignment seems like the wrong way to
approach this
and that I should be specify
On 8/6/09 5:08 PM, Grant Erickson wrote:
> I am implementing a non-editable custom table view cell (a bit similar to the
> network connection listing in the System Preferences Network preference pane)
> in a single-column, no header NSTableView.
>
> The cell consists of an image, another image, tw
I'm trying to work around a problem where the latest update of Mac OS
X (10.5.8) has a broken XQuery.framework. I've discovered that
replacing the XQuery.framework on Mac OS X 10.5.8 with a version from
Mac OS X 10.5.7 solves all the problems.
I'd like to embed the XQuery.framework from Mac
On Aug 6, 2009, at 12:29 PM, Quincey Morris wrote:
Finally, the question of whether 'projectInstall' sometimes returns
nil is irrelevant. That has nothing to do with the compliance of the
Project object.
Except, check out "Bug Fix in KVO's Dependency Mechanism" in the
Leopard Foundation R
On 07/08/2009, at 7:10 AM, Pierce Freeman wrote:
Do you have one that you can suggest? It doesn't have to do much -
just
change the opacity.
Just use an NSImage and -drawAtPoint:fromRect:operation:fraction: and
set a value for the fraction (i.e. the opacity).
--
Rob Keniger
__
On Aug 6, 2009, at 7:18 PM, Pierce Freeman wrote:
And is there any way to make reproduce the "display capture effect"
without
using this or SetSystemUIMode.
I'm not quite clear on what you're saying here. When you say "without
using this", do you mean without actually capturing the displa
I asked this question a while back, didn't get an answer. Figured I'd
give it another shot. Is there any access to these notifications
through the calendar API? Or is there another way to get access to it?
Here is an example of what the notifications are:
http://images.apple.com/hk/en/ser
On Aug 6, 2009, at 5:13 PM, Pierce Freeman wrote:
Hi Eric:
I'll make sure to file a big about that - hopefully it can get
resolved
before shipment. But, when using the key, it should stop Exposé,
shouldn't
it? I have also tested this and it still doesn't work. Any ideas?
Hmm, yes, th
Hello,
I have a view with a toolbar in which I show an action sheet in
viewDidLoad. When the view loads however the action sheet sits slightly
too high, revealing about 20-30 pixels of the toolbar at the bottom.
If I show the action sheet from a button press in the same view however,
it's pe
Hi Eric,
On Aug 7, 2009, at 12:46 AM, Eric Schlegel wrote:
Hmm, yes, the keystroke to invoke Exposé should still be blocked. I
can't say offhand why it wouldn't be.
I filed a bug on this originally in 2005 (it is still open), radar://4376456
In that specific case, Front Row can bypass kiosk
72 matches
Mail list logo