Re: strategies for working w/ large amounts of text

2010-12-14 Thread tra...@postfl.com
You can work with NSTextStorage for individual documents.
I've used this with whole books, lengthy ones like Don Quixote.

On 2010-12-13, at 4:03 AM, Shane wrote:

 Are you building a concordance database first ?
 
 
 I have no thoughts whatsoever on how I'm building anything as of yet.
 Just researching how something of this size would be manipulated.
 
 I'm certainly looking over those USFM standards.
 ___
 
 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/travis%40postfl.com
 
 This email sent to tra...@postfl.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


NSNetService resolution and sleep

2010-12-14 Thread jonathan
My app has a client component and a server component.
The server publishes an NSNetService and the client discovers it using 
NSNetServiceBrowser.

When the Mac goes to sleep the client NSNetServiceBrowser delegate receives 
- netServiceBrowser:didRemoveService:moreComing:

When the Mac awakes the client NSNetServiceBrowser delegate receives:
- netServiceBrowser:didFindService:moreComing:
- netServiceBrowser:didRemoveService:moreComing:
- netServiceBrowser:didFindService:moreComing:

In other words the NSNetService instance appears, disappears and then reappears 
after sleep.
I can deal with the sleep-remove + awake-find sequence okay but the extra 
service connection notifications are troublesome as it is hard to distinguish 
them from genuine service removal rather than an apparent side effect of sleep 
recuperation.

Is this expected or do I need to configure the service in some way with regard 
to sleep performance?
At present I simply let NSNetService do is it wills through the sleep.

Maybe this one of those cases where one's own expectations are simply out of 
whack with the black box.

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.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: Record indentifier and the truth

2010-12-14 Thread Nick Zitzmann

On Dec 14, 2010, at 12:43 AM, Ferruccio Vitale wrote:

 That's what I mean. I need to exclude some com.apple.contacts.Contact
 entities from sync, but I also let the user to choose which people
 exclude, that's why I need a first pull-the-truth sync; but if I
 refuse future changes of excluded entities, would the sync server try
 to sync them again? 

Yes, and IIRC, if your client refuses a change, then the server will keep 
sending you the changes your client refused the last time just in case it 
changed its mind.

Nick Zitzmann
http://www.chronosnet.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: convert CFRange to NSRange?

2010-12-14 Thread Matt Neuburg
On Sun, 12 Dec 2010 08:04:55 -0800, John C. Randolph j...@mac.com said:

On Dec 12, 2010, at 7:34 AM, Matt Neuburg wrote:

 I feel like I'm missing something. I can't seem to typecast as  
 CFRange to an NSRange. I know I can pull a CFRange apart and  
 reassemble it as an NSRange, but shouldn't there be a simpler way? m.

CFRange is defined as a pair of unsigned longs, and NSRange is defined  
as either unsigned ints or unsigned longs depending on whether you're  
compiling 32- or 64-bit.

I recognize that the conversion is not simple, but that is exactly why I am 
surprised that the frameworks do not supply a utility conversion method. If I 
were to write my own I would surely get it wrong. This would be useful because 
you can receive a CFRange while mucking about in some lower-level framework 
(such as Core Text) which you would then like to apply to an AppKit object 
(such as an NSString). Obviously the problem can be solved by staying in the 
lower-level world (i.e., in my case I treated the NSString as a CFString) but 
it would be nice not to have to. 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___

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: assign property behaves differently from simple instance variable???

2010-12-14 Thread Matt Neuburg
On Mon, 13 Dec 2010 11:31:38 -0800, Wim Lewis w...@omnigroup.com said:

On 13 Dec 2010, at 11:01 AM, Matt Neuburg wrote:
 How can this seemingly minor change make such a big difference? I'm not even 
 *using* the synthesized accessor! Yet its mere presence breaks the project. 
 How can this be? m.
 
 PS A new discovery: changing the name of the ivar / property to fr solves 
 the problem. So it appears that the problem is that I'm synthesizing 
 accessors for the *name* firstResponder. It is as if this name was being 
 used under the hood in some way I'm unaware of, and synthesizing an accessor 
 breaks its use. But how can *that* be?

Perhaps it stomps on the -isFirstResponder method? KVC access for 'foo' checks 
(among other things) '-isFoo', presumably so that boolean properties feel 
natural; perhaps synthesizing a 'foo' property likewise causes the object to 
respond to 'isFoo'.

Hmm, also, it appears that UIResponder has some undocumented methods 
-firstResponder and -_firstResponder, which your synthesized property would 
also interfere with.

Doubtless. But how would I have discovered this?

Doesn't anyone besides me want to evince any outrage that this can happen? I 
mean, sheesh, if I wanted to live in a world where the namespace was polluted 
with secret undocumented terminology I could collide with accidentally, I could 
use AppleScript. 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___

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: assign property behaves differently from simple instance variable???

2010-12-14 Thread Keary Suska
On Dec 13, 2010, at 12:01 PM, Matt Neuburg wrote:

self-firstResponder = tf;

Well, the proper syntax is self.firstResponder . Using the deference is 
probably a back-door way to access the class struct. Unless I misunderstand 
something

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/archive%40mail-archive.com

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


Re: assign property behaves differently from simple instance variable???

2010-12-14 Thread David Duncan
On Dec 14, 2010, at 10:01 AM, Keary Suska wrote:

 On Dec 13, 2010, at 12:01 PM, Matt Neuburg wrote:
 
   self-firstResponder = tf;
 
 Well, the proper syntax is self.firstResponder . Using the deference is 
 probably a back-door way to access the class struct. Unless I misunderstand 
 something


'self-foo' is equivalent to 'foo' (both are transformed into an appropriate 
offset into instance storage). self.foo is equivalent to [self foo] or [self 
setFoo:] depending on context.
--
David Duncan

___

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: assign property behaves differently from simple instance variable???

2010-12-14 Thread Matt Neuburg

On Dec 14, 2010, at 10:01 AM, Keary Suska wrote:

 On Dec 13, 2010, at 12:01 PM, Matt Neuburg wrote:
 
   self-firstResponder = tf;
 
 Well, the proper syntax is self.firstResponder . Using the deference is 
 probably a back-door way to access the class struct. Unless I misunderstand 
 something
 


You do; that's irrelevant to the example. Indeed, I deliberately left the code 
looking this way in order to emphasize the fact that synthesizing the accessors 
for firstResponder breaks the app even if I never use them. m.

--
matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring  Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.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: assign property behaves differently from simple instance variable???

2010-12-14 Thread Dave Keck
Hmm, also, it appears that UIResponder has some undocumented methods 
-firstResponder and -_firstResponder, which your synthesized property would 
also interfere with.

 Doubtless. But how would I have discovered this?

I would have implemented -firstResponder and set a breakpoint to see
who was calling it. You could also use otool or class-dump to get a
listing of methods that UIResponder implements.

 Doesn't anyone besides me want to evince any outrage that this can happen? I 
 mean, sheesh, if I wanted to live in a world where the namespace was polluted 
 with secret undocumented terminology I could collide with accidentally, I 
 could use AppleScript. m.

Hah – Cocoa/Obj-C certainly has its shortcomings, but comparing it to
AppleScript? Ouch.

There was an interesting discussion about bringing namespaces to Obj-C
on cfe-dev last month:

http://comments.gmane.org/gmane.comp.compilers.clang.devel/11746

Needless to say it's no small task, and the method-overriding problem
raised in this thread might not even be solved by Obj-C namespaces, as
it would depend entirely on how comprehensive the implementation was.
___

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: assign property behaves differently from simple instance variable???

2010-12-14 Thread Kyle Sluder
On Dec 14, 2010, at 9:01 AM, Matt Neuburg m...@tidbits.com wrote:

 
 Doesn't anyone besides me want to evince any outrage that this can happen? I 
 mean, sheesh, if I wanted to live in a world where the namespace was polluted 
 with secret undocumented terminology I could collide with accidentally, I 
 could use AppleScript. m.

The only thing that infuriates me more than the time spent hunting down name 
collisions with private APIs is the insistence from some parties that ObjC 
namespaces are a solution in search of a problem.

In a world with KVC/KVO where prefixing method names to ensure uniqueness is no 
longer feasible, Apple needs to deliver namespaces for ObjC. Hacks like 
private API begins with underscore aren't enough to deal with public/private 
namespace collisions or multiple similarly-named classes being loaded 
dynamically into the same process.

The only real way to get that point across is to keep filing Radars when 
situations like this arise.

--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


Re: Intercepting cocoa/quartz/opengl Draw command.

2010-12-14 Thread Kyle Sluder
Please don't cross-post.

--Kyle Sluder

On Tue, Dec 14, 2010 at 7:46 AM, manoj
manojkumar_ya...@persistent.co.in wrote:
 Hi All,
         I am developing application that  allows remote access to other
 applications (running on different machines). The idea is to make give users
 transparent access to certain applications.
 To have this , I am trying to intercept cocoa/quartz/opengl  draw command
 and reproduce them in the client (The input is redirected from the client to
 the server).
         But unable to figure out the way to get draw command.

 On Windows , this can be done by using Windows metafile which captures all
 GDI drawing commands to a file and that file can then be passed to a remote
 PC and rendered there .

 Is there any such file on mac which stores all drawing commands ?

                        OR

         Is there any other way to develop above application.

 Please give me your valuable suggestion.

 Thanks in advance.

 DISCLAIMER == This e-mail may contain privileged and confidential
 information which is the property of Persistent Systems Ltd. It is intended
 only for the use of the individual or entity to which it is addressed. If
 you are not the intended recipient, you are not authorized to read, retain,
 copy, print, distribute or use this message. If you have received this
 communication in error, please notify the sender and delete all copies of
 this message. Persistent Systems Ltd. does not accept any liability for
 virus infected mails.

  ___
 Do not post admin requests to the list. They will be ignored.
 Quartz-dev mailing list      (quartz-...@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/quartz-dev/kyle.sluder%40gmail.com

 This email sent to kyle.slu...@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/archive%40mail-archive.com

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


Core Data: Error while saving. Multiple validation errors occurred.

2010-12-14 Thread Ayers, Joseph
 I changed a couple attributes of three properties in my data model. Even if I 
 trash the previous store, I get the error: 
 Error while saving
 Multiple validation errors occurred.
 
 Any idea what is causing this or where to look for a fix?
 
 Thanks,
 Joseph
___

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


Using MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread Gustavo Pizano
Hello all.

Im having some troubles here, 

I have a view within  a NavigationViewController that display a list of picked 
songs, so at first run this list is empty, when the user clicks the add songs, 
I push a MPMediaPickerController into the navigationViewController,  but the 
size of the MPMediaPickerController view's is in portrait mode always.

So before pushing the MPMediaPickerController into the NavViewController I did 
this:

CGRect frame = picker.view.frame;
frame = self.view.bounds;
picker.view.bounds = frame;

so it shows the correct size, but the last items on the picker's 
tabViewController aren't touchable, its like the superview of the picker it's 
still 320px of width when it should be 480px,

I dunno if its possible to display the picker correctly depending on the device 
orientation.

Thx in advance

Gustavo


___

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 MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread David Duncan
On Dec 14, 2010, at 12:31 PM, Gustavo Pizano wrote:

 I have a view within  a NavigationViewController that display a list of 
 picked songs, so at first run this list is empty, when the user clicks the 
 add songs, I push a MPMediaPickerController into the 
 navigationViewController,  but the size of the MPMediaPickerController view's 
 is in portrait mode always.


As noted in the documentation, the media picker doesn't support landscape mode.
--
David Duncan

___

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 MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread Gustavo Pizano
Ok I found my answer in the docs

I doesn't support landscape mode..

G.
On Dec 14, 2010, at 9:31 PM, Gustavo Pizano wrote:

 Hello all.
 
 Im having some troubles here, 
 
 I have a view within  a NavigationViewController that display a list of 
 picked songs, so at first run this list is empty, when the user clicks the 
 add songs, I push a MPMediaPickerController into the 
 navigationViewController,  but the size of the MPMediaPickerController view's 
 is in portrait mode always.
 
 So before pushing the MPMediaPickerController into the NavViewController I 
 did this:
 
   CGRect frame = picker.view.frame;
   frame = self.view.bounds;
   picker.view.bounds = frame;
 
 so it shows the correct size, but the last items on the picker's 
 tabViewController aren't touchable, its like the superview of the picker it's 
 still 320px of width when it should be 480px,
 
 I dunno if its possible to display the picker correctly depending on the 
 device orientation.
 
 Thx in advance
 
 Gustavo
 
 

___

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 MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread Gustavo Pizano
Yep.. I didn't read the header part before :S. 
On Dec 14, 2010, at 9:34 PM, David Duncan wrote:

 On Dec 14, 2010, at 12:31 PM, Gustavo Pizano wrote:
 
 I have a view within  a NavigationViewController that display a list of 
 picked songs, so at first run this list is empty, when the user clicks the 
 add songs, I push a MPMediaPickerController into the 
 navigationViewController,  but the size of the MPMediaPickerController 
 view's is in portrait mode always.
 
 
 As noted in the documentation, the media picker doesn't support landscape 
 mode.
 --
 David Duncan
 

___

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 MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread Gustavo Pizano
Thanks anyway.. ;)
On Dec 14, 2010, at 9:34 PM, David Duncan wrote:

 On Dec 14, 2010, at 12:31 PM, Gustavo Pizano wrote:
 
 I have a view within  a NavigationViewController that display a list of 
 picked songs, so at first run this list is empty, when the user clicks the 
 add songs, I push a MPMediaPickerController into the 
 navigationViewController,  but the size of the MPMediaPickerController 
 view's is in portrait mode always.
 
 
 As noted in the documentation, the media picker doesn't support landscape 
 mode.
 --
 David Duncan
 

___

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 multiple text colors in an editable text field

2010-12-14 Thread Matt Neuburg
On Sun, 12 Dec 2010 14:05:38 +1100, BareFeetWare 
list.develo...@barefeetware.com said:
 1. Apple Mail. If you reply to a messages containing multi-colored text, you 
 can edit that text.
 
 So my question is, how do they do it?

Okay, I see now that there's a UITextInput protocol allowing you to design your 
own widgets that interact with the text input system. So in theory you could do 
that, and draw with Core Text. Indeed, the docs suggest that you would do 
exactly that.

http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/CustomTextProcessing/CustomTextProcessing.html

Unfortunately they make reference to a non-existent example project called 
SimpleTextInput which, as has been pointed out here before, doesn't exist.

http://www.cocoabuilder.com/archive/cocoa/294182-where-is-simpletextinput-sample-code-project.html

This sort of thing makes me wonder whether the protocol is somehow insufficient 
to work as advertised. Otherwise, why would Apple withdraw the only example 
illustrating it? And why wouldn't they talk about it at WWDC? Still, this is 
clearly the direction to go. 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___

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


UITextField in UIScrollView

2010-12-14 Thread Phillip Mills
I have a number of UITextField objects inside a (subclass of) UIView, which is 
the content view for a (subclass of) UIScrollView.

When the user types into a text field, I dynamically change its size if 
necessary and reset the content size of the content view.  When needed, I also 
scroll so that a rectangle matching the typing position of the active text 
field is visible in the scroll area.  So far, so good.

When the content size is larger than the visible space and the user moves to an 
empty UITextField to type, the display scrolls right and left on each 
character.  The problem is that scrollRectToVisible:: is being called from a 
UIFieldEditor object with a rectangle that is the size of the entire content 
area rather than anything related to the current field or the location where 
characters are being entered.

Here's a bit of the traceback:
#0  -[MultiLineScrollView scrollRectToVisible:animated:] (self=0x4d2b810, 
_cmd=0x6cddd5, rect={origin = {x = 0, y = 0}, size = {width = 1119, height = 
740}}, animated=1 '\001')
#1  0x0035dd84 in -[UIFieldEditor scrollSelectionToVisible:] ()
#2  0x0035bc18 in -[UIFieldEditor webViewDidChange:] ()
#3  0x0001f6c1 in _nsnote_callback ()
#4  0x00d84f99 in __CFXNotificationPost_old ()
#5  0x00d0433a in _CFXNotificationPostNotification ()
#6  0x00015266 in -[NSNotificationCenter postNotificationName:object:userInfo:] 
()
#7  0x00d1d67d in __invoking___ ()
#8  0x00d1d551 in -[NSInvocation invoke] ()
#9  0x0211982a in SendDelegateMessage ()
#10 0x01f6636f in WebEditorClient::respondToChangedContents ()
#11 0x02166fdc in WebCore::Editor::appliedEditing ()

I suppose I could set up a flag to ignore the call if I've already scrolled the 
current text field or if the height suggests that it's *not* a text field, but 
I'm interested in finding a way to handle this that isn't fighting with the 
framework if at all possible.

(Also, strictly out of curiosity, what are WebCore, WebView, and 
WebEditorClient things doing in a 
UITextField?)___

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


- resolveInstanceMethod:

2010-12-14 Thread Ariel Feinerman
Hi,

will its selector be in resolveInstanceMethod:, if method exist? I want to
implement some Cocoa methods for earlier  ;

-- 
best regards
Ariel
___

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: - resolveInstanceMethod:

2010-12-14 Thread Kyle Sluder
On Tue, Dec 14, 2010 at 1:15 PM, Ariel Feinerman arielfap...@gmail.com wrote:
 Hi,

 will its selector be in resolveInstanceMethod:, if method exist? I want to
 implement some Cocoa methods for earlier  ;

Are you asking if -resolveInstanceMethod: is called for methods that
have implementations at compile time? If that is your question, the
answer is no.

// BEGIN FILE LISTING

#import Foundation/Foundation.h

@interface Foo : NSObject
- (void)aMethod;
@end

@implementation Foo
- (void)aMethod {
  NSLog(@aMethod called);
}

+ (BOOL)resolveInstanceMethod:(SEL)aSelector {
  NSLog(@resolving %@, NSStringFromSelector(aSelector));
  return [super resolveInstanceMethod:aSelector];
}
@end

int main(int argc, char **argv) {
  [NSAutoreleasePool new];
  [[Foo new] aMethod];
  return 0;
}

// END FILE LISTING

% /Developer/usr/bin/clang -o /tmp/resolve /tmp/resolve.m -framework Foundation
% /tmp/resolve

2010-12-14 13:36:19.577 resolve[2314:903] aMethod called

--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


Re: How to read a text file over a network

2010-12-14 Thread Dave Zwerdling
You should check out NSFileManager to see if you can simplify your read methods 
- specifically the contentsAtPath: method.
Then decode the data from the file using the appropriate encoding.
Once you've figured out what the URI for the file is, you can use NSFileManager 
again to fetch it, using an NSUrl.

It sounds like you might have an easier time using a plist.  Cocoa has good 
support for parsing and simplifying access using NSDictionary.



On Dec 13, 2010, at 4:54 AM, Abhijeet Singh wrote:

 Hi,I am new to Mac. In my application I have to read a text file (say 
 file1.txt) from a user defined location/path. User defines this filepath in 
 another text file (say file2.txt). My program first reads file2.txt and gets 
 the path of file1.txt from there. file2.txt always exists on my machine but 
 file1.txt can be anywhere on network. My question is if user wants to define 
 some network file path then:How to define a network file path? (I tried 
 keeping file1.txt over a network and define its path as given in Get Info 
 panel in file2.txt)How to read a file over a network? (I am reading file 
 using C functions fopen, fscanf, fgets. Do i need to use any function from 
 cocoa?)Thanks  RegardsAbhijeetDear cocoadev ! Get Yourself a cool, short 
 @in.com Email ID now!
 ___
 
 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/zwerdlds%40gmail.com
 
 This email sent to zwerd...@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/archive%40mail-archive.com

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


Re: - resolveInstanceMethod:

2010-12-14 Thread Ariel Feinerman
Thank you, this is well so I can implement Cocoa methods from 10.6 and if
app is running on earlier version one will be resolved otherwise there will
be nothing

2010/12/14 Kyle Sluder kyle.slu...@gmail.com

 On Tue, Dec 14, 2010 at 1:15 PM, Ariel Feinerman arielfap...@gmail.com
 wrote:
  Hi,
 
  will its selector be in resolveInstanceMethod:, if method exist? I want
 to
  implement some Cocoa methods for earlier  ;

 Are you asking if -resolveInstanceMethod: is called for methods that
 have implementations at compile time? If that is your question, the
 answer is no.

 // BEGIN FILE LISTING

 #import Foundation/Foundation.h

 @interface Foo : NSObject
 - (void)aMethod;
 @end

 @implementation Foo
 - (void)aMethod {
  NSLog(@aMethod called);
 }

 + (BOOL)resolveInstanceMethod:(SEL)aSelector {
  NSLog(@resolving %@, NSStringFromSelector(aSelector));
  return [super resolveInstanceMethod:aSelector];
 }
 @end

 int main(int argc, char **argv) {
  [NSAutoreleasePool new];
  [[Foo new] aMethod];
  return 0;
 }

 // END FILE LISTING

 % /Developer/usr/bin/clang -o /tmp/resolve /tmp/resolve.m -framework
 Foundation
 % /tmp/resolve

 2010-12-14 13:36:19.577 resolve[2314:903] aMethod called

 --Kyle Sluder




-- 
best regards
Ariel
___

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: Core Data: Error while saving. Multiple validation errors occurred.

2010-12-14 Thread Ayers, Joseph
When I log Userinfo from the save operation, 
NSError *error = nil;   //Now 
try saving the data
if (![[self managedObjectContext] save: error]) {
   NSLog(@Unresolved error %@, %@, error, [error userInfo]);

I get:
2010-12-14 17:40:19.829 Roboplasm[23542:903] Unresolved error Error 
Domain=NSCocoaErrorDomain Code=1560 UserInfo=0x43f870 Multiple validation 
errors occurred., {
NSDetailedErrors = (
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43ec90 TapeDate 
is a required value.,
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f2e0 ClipDate 
is a required value.,
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f830 TableDate 
is a required value.
);
}

Indeed, these are the attributes that I added to the entities that are 
specified with type date. I'm at a loss for how to rectify this. 

Joseph 

On Dec 14, 2010, at 2:49 PM, Nick Zitzmann wrote:

 
 On Dec 14, 2010, at 12:21 PM, Ayers, Joseph wrote:
 
 I changed a couple attributes of three properties in my data model. Even if 
 I trash the previous store, I get the error: 
 Error while saving
 Multiple validation errors occurred.
 
 Any idea what is causing this
 
 Usually it happens because you tried to add or modify several records at once 
 and did not push a value for a required property in more than one of them. I 
 think that error also happens if you left a dangling reference in a 
 relationship property for more than one record.
 
 or where to look for a fix?
 
 Check the error's userInfo for more information about what went wrong. The 
 userInfo dictionary will contain more specific information about what went 
 wrong.
 
 Nick Zitzmann
 http://www.chronosnet.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: Core Data: Error while saving. Multiple validation errors occurred.

2010-12-14 Thread Nick Zitzmann

On Dec 14, 2010, at 4:18 PM, Ayers, Joseph wrote:

 When I log Userinfo from the save operation, 
NSError *error = nil;  //Now 
 try saving the data
if (![[self managedObjectContext] save: error]) {
   NSLog(@Unresolved error %@, %@, error, [error userInfo]);

That's not really necessary. Just break on the error in the debugger and type 
po [error userInfo] to print the results of sending the -userInfo message to 
the error.

 I get:
 2010-12-14 17:40:19.829 Roboplasm[23542:903] Unresolved error Error 
 Domain=NSCocoaErrorDomain Code=1560 UserInfo=0x43f870 Multiple validation 
 errors occurred., {
NSDetailedErrors = (
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43ec90 TapeDate 
 is a required value.,
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f2e0 ClipDate 
 is a required value.,
Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f830 TableDate 
 is a required value.
);
 }
 
 Indeed, these are the attributes that I added to the entities that are 
 specified with type date. I'm at a loss for how to rectify this. 

That means that you added three keys to the model _and_ marked them as 
required, and then the application failed to fill each of those keys with a 
value prior to saving. Either you need to make the app fill those keys with 
values, or you need to re-evaluate whether or not those keys should be required 
to be filled  change the model accordingly.

Nick Zitzmann
http://www.chronosnet.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: Core Data: Error while saving. Multiple validation errors occurred. SOLVED

2010-12-14 Thread Ayers, Joseph
Indeed, changing them to optional solved the problem

Many thanks,
Joseph Ayers

On Dec 14, 2010, at 6:22 PM, Nick Zitzmann wrote:

 
 On Dec 14, 2010, at 4:18 PM, Ayers, Joseph wrote:
 
 When I log Userinfo from the save operation, 
   NSError *error = nil;  //Now 
 try saving the data
   if (![[self managedObjectContext] save: error]) {
  NSLog(@Unresolved error %@, %@, error, [error userInfo]);
 
 That's not really necessary. Just break on the error in the debugger and type 
 po [error userInfo] to print the results of sending the -userInfo message 
 to the error.
 
 I get:
 2010-12-14 17:40:19.829 Roboplasm[23542:903] Unresolved error Error 
 Domain=NSCocoaErrorDomain Code=1560 UserInfo=0x43f870 Multiple validation 
 errors occurred., {
   NSDetailedErrors = (
   Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43ec90 TapeDate 
 is a required value.,
   Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f2e0 ClipDate 
 is a required value.,
   Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f830 TableDate 
 is a required value.
   );
 }
 
 Indeed, these are the attributes that I added to the entities that are 
 specified with type date. I'm at a loss for how to rectify this. 
 
 That means that you added three keys to the model _and_ marked them as 
 required, and then the application failed to fill each of those keys with a 
 value prior to saving. Either you need to make the app fill those keys with 
 values, or you need to re-evaluate whether or not those keys should be 
 required to be filled  change the model accordingly.
 
 Nick Zitzmann
 http://www.chronosnet.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: Core Data: Error while saving. Multiple validation errors occurred.

2010-12-14 Thread vincent habchi
Le 14 déc. 2010 à 20:21, Ayers, Joseph j.ay...@neu.edu a écrit :

 I changed a couple attributes of three properties in my data model. Even if 
 I trash the previous store, I get the error: 
 Error while saving
 Multiple validation errors occurred.
 
 Any idea what is causing this or where to look for a fix?

What did you change? Could you be more specific?

V.___

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: Rotated and scaled CALayer

2010-12-14 Thread Vincent Habchi
Hi Ramas,

 No I hadn't. I not quite sure which action (and how) I could use in
 addition with Core Animation. I need (near) real-time drawing for
 scaling and rotating. So dealing with pixels data for every update is
 quite expensive. Unless I am missing something?

It is written in the basic documentation of the vImage framework that it was 
precisely done to support real-time or near real-time geometrical operations on 
raster files like rotation and interpolation. I must admit, however, that I 
never dug into it myself: I do a lot of CALayer affine transforms in the 
application I'm writing, but I don't care about rotated pixels since I mostly 
deal with vector data.

Cheers!
Vincent___

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


Call for People: CocoaHeads Silicon Valley

2010-12-14 Thread Dave DeLong
Hi everyone,

This is a question, but more of an announcement.  We're going to try and get 
the Silicon Valley CocoaHeads group up and running again, with our first 
meeting being January 13th at 7pm.  For those of you who are interested in 
either attending and/or presenting, please email me off-list and let me know. 
I'm trying gauge how much interest there is locally for this, and if it's worth 
my time to take this on.

Thanks!

Dave DeLong
___

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


cannot access __block variable of array type inside block

2010-12-14 Thread Jonathon Kuo
I'm trying to learn GCD and reading 
http://developer.apple.com/library/mac/#featuredarticles/BlocksGCD/index.html
But the Global Concurrent Queues example in that document (last updated 
2010-11-10) doesn't even compile. It complains about accessing array 'result' 
from within the block:

#define COUNT 128
__block double result[COUNT];
dispatch_apply(COUNT, q_default, ^(size_t i){
result[i] = complex_calculation(i);   /* === ERROR HERE!
 });
double sum = 0;
for (int i=0; i  COUNT; i++) sum += result[i];


What is wrong here? This looks like it should work. Below is my full program.
-Jonathon


#include dispatch/dispatch.h
#include stdio.h
#define COUNT 128

double complex_calculation( int i )
{
  return i * 3.14;
}

int main()
{
  int i = 0;
  __block double result[COUNT];

  dispatch_queue_t q_default;
  /* get default queue */
  q_default = dispatch_get_global_queue(0, 0);

  dispatch_apply(COUNT, q_default, ^(size_t i) {
result[i] = complex_calculation(i);   /* === ERROR HERE!
  });

  double sum = 0;
  for (i=0; i  COUNT; i++) sum += result[i];
  printf(%f\n, sum);
  return 0;
}

$ cc -g blk3.c -o blk3
blk3.c: In function ‘__main_block_invoke_1’:
blk3.c:20: error: cannot access __block variable of array type inside block


___

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: cannot access __block variable of array type inside block

2010-12-14 Thread Jonathon Kuo
Thanks, Dave!  That works, though I don't understand why...


On Dec 14, 2010, at 7:35 PM, Dave Zarzycki wrote:

 Jonathon,
 
 This is being tracked by our internal bug number 8590846. I'm told that the 
 workaround is to place the array within a structure:
 
 __block struct {
   double result[COUNT];
 } results;
 
 
 davez
 
 
 
 On Dec 14, 2010, at 7:30 PM, Jonathon Kuo wrote:
 
 I'm trying to learn GCD and reading 
 http://developer.apple.com/library/mac/#featuredarticles/BlocksGCD/index.html
 But the Global Concurrent Queues example in that document (last updated 
 2010-11-10) doesn't even compile. It complains about accessing array 
 'result' from within the block:
 
 #define COUNT 128
 __block double result[COUNT];
 dispatch_apply(COUNT, q_default, ^(size_t i){
  result[i] = complex_calculation(i);   /* === ERROR HERE!
 });
 double sum = 0;
 for (int i=0; i  COUNT; i++) sum += result[i];
 
 
 What is wrong here? This looks like it should work. Below is my full program.
 -Jonathon
 
 
 #include dispatch/dispatch.h
 #include stdio.h
 #define COUNT 128
 
 double complex_calculation( int i )
 {
  return i * 3.14;
 }
 
 int main()
 {
  int i = 0;
  __block double result[COUNT];
 
  dispatch_queue_t q_default;
  /* get default queue */
  q_default = dispatch_get_global_queue(0, 0);
 
  dispatch_apply(COUNT, q_default, ^(size_t i) {
result[i] = complex_calculation(i);   /* === ERROR HERE!
  });
 
  double sum = 0;
  for (i=0; i  COUNT; i++) sum += result[i];
  printf(%f\n, sum);
  return 0;
 }
 
 $ cc -g blk3.c -o blk3
 blk3.c: In function ‘__main_block_invoke_1’:
 blk3.c:20: error: cannot access __block variable of array type inside block
 
 
 ___
 
 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/zarzycki%40apple.com
 
 This email sent to zarzy...@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


Building a GUI for Terminal Applications

2010-12-14 Thread Raphael Klein
I'm working on an App to execute rsync in background. 
The copying process works fine, now I want to output the progress of the 
download!

NSPipe *pipe = [[NSPipe alloc] init];
[task setStandardOutput:pipe];
[task setStandardError:pipe];
[task setStandardInput:[NSPipe 

NSFileHandle *readHandle = [[task standardOutput] 
[task launch];  

NSData *readData=nil;
readData = [readHandle readDataToEndOfFile];
NSString *readString = [[NSString alloc] initWithData:readData 
encoding:NSASCIIStringEncoding];
NSLog(@%@, readString); 

There was a tutorial located at this url: 
http://developer.apple.com/samplecode/Sample_Code/Cocoa/Moriarity.htm
But I can not find it anymore. 
Does anybody knows where it is located now. 

Yours
ra
___

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


Intercepting cocoa/quartz/opengl Draw command.

2010-12-14 Thread manoj

Hi All,
I am developing application that  allows remote access to  
other applications (running on different machines). The idea is to  
make give users transparent access to certain applications.
	To have this , I am trying to intercept cocoa/quartz/opengl  draw  
command and reproduce them in the client (The input is redirected from  
the client to the server).

But unable to figure out the way to get draw command.   

	On Windows , this can be done by using Windows metafile which  
captures all GDI drawing commands to a file and that file can then be  
passed to a remote PC and rendered there .


Is there any such file on mac which stores all drawing commands ?

   OR

Is there any other way to develop above application.

Please give me your valuable suggestion.


Thanks in advance.
DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
___

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: cannot access __block variable of array type inside block

2010-12-14 Thread Dave Zarzycki
Jonathon,

This is being tracked by our internal bug number 8590846. I'm told that the 
workaround is to place the array within a structure:

__block struct {
double result[COUNT];
} results;


davez



On Dec 14, 2010, at 7:30 PM, Jonathon Kuo wrote:

 I'm trying to learn GCD and reading 
 http://developer.apple.com/library/mac/#featuredarticles/BlocksGCD/index.html
 But the Global Concurrent Queues example in that document (last updated 
 2010-11-10) doesn't even compile. It complains about accessing array 'result' 
 from within the block:
 
 #define COUNT 128
 __block double result[COUNT];
 dispatch_apply(COUNT, q_default, ^(size_t i){
   result[i] = complex_calculation(i);   /* === ERROR HERE!
 });
 double sum = 0;
 for (int i=0; i  COUNT; i++) sum += result[i];
 
 
 What is wrong here? This looks like it should work. Below is my full program.
 -Jonathon
 
 
 #include dispatch/dispatch.h
 #include stdio.h
 #define COUNT 128
 
 double complex_calculation( int i )
 {
  return i * 3.14;
 }
 
 int main()
 {
  int i = 0;
  __block double result[COUNT];
 
  dispatch_queue_t q_default;
  /* get default queue */
  q_default = dispatch_get_global_queue(0, 0);
 
  dispatch_apply(COUNT, q_default, ^(size_t i) {
result[i] = complex_calculation(i);   /* === ERROR HERE!
  });
 
  double sum = 0;
  for (i=0; i  COUNT; i++) sum += result[i];
  printf(%f\n, sum);
  return 0;
 }
 
 $ cc -g blk3.c -o blk3
 blk3.c: In function ‘__main_block_invoke_1’:
 blk3.c:20: error: cannot access __block variable of array type inside block
 
 
 ___
 
 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/zarzycki%40apple.com
 
 This email sent to zarzy...@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


Moderator - Reminder ALL first posts are moderated

2010-12-14 Thread Scott Anguish
I wanted to remind all new posters (including apple.com addresses) that because 
of previous abuse, all first time postings by users are moderated. Sometimes 
more than one are.

Once it’s obvious that they aren’t spam, people who have been removed from the 
list, and all sorts of other things, the mod bit is cleared and postings happen 
automatically.

I will attempt to keep up with these over the holiday break, covering them at 
least daily.

Always remember that the devforums.apple.com are available as well.

Thanks

Scott
[Moderator]___

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: Building a GUI for Terminal Applications

2010-12-14 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/14/10 7:43 AM, Raphael Klein wrote:
 There was a tutorial located at this url: 
 http://developer.apple.com/samplecode/Sample_Code/Cocoa/Moriarity.htm
 But I can not find it anymore. 
 Does anybody knows where it is located now. 

For navigating Apple's doc structure I find that Google's scoping
feature is quite helpful:

http://www.google.com/search?q=moriarty+site%3Adeveloper.apple.com

May this prove useful to you now and in the future!

- -- 
Conrad Shultz

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

iD8DBQFNCEA4aOlrz5+0JdURAk/TAJ0Yoz1ypeG557Ye4QLZaM1/BI8MfQCfa++r
FH/by6iBHet8bgzWWnOuCQk=
=aMPm
-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


Re: Call for People: CocoaHeads Silicon Valley

2010-12-14 Thread Dave DeLong
Probably better than sending me an email would be to fill out this info form:

https://spreadsheets.google.com/viewform?formkey=dGJ6bU5sVUVYaTBCbDRhbmRGYzhXa2c6MQifq

It's easier to organize info that way.

Thanks!  (and sorry for the noise)

Dave

On Dec 14, 2010, at 7:27 PM, Dave DeLong wrote:

 Hi everyone,
 
 This is a question, but more of an announcement.  We're going to try and get 
 the Silicon Valley CocoaHeads group up and running again, with our first 
 meeting being January 13th at 7pm.  For those of you who are interested in 
 either attending and/or presenting, please email me off-list and let me know. 
 I'm trying gauge how much interest there is locally for this, and if it's 
 worth my time to take this on.
 
 Thanks!
 
 Dave DeLong
___

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 bindings to lessen amount of code

2010-12-14 Thread davelist

On Dec 13, 2010, at 12:25 PM, Paul Johnson wrote:

 I want to obtain the value at a particular row and column in a table.
 
 
 I implemented the datasource protocol method
 tableView:objectValueForTableVColumn:row:
 
 
 In this method I return [[self.arrangedObjects valueForKey:@symbol]
 objectAtIndex:rowIndex].
 
 
 Is there a way to solely use bindings to accomplish this and not implement
 the datasource protocol method at all?


Yes. You create an NSArrayController and then bind each table column. See the 
appropriate examples here:

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

HTH,
Dave

___

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: Building a GUI for Terminal Applications

2010-12-14 Thread Andy Lee
On Dec 14, 2010, at 11:12 PM, Conrad Shultz wrote:
 For navigating Apple's doc structure I find that Google's scoping
 feature is quite helpful:
 
 http://www.google.com/search?q=moriarty+site%3Adeveloper.apple.com

If you don't mind giving up some space in your browser window, the ADC Search 
Safari/Firefox extension by Sal Conigliaro is pretty nice:

http://acmeinc.org/extensions/

It goes through Apple's own search page, which has gotten much, much better 
lately.  I didn't notice the improvements until I got some comments on my blog 
post:

http://www.notesfromandy.com/2010/11/08/looking-stuff-up-docs-and-sample-code/

And with that bit of blog-pimping I'll stop veering off-topic...

--Andy

___

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


Core data - binding related problem in NSNumberFormatter and NSDatePicker

2010-12-14 Thread Devarshi Kulshreshtha
Hi all,

I am trying a core-data sample application, from Cocoa Programming - Aaron
Hillegass.

In it there is an entity Car, with following properties:

1. condition - Int 16
2. datePurchased - Date
3. makeModel - String
4. onSpecial - Boolean
5. photo - Binary
6. price - Decimal

There are certain view objects such as-

1. TableView
2. DatePicker
3. Image Well, etc.

Some of the bindings performed are-

1. TableView - TableColumn with NSNumberFormatter (set as currency) -
 value: arrangedObjects.price
2. DatePicker - value: selection.datePurchased

Problems are:

1. In TableColumn with NSNumberFormatter it is not accepting any decimal
numbers which I am entering for currency, such as - 123,00 or 123.45 or +235
or 567. It is always displaying this alert message: Formatting error.

2. Whenever I am selecting a row in table and changing its corresponding
value in date picker, it is simultaneously changing the values for other
records, ie. if for first row in table I have set it
to 12/25/2004, it is keeping it 12/25/2004 for other rows.

Can anyone help me to resolve my problems? The source code can be found
here: 
URL=http://db.tt/o9870RZhttp://www.google.com/url?sa=Dq=http://db.tt/o9870RZusg=AFQjCNEFKxI-FmHVUnl93xcd6LpCn22kfQ


-- 
Thanks,

Devarshi
___

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 multiple text colors in an editable text field

2010-12-14 Thread Jayson Adams

On Dec 14, 2010, at 12:40 PM, Matt Neuburg wrote:

 On Sun, 12 Dec 2010 14:05:38 +1100, BareFeetWare 
 list.develo...@barefeetware.com said:
 1. Apple Mail. If you reply to a messages containing multi-colored text, you 
 can edit that text.
 
 So my question is, how do they do it?
 
 Okay, I see now that there's a UITextInput protocol allowing you to design 
 your own widgets that interact with the text input system. So in theory you 
 could do that, and draw with Core Text. Indeed, the docs suggest that you 
 would do exactly that.
 ...
 Unfortunately they make reference to a non-existent example project called 
 SimpleTextInput which, as has been pointed out here before, doesn't exist.
 ...
 This sort of thing makes me wonder whether the protocol is somehow 
 insufficient to work as advertised. Otherwise, why would Apple withdraw the 
 only example illustrating it? And why wouldn't they talk about it at WWDC? 
 Still, this is clearly the direction to go. m.


The protocol, plus NSAttributedString, plus Core Text (plus some thought!) is 
definitely enough to roll your own multi-font text editor, with attachments 
even.  That's what we did for the iPad version of NoteBook.

Best,


__jayson

Circus Ponies NoteBook for iPad
The Best App for Taking Notes on iPad
www.circusponies.com/iPad




___

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: Intercepting cocoa/quartz/opengl Draw command.

2010-12-14 Thread Nick Zitzmann

On Dec 14, 2010, at 8:46 AM, manoj wrote:

 Hi All,
I am developing application that  allows remote access to other 
 applications (running on different machines). The idea is to make give users 
 transparent access to certain applications.
   To have this , I am trying to intercept cocoa/quartz/opengl  draw 
 command and reproduce them in the client (The input is redirected from the 
 client to the server).
But unable to figure out the way to get draw command.  
 
   On Windows , this can be done by using Windows metafile which captures 
 all GDI drawing commands to a file and that file can then be passed to a 
 remote PC and rendered there .
 
   Is there any such file on mac which stores all drawing commands ?
 
   OR
 
Is there any other way to develop above application.

I'd start by looking at the source code to VineServer and figuring out how they 
did it: http://sourceforge.net/projects/osxvnc/

Also, please don't cross-post.

Nick Zitzmann
http://www.chronosnet.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