Just thought I would throw this out there in case it's of help to anyone.
https://github.com/perspecdev/PSGoogleReader
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact t
Hi,
I have an NSTableView bound to an NSArrayController, itself bound to a Core
Data store.
The app is working as expected, with two exceptions:
1. Duplicate records:
I have an "add" button bound to arraycontroller.insert
I have created a newObject method to allow me to define default values,
Hello
Could you please give me an idea how to implement this task?
I have a custom (not main) thread, that adds objects to an NSArray at random
times.
I have an another thread (main thread) that has to retrieve these objects
and do something with them (extract some properties from the retrieved
ob
I'm not sure what the best way to tackle this is... so I thought I'd ask here.
I have an image with a circular button inside of it. I'd like to dynamically
fill this button in an arc to show "progress" much like how when you are on
iTunes Store on an iOS and its playing the preview its animating
Should I make two views Portrait and Landscape to handle iOS device rotation or
should struts and springs take care of that for me?
koko
"Don't fight the framework."
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
On May 26, 2011, at 11:24 AM, koko wrote:
> Should I make two views Portrait and Landscape to handle iOS device rotation
> or should struts and springs take care of that for me?
Springs & Struts can do a lot, but if you need some custom layout you can do it
during the UIViewController orientat
On 26 May 2011, at 1:24 PM, koko wrote:
> Should I make two views Portrait and Landscape to handle iOS device rotation
> or should struts and springs take care of that for me?
Don't make two views. Start with auto-resizing (struts and springs). That
should be enough in 95% of cases. If you have
On Thu, May 26, 2011 at 12:56 PM, Nick wrote:
> I have a custom (not main) thread, that adds objects to an NSArray at random
> times.
> I have an another thread (main thread) that has to retrieve these objects
> and do something with them (extract some properties from the retrieved
> object and ma
On May 26, 2011, at 10:56 AM, Nick wrote:
> I have a custom (not main) thread, that adds objects to an NSArray at random
> times.
> ...
> Is there any way to make the RunLoop (after it has processed all
> NSUrlConnection's asynchronous things) check, if there are some objects in
> my NSArray qu
On May 26, 2011, at 1:35 PM, Stephen J. Butler wrote:
> - Use NSNotifications to notify that a new object is waiting to be
> processed. If you go this route, you could actually have multiple
> processing threads all listening for the notification.
Notifications are delivered on the same thread as
On May 26, 2011, at 11:21 AM, Alex Kac wrote:
> So I have the image, and I suppose I can draw that image to a context and
> then draw an arc on that image, and then make another image out of it. That
> seems like it would get slow if I needed to do that a lot.
No need to make a new image. Jus
Hi all. I'm having a layout problem on all my screens after they're
rotated. It seems as though the view loses all knowledge of the
navigation bar at the top after a rotation, so subviews are shoved up
under it. Check it out:
http://i.stack.imgur.com/mFALa.png
It's not just this view. It also
On Thu, May 26, 2011 at 1:39 PM, Ken Thomases wrote:
> On May 26, 2011, at 1:35 PM, Stephen J. Butler wrote:
>> - Use NSNotifications to notify that a new object is waiting to be
>> processed. If you go this route, you could actually have multiple
>> processing threads all listening for the notifi
Custom view that sits on top of a UIImageView? Implement -drawRect: and a
progress property and you're done.
On May 26, 2011, at 11:21 AM, Alex Kac wrote:
> I'm not sure what the best way to tackle this is... so I thought I'd ask
> here. I have an image with a circular button inside of it. I'd
Thanks David and Fritz ... always best to check the path !
koko
"Don't fight the framework."
--Kyle Sluder
On May 26, 2011, at 12:32 PM, David Duncan wrote:
> On May 26, 2011, at 11:24 AM, koko wrote:
>
>> Should I make two views Portrait and Landscape to handle iOS device rotation
>> or shou
Resolved. Turns out that doing this after rotation will re-align everything:
[self.navigationController.view layoutSubviews];
Kinda seems like the framework would call that, but I guess not.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com
On May 26, 2011, at 12:00 PM, G S wrote:
> Resolved. Turns out that doing this after rotation will re-align everything:
>
> [self.navigationController.view layoutSubviews];
>
> Kinda seems like the framework would call that, but I guess not.
It should and this shouldn't be necessary. A bu
On Thu, May 26, 2011 at 1:35 PM, Stephen J. Butler
wrote:
> You might want to abandon that approach and not add objects from the
> background thread directly to the shared array. Instead, you could
> "signal" the main thread that a new object is ready to be processed.
> Some common methods:
- Jus
The OP wants a solution for iOS. lock/unlockFocus only exist in NSView, not
UIView.
FWIW, I think you (that is, the OP) should start with the simplest solution
available (e.g. Steve's suggestion), test performance, and only optimize if
needed. Don't try to optimize if it's not actually require
I am currently rewiring a scanner application which I originally wrote some
years ago using the TWAIN driver directly into the more modern ImageKit
IKScannerDeviceView . I thought that I could customize it enough to meet my
needs without having to build it using ImageCaptureCore framework with
Sure, I get the idea of only optimizing if needed. That said, experience (15
years) tells me very strongly that if I know that X will be slow and Y will be
fast and either way works properly, I'd probably choose Y. So I prefer to stand
on the shoulders of giants where possible. I've got a workin
>> Kinda seems like the framework would call that, but I guess not.
>
> It should and this shouldn't be necessary. A bug report would be good here.
Yes, I'm going to file one. While this workaround straightens the
layout after rotation, it's a little janky because things snap into
place after the
On May 26, 2011, at 2:39 PM, G S wrote:
>>> Kinda seems like the framework would call that, but I guess not.
>>
>> It should and this shouldn't be necessary. A bug report would be good here.
>
> Yes, I'm going to file one. While this workaround straightens the
> layout after rotation, it's a li
This may be the wrong forum for this question- if so, please let me know.
I want to use an iPhone to act as mouse and keyboard for a Mac. It looks
like the best connection is through a network, although Bluetooth might also
work. There are other apps that do this. I'd love some sample code so I
d
I'm using random(), but every time I run my app I get the same sequence,
despite having this code in my app delegate's -appDidFinishLaunching method.
Clearly I'm not seeding it right, though I can't see why - I get a different
value for seed every time. What gives?
unsigned seed = (uns
> I'm using random(), but every time I run my app I get the same sequence,
> despite having this code in my app delegate's -appDidFinishLaunching method.
> Clearly I'm not seeding it right, though I can't see why - I get a different
> value for seed every time. What gives?
>
>
> unsigned
On May 26, 2011, at 8:00 PM, Graham Cox wrote:
> I'm using random(), but every time I run my app I get the same sequence,
> despite having this code in my app delegate's -appDidFinishLaunching method.
> Clearly I'm not seeding it right, though I can't see why - I get a different
> value for see
On May 26, 2011, at 18:00, Graham Cox wrote:
> unsigned seed = (unsigned)([NSDate timeIntervalSinceReferenceDate] *
> 1.0);
>
> NSLog(@"launched, seed = %ld", seed );
Also, be careful here, because %ld is the wrong format specifier for type
'unsigned'. Whether it logs the
On May 26, 2011, at 6:15 PM, Dave Keck wrote:
> I'm not sure what your problem is, but I believe arc4random() has superseded
> random() for a while now.
Incorrect. There are many reason to have a seedable PRNG, the least of which is
the ability to reasonably debug the randomness. That an arc4ra
On 27/05/2011, at 11:23 AM, Quincey Morris wrote:
> On May 26, 2011, at 18:00, Graham Cox wrote:
>
>> unsigned seed = (unsigned)([NSDate timeIntervalSinceReferenceDate] *
>> 1.0);
>>
>> NSLog(@"launched, seed = %ld", seed );
>
> Also, be careful here, because %ld is the wro
On May 26, 2011, at 8:32 PM, Graham Cox wrote:
>
> On 27/05/2011, at 11:23 AM, Quincey Morris wrote:
>
>> On May 26, 2011, at 18:00, Graham Cox wrote:
>>
>>> unsigned seed = (unsigned)([NSDate timeIntervalSinceReferenceDate] *
>>> 1.0);
>>>
>>> NSLog(@"launched, seed = %ld", s
Weird.
Setting a breakpoint on srandom, setstate or srandomdev never triggers except
for my own call of it. Using srandomdev doesn't change anything.
Switching to arc4random() gives me a varying random sequence, so that's a
usable solution to my problem. But the behaviour with random() I'm seei
I don't think random/srandom are superseded. I use them myself for game
creation. The game just has one number associated with it, I use that to seed
random and I can completely recreate the whole game from that one number.
I use the slightly more complicated initstate version. I see no reason
On 27/05/2011, at 11:53 AM, Ken Thomases wrote:
> %u
>
>> I'm confused about how to correctly write format specifiers for both 32 and
>> 64-bit runtimes. The 64-bit porting guide doesn't spell it out (yet you end
>> up with code peppered with warnings that you should examine the use of the
>>
I think this was from some programming book I have, sorry I can site it:
srandom(time(NULL));
cheers
Kevin
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the modera
I've made an iOS app that allows users to organize their contacts into groups
using the AddressBook Framework.
It is working great, except I am getting reports that it is failing when trying
to add a contact to a group if the contact was imported from an Exchange server.
I am using ABGroupAddMe
I just thought I'd lift my head up long to say thank you, Anders.
Unfortunately, your code doesn't work in my app. Tried several mutations;
still no good.
Another thing I learned is that programmatically switching apps, simulating the
user typing cmd-tab, which works when the user does it, do
On May 26, 2011, at 7:21 PM, Jerry Krinock wrote:
> I just thought I'd lift my head up long to say thank you, Anders.
> Unfortunately, your code doesn't work in my app. Tried several mutations;
> still no good.
>
> Another thing I learned is that programmatically switching apps, simulating
>
unsigned seed = (unsigned)([NSDate timeIntervalSinceReferenceDate] * 1.0);
You are trying to set seed to a value that is something like
3,281,585,690,000; seed cannot handle this value so it will be set to
4294967295, at least on my machine.
You are using the same seed each time you run the p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 5/26/11 6:00 PM, Graham Cox wrote:
> I'm using random(), but every time I run my app I get the same
> sequence, despite having this code in my app delegate's
> -appDidFinishLaunching method. Clearly I'm not seeding it right,
> though I can't see why
I've seen gnu documentation for srandom that suggest the equivalent of Kevin's
suggestion, namely "srandom(time(0))". Not sure if using the NSDate has any
advantage over a call to time() and it would avoid this type of thing (gnu is
likely to ensure time() and srandom() work correctly together).
On May 26, 2011, at 7:15 PM, Kevin Bracey wrote:
> srandom(time(NULL));
It’s never a good idea to seed a RNG with something guessable like this. (An
old exploit against the Netscape browser’s SSL implementation was made possible
in part by doing exactly that.)
All you have to do is call srand
On May 26, 2011, at 9:32 PM, Jens Alfke wrote:
> It’s never a good idea to seed a RNG with something guessable like this.
Not all applications of random() have anything to do with security...
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
___
On 27/05/2011, at 1:16 PM, Conrad Shultz wrote:
> I'm pretty sure your problem has to do with overflowing your data types.
> "unsigned" is getting treated as "unsigned int", which will be too
> small to hold the value after you, for some reason I'm not clear on,
> multiply by 1.
>
> When I w
On Thu, May 26, 2011 at 9:30 PM, Graham Cox wrote:
>
> I should mention this is in a 64-bit build, so doesn't that mean that
> 'unsigned' is 64 bits?
No. 'unsigned' is the same size on both 32- and 64-bit The only
built-in types that are different between 32- and 64-bits are:
signed long
long (
On 27/05/2011, at 2:42 PM, Clark Cox wrote:
> No. 'unsigned' is the same size on both 32- and 64-bit The only
> built-in types that are different between 32- and 64-bits are:
>
> signed long
> long (which is really the same as "signed long")
> unsigned long
> and any pointer type
>
> All other
> However, in practical terms, the indexable string elements are components,
> not codepoints.
>
> It seems to me the single hardest thing to come to grips with when newly
> approaching NSString is understanding that 'unichar's (and "characters" in
> the sense of [characterAtIndex:]) *aren't*
On May 26, 2011, at 22:56, Andrew Thompson wrote:
> I believe this stems from a period in history when the unicode group believed
> that they'd be able to fit all practical scripts into 65536 code points.
> Which meant you could get away with all kinds of assumptions like 16 bit
> types and UCS
48 matches
Mail list logo