NSImage initWithPasteboard

2011-09-15 Thread Eugene Rudenko
Hello!

I have a JNI method to get image from clipboard. After 5-6 calls a method, I
have a hanging method. It hanging at call initWithPasteboard.
Although the method canInitWithPasteboard returns true.

Objective C method:
-
NSPasteboard *myPasteboard = [NSPasteboard generalPasteboard];
NSImage *image = [[[NSImage alloc] initWithPasteboard:myPasteboard ]
autorelease];
-

Who can say why this might happen?

Eugene.
___

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: No longer use NSLog() in Xcode 4?

2011-09-15 Thread Gerd Knops

On Sep 15, 2011, at 3:55 PM, Scott Ribe wrote:

> On Sep 15, 2011, at 2:34 PM, Jerry Krinock wrote:
> 
>> Bang.  Just do a ⇧⌘F, copy that 13476 to the search field, and in seconds 
>> the problem is staring me in the face.
>> 
>> __FILE__ would be useful if it didn't print out the whole damned full path.
> 
> Interesting, never thought of that. I prefer the file path & function name 
> myself, but that's just me.
> 
I still write and run most of my code in TextMate. There I use a macro for log 
output that does include __FILE__ and __LINE__, and the console recognizes that 
pattern and converts it into a clickable link. Very handy, I so wish I could do 
that in Xcode.

Gerd___

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: No longer use NSLog() in Xcode 4?

2011-09-15 Thread Scott Ribe
On Sep 15, 2011, at 2:34 PM, Jerry Krinock wrote:

> Bang.  Just do a ⇧⌘F, copy that 13476 to the search field, and in seconds the 
> problem is staring me in the face.
> 
> __FILE__ would be useful if it didn't print out the whole damned full path.

Interesting, never thought of that. I prefer the file path & function name 
myself, but that's just me.

> Unfortunately, I remember learning once that Xcode's regex does not parse 
> newlines, and just confirmed that still seems to be the case.  So the \n on 
> the end breaks it, and without it, I'm left with a blank line.

Some regex syntaxes won't parse past a line end unless you use a special flag 
or modifier. I really don't use Xcode regex, so I can't say more, except 
perhaps for this you could just do it outside Xcode.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




___

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: No longer use NSLog() in Xcode 4?

2011-09-15 Thread Jerry Krinock

On 2011 Sep 15, at 12:16, Scott Ribe wrote:

> Well, if you used __LINE__ in your NSLog statements instead of reading the 
> cursor position, then perhaps you wouldn't have to read anything in your 
> script.

Yes, except the really nice thing about %%%{PBXSelectionStart}%%% is that it 
gives me a unique identifier with 99.99% probability.  For example, say that I 
wanted to hone in on where an exception was being raised.  I'd pepper the 
suspect code, even if spread across different files, with NSLogs including 
%%%{PBXSelectionStart}%%%.  Each one takes only one keystroke.  Build and run.  
Console will print out something like this:

145656
145856
12674
12874
13476
*** Exception Blah Blah.
13487

Bang.  Just do a ⇧⌘F, copy that 13476 to the search field, and in seconds the 
problem is staring me in the face.

__FILE__ would be useful if it didn't print out the whole damned full path.

> Then for removing them, perhaps you could use regex search & replace based on 
> your signature comment.

My script deletes the entirety of any line that has the signature comment.  
Since C allows more than one statement on a line, I can also put in other 
temporary statements such as 

   thatString = @"Try this string!" ; NSLog(…) ;

and my remove-debugging script blows away all such lines with one keystroke.

My signature comment is: /*DB?Line*/.  A regex like this should work:

   [^\n]/\*DB\?Line\*/[^\n]+\n

Unfortunately, I remember learning once that Xcode's regex does not parse 
newlines, and just confirmed that still seems to be the case.  So the \n on the 
end breaks it, and without it, I'm left with a blank line.

But thank you, Scott.  I'll keep trying.

* * *

Code Snippets would start to fill the bill if there were some environment 
variables available.


___

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: Timeout back to login screen

2011-09-15 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 9/15/11 12:40 PM, Shawn Bakhtiar wrote:
> 
> Hi All,
> 
> I have multiple users using the same iTouch device during our 
> inventory, shipping and receiving process. They log in, take 
> inventory, ship stuff, receive stuff, than leave it on the
> counter. They have requested that the unit time out after 5 min
> back to the log in screen. I have done some research on line, and
> have come across a few awkward suggestions on how to do it.
> 
> I am looking for someway of detecting when the device goes back to 
> the lock screen, and using that as a signal to take my app to the 
> login window and clear out the password field.

Take a look at the UIApplicationDelegate protocol.

I haven't played with it, but:

- - applicationProtectedDataWillBecomeUnavailable:

looks like a promising direct notification that the phone is going to
be locked (provided the device is using content protection and a
passcode).

It's a bit of a misappropriation of the notification, but other
options (such as -applicationWillResignActive:) are going to have side
effects because they can be triggered by other events.


- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

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

iEYEARECAAYFAk5yWHwACgkQaOlrz5+0JdVXiwCfXCh1RiGWkbz6pOJBVAkqgM/n
UfgAn1Enl23LuGAI8a2XgaI3s1zitF6W
=X2vs
-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


Timeout back to login screen

2011-09-15 Thread Shawn Bakhtiar

Hi All,

I have multiple users using the same iTouch device during our inventory, 
shipping and receiving process. They log in, take inventory, ship stuff, 
receive stuff, than leave it on the counter. They have requested that the unit 
time out after 5 min back to the log in screen. I have done some research on 
line, and have come across a few awkward suggestions on how to do it.

I am looking for someway of detecting when the device goes back to the lock 
screen, and using that as a signal to take my app to the login window and clear 
out the password field.

Any suggestions?

Shawn

  
___

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: New Core Data File Wrapper example ?

2011-09-15 Thread John Pannell
Hi Frederic-

There is older example code showing how to accomplish this:

http://developer.apple.com/library/mac/#samplecode/PersistentDocumentFileWrappers/Introduction/Intro.html

I, too, have been hoping for an update that pulls together all of Lion's new 
document features + Core Data in one place, but haven't seen it yet.  Hope this 
helps!

John


John Pannell
http://www.positivespinmedia.com

On Sep 15, 2011, at 12:15 PM, Frederic Testuz wrote:

> In the WWDC 2011 video "Session 315 What's New in Core Data on Mac OS X", 
> there is a line about a new Lion Auto Save example for using File Wrappers 
> coming soon (time 13:54 or page 35 of the pdf version).
> 
> Well, the WWDC was some weeks ago, did any of you find this example ? Or can 
> you access it only with Xcode 4.2 ?
> 
> Frédéric Testuz___
> 

___

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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Leonardo
Hi, thank you all for your suggestion.
I created the Sym link, relaunched XCode but when I compile I still get
errors like:

/Developer/SDKs/MacOSX10.5.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
No such file or directory

But the file exists... I am puzzled.
The error comes right from the stdarg.h file containing

#if defined(__GNUC__)
#include_next Here I get the error
#elif defined(__MWERKS__)
#include "mw_stdarg.h"
#else
#error "This header only supports __MWERKS__."
#endif


Regards
-- Leonardo


> Da: Richard Somers 
> Data: Thu, 15 Sep 2011 10:00:07 -0600
> A: Leonardo 
> Cc: 
> Oggetto: Re: SDK 10.5 on XCode 4.1
> 
> On Sep 15, 2011, at 8:13 AM, Leonardo wrote:
> 
>> I need to build using SDK 10.5. I work on Lion and XCode 4.1
> 
> If you need the MacOSX10.5.sdk one way to do this is to make a unix hard link
> to the sdk included with Xcode 3. To make a hard link use the following
> commands from the Terminal application.
> 
>  $ cd /Developer/SDKs
> 
>  $ sudo ln -s /Developer3/SDKs/MacOSX10.5.sdk MacOSX10.5.sdk
> 
> This assumes that the current Xcode 4 is in /Developer and Xcode 3 is in
> /Developer3.
> 
> --Richard
> 


___

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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Scott Ribe
On Sep 15, 2011, at 12:14 PM, Conrad Shultz wrote:

> ...and I suspect that is what Time Machine does under the hood as well.

Yes, it does. Hard links to directories is a pretty non-standard thing, which 
is why ln does not support it.


-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




___

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


New Core Data File Wrapper example ?

2011-09-15 Thread Frederic Testuz
In the WWDC 2011 video "Session 315 What's New in Core Data on Mac OS X", there 
is a line about a new Lion Auto Save example for using File Wrappers coming 
soon (time 13:54 or page 35 of the pdf version).

Well, the WWDC was some weeks ago, did any of you find this example ? Or can 
you access it only with Xcode 4.2 ?

Frédéric Testuz___

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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 9/15/11 10:57 AM, Richard Somers wrote:
> On Sep 15, 2011, at 10:40 AM, Scott Ribe wrote:
> 
>> Minor nit, that's a symlink, not a hard link. One important 
>> difference is that a symlink can cross volume boundaries...
> 
> Correct. Second important difference is symbolic links may refer
> to directories which this is.

Not quite true.  User-land "ln" cannot (to my knowledge) create hard
links to directories in OS X.  But the file system does support such
hard links.  The remote backup program that I use (rsnapshot) definitely
does it, and I suspect that is what Time Machine does under the hood as
well.

There's a lengthy discussion of this matter on Stack Overflow for anyone
interested:
http://stackoverflow.com/questions/80875/what-is-the-bash-command-to-create-a-hardlink-to-a-directory-in-os-x

But yes, for your purposes you want a symlink.

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

iD8DBQFOckB9aOlrz5+0JdURAsYTAJ0R487HqyHVt7kuIl/SlLVGWxa4GwCePBXa
88rzdDSINaszPVwEB+9Oosg=
=6Str
-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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Richard Somers
On Sep 15, 2011, at 10:40 AM, Scott Ribe wrote:

> Minor nit, that's a symlink, not a hard link. One important difference is 
> that a symlink can cross volume boundaries...

Correct. Second important difference is symbolic links may refer to directories 
which this is.

--Richard

___

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: Sample code using the new document model?

2011-09-15 Thread John C. Randolph

On Aug 26, 2011, at 7:55 PM, Jerry Krinock wrote:

> I'm just surprised that, of 733 Sample Code projects available in the Mac Dev 
> Center, none of them use either of these much-touted but quite complicated 
> new features.

Sample code projects get updated in DTS engineers' spare time, for the most 
part.  Since Lion shipped so recently, I wouldn't expect them to have any spare 
time for at least another six months.  

I would take a look at TextEdit, I think that's using al the new iCloud 
document features.

-jcr
___

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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Scott Ribe
On Sep 15, 2011, at 10:00 AM, Richard Somers wrote:

> If you need the MacOSX10.5.sdk one way to do this is to make a unix hard link 
> to the sdk included with Xcode 3. To make a hard link use the following 
> commands from the Terminal application.

Minor nit, that's a symlink, not a hard link. One important difference is that 
a symlink can cross volume boundaries...

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




___

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: SDK 10.5 on XCode 4.1

2011-09-15 Thread Richard Somers
On Sep 15, 2011, at 8:13 AM, Leonardo wrote:

> I need to build using SDK 10.5. I work on Lion and XCode 4.1

If you need the MacOSX10.5.sdk one way to do this is to make a unix hard link 
to the sdk included with Xcode 3. To make a hard link use the following 
commands from the Terminal application.

 $ cd /Developer/SDKs

 $ sudo ln -s /Developer3/SDKs/MacOSX10.5.sdk MacOSX10.5.sdk

This assumes that the current Xcode 4 is in /Developer and Xcode 3 is in 
/Developer3.

--Richard

___

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


Predicates not fetching.

2011-09-15 Thread James Cicenia
Hello -

I first read an xml file upon startup into a Core Data sqlite.

I then fetch all records... they are there.
I then do a simple predicate @"name == %@", nameString

If find nothing. And it is there.

Now if I open the created SQLITE database via a client tool,
It also turns up zero records. However if I do a like construct
in SQL I can get it to return records.

name like nameString%


However, if I do a like via my predicate, still no records.

I am using the same context throughout.

My xml was dead simple as in:

8
Buddha

There are no hidden characters, etc.

Any thoughts? This is driving me a bit crazy


Thanks
James

smime.p7s
Description: S/MIME cryptographic signature
___

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

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

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

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


SDK 10.5 on XCode 4.1

2011-09-15 Thread Leonardo
Hi,
I need to build using SDK 10.5. I work on Lion and XCode 4.1 Build 4B110.
Is a way to do that? Actually I get a lot of error, and I can't compile.
For example I get the error:

/Developer/SDKs/MacOSX10.5.sdk/usr/include/stdarg.h:4:25: error: stdarg.h:
No such file or directory

But the file exists. Same error for the file Float.h and Xmmintrin.h
I set:

Architecture 32-bit Intel
Base SDK Mac OS X 10.5
Valid Architectures 1386 x86_64
Compiler "GCC 4.2" or "Apple LLMV compiler 2.1" or "LLMV  GCC 4.2"

As suggested by a colleague I did on Terminal:

   cd /Developer/usr/llvm-gcc-4.2/bin
   sudo ln -s 
/OldDevelopers/Developer3.0/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm
-g++-4.2 powerpc-apple-darwin10-llvm-g++-4.2

cd /Developer/usr/libexec/gcc/darwin/
sudo ln -s /OldDevelopers/Developer3.0/usr/libexec/gcc/darwin/ppc ppc

Any solution?


Regards
-- Leonardo


___

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 Support in-line attachments in NStextView

2011-09-15 Thread Martin Hewitson
Here's a subclass of NSTextView I wrote quite a while ago to handle linking 
files. Not sure if it all worked in the end, but it should be enough to get you 
started.

Martin



FileLinkTextView.h
Description: Binary data


FileLinkTextView.m
Description: Binary data



On Sep 15, 2011, at 10:15 AM, jonat...@mugginsoft.com wrote:

> 
> On 15 Sep 2011, at 06:53, Sandeep Mohan Bhandarkar wrote:
> 
>> Hi All,
>> 
>> I have a requirement where in I need to create a NSTextView that can support 
>> in-line attachments. the feature that I am looking for can be summed up in 
>> the following points
>> 
>> 1) Ability to drag and drop files images etc onto the NSTextView.
>> 2) Displaying one placeholder image for any file that is dragged and dropped 
>> (except strings)
>> 3) No text editing should be allowed in the area where the Placeholder image 
>> for attachments is present.
>> 
>> I know i am asking for lot here but can some one please provide any pointers 
>> to any sample code or any resource as to how we can do this
>> 
>> Thanks in Advance,
>> Sandeep.
>> 
> I haven't used them but NSTextAttachment and the NSTextAttachmentCell 
> protocol look promising.
> 
> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextAttachment_Class/Reference/Reference.html#//apple_ref/doc/uid/2385
> 
> Regards
> 
> Jonathan Mitchell
> Mugginsoft LLP
> 
> 
> KosmicTask - the Integrated Scripting Environment for OS X.
> http://www.mugginsoft.com/KosmicTask
> ___
> 
> 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/martin.hewitson%40aei.mpg.de
> 
> This email sent to martin.hewit...@aei.mpg.de


Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson






___

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


sender is nil in action method from NSPopupButtonCell in an NSTextFieldCell

2011-09-15 Thread Peter
I have a header cell for an NSTableView based on NSTextFieldCell containing an 
NSPopupButtonCell.
I am setting the NSPopupButtonCell up programmatically. I set an action method 
for the NSPopupButtonCell in the standard fashion:

[self.popupCell setAction:@selector(headerCellPopupChanged:)];

This works in principle but when the dummy action method

- (void)headerCellPopupChanged:(id)sender{
   NSLog(@"Changed: %@", sender);
}

is called, sender is nil:

Changed: (null)

Am I missing something? Has anybody seen this?

Thanks,

Peter___

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 Support in-line attachments in NStextView

2011-09-15 Thread jonat...@mugginsoft.com

On 15 Sep 2011, at 06:53, Sandeep Mohan Bhandarkar wrote:

> Hi All,
> 
> I have a requirement where in I need to create a NSTextView that can support 
> in-line attachments. the feature that I am looking for can be summed up in 
> the following points
> 
> 1) Ability to drag and drop files images etc onto the NSTextView.
> 2) Displaying one placeholder image for any file that is dragged and dropped 
> (except strings)
> 3) No text editing should be allowed in the area where the Placeholder image 
> for attachments is present.
> 
> I know i am asking for lot here but can some one please provide any pointers 
> to any sample code or any resource as to how we can do this
> 
> Thanks in Advance,
> Sandeep.
> 
I haven't used them but NSTextAttachment and the NSTextAttachmentCell protocol 
look promising.

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextAttachment_Class/Reference/Reference.html#//apple_ref/doc/uid/2385

Regards

Jonathan Mitchell
Mugginsoft LLP


KosmicTask - the Integrated Scripting Environment for OS X.
http://www.mugginsoft.com/KosmicTask
___

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