Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?

2010-09-26 Thread Jerry Krinock

On 2010 Sep 26, at 16:58, Ken Thomases wrote:

> Have you tried actually using the method that's in his log 
> (-initWithObjects:count:), instead of a different one?  Or even 
> +arrayWithObjects:count:?

Yes, but to make a long story short, I was stymied by the rocket science of 
class clusters and abstract classes.  The error says that 
+initWithObjects:count: was sent to NSCFArray.  So first I reverse-engineered 
from savannah.gnu.org what are the argument types.  They are id* (a C array of 
ids), and an unsigned int.  Then I constructed an invocation using the 
NSClassFromString(), @selector(), etc.  But upon invoking, the system told me 
that +initWithObjects:count: is not implemented the *abstract* class NSCFArray. 
 I don't know what the concrete subclass is :(

Another thing I tried was to replace the method +[NSCFArray 
initWithObjects:count:] using Method Replacement.  But it was never invoked, 
probably for the same reason, although interestingly -[NSCFArray 
objectAtIndex:] is invoked with great frequency.

So rather than fight all this stuff I thought I'd ask the more general 
question: Is it possible for the same exception in the same build to crash the 
app on one system but be handled with no crash on another system.  I believe it 
has something to do with exception handlers but I've never learnt this very 
well.

___

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


clearsContextBeforeDrawing a NOOP?

2010-09-26 Thread Matt Neuburg
I believe that UIView's clearsContextBeforeDrawing makes no difference - I
can find no situation where changing its setting from YES to NO or vice
versa actually changes the way drawing happens. Before I report this as a
bug, can anyone provide a counter-example? Thx - m.

PS Also, as I've said before, I believe that neither
UIViewAnimationOptionAllowAnimatedContent nor
UIViewAnimationOptionLayoutSubviews has any effect. Again, I'd like to
report these as bugs (because they do not in fact do anything), but perhaps
someone has a counter-example.

-- 
matt neuburg, phd = m...@tidbits.com, 
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: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?

2010-09-26 Thread Ken Thomases
On Sep 26, 2010, at 4:32 PM, Jerry Krinock wrote:

> When my app runs for a particular user it emits these to the console once in 
> awhile:
> 
> *** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at 
> objects[0]
> 
> However, the app does not crash for him when this happens.
> 
> I would like it to crash when this happens so I could get a crash report with 
> a call stack.
> 
> I can reproduce that log message with this code:
> 
>NSArray* crash = [NSArray arrayWithObject:nil] ;
>NSLog(@"%@", crash) ;
> 
> However, for me, even if I launch by doubleclicking my Release build in 
> Finder, after logging that exception, it crashes.
> 
> We're both running Mac OS 10.6.4 on Intel, although his is a 64-bit 
> processor, the app is 32-bit.
> 
> Why does it crash for me and not for him?

Have you tried actually using the method that's in his log 
(-initWithObjects:count:), instead of a different one?  Or even 
+arrayWithObjects:count:?

Regards,
Ken

___

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


-[NSCFArray initWithObjects:count:]: nil object. Why no crash?

2010-09-26 Thread Jerry Krinock
When my app runs for a particular user it emits these to the console once in 
awhile:

*** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at 
objects[0]

However, the app does not crash for him when this happens.

I would like it to crash when this happens so I could get a crash report with a 
call stack.

I can reproduce that log message with this code:

NSArray* crash = [NSArray arrayWithObject:nil] ;
NSLog(@"%@", crash) ;

However, for me, even if I launch by doubleclicking my Release build in Finder, 
after logging that exception, it crashes.

We're both running Mac OS 10.6.4 on Intel, although his is a 64-bit processor, 
the app is 32-bit.

Why does it crash for me and not for him?  Does the Mac OS have some kind of 
system-wide exception-handling preferences that I'm not aware of?  Could some 
system extension do this?

Thank you,

Jerry Krinock


___

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: Selection of object in popup button

2010-09-26 Thread Alejandro Rodríguez
Hey Mikael,

In order to solve your issues you need to get away from selection. Providing 
the data available in your popups is a Model matter not a View/Controller issue 
so it should not depend on the current table selection. The easiest way to do 
this is using bindings. If you have an Array Controller providing content for 
your table then you can set the keypath in your column to your model method 
that returns the desired array for a given object. As for updating the cells 
you need to tell the table that it needs to redraw itself. However if you bind 
the appearance attributes of your cell the model object you can also achieve 
the same result without any code. the arrayController.arrangedObjects keypath 
is your friend here. 

Good luck,

Alejandro


> 
> Dear developers,
> 
> In a table view I have in one column a popup button cell. The content array 
> of the popup button depends on what  object is selected in the table view and 
> also a predicate object. I have noticed some problems when coding this, 
> though:
> 
> 1. If no row (object) is selected in the table view, clicking on the popup 
> button for one row reveals the array of the popup button, but the content 
> array depends on the selected object in the table view. But it seems like no 
> object is selected. The second time i click the popup button the row is 
> recognized as selected. How do I overcome this?
> 
> 2. Depending on what object I select in the popup button some attributes of 
> the selected object in the table view is affected. It seems, though, like 
> selecting an object in the popup button is not enough. I need to deselect the 
> row in the table view or select another row to actually perform the 
> selection. How do I overcome this?
> 
> Thanks!
> /Mikael


___

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


Selection of object in popup button

2010-09-26 Thread Mikael Wämundson
Dear developers,

In a table view I have in one column a popup button cell. The content array of 
the popup button depends on what  object is selected in the table view and also 
a predicate object. I have noticed some problems when coding this, though:

1. If no row (object) is selected in the table view, clicking on the popup 
button for one row reveals the array of the popup button, but the content array 
depends on the selected object in the table view. But it seems like no object 
is selected. The second time i click the popup button the row is recognized as 
selected. How do I overcome this?

2. Depending on what object I select in the popup button some attributes of the 
selected object in the table view is affected. It seems, though, like selecting 
an object in the popup button is not enough. I need to deselect the row in the 
table view or select another row to actually perform the selection. How do I 
overcome this?

Thanks!
/Mikael

___

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


Problem positioning the field editor for outline view

2010-09-26 Thread Gideon King
Hi, I have an outline view which uses variable row heights, and need to resize 
and position the field editor as the user edits the text. My code in my outline 
view is as follows:

- (void)textDidChange:(NSNotification *)aNotification { 
NSInteger editedRow = [self editedRow];
if (editedRow > -1) {
[self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndex:editedRow]];
NSTextView *editor = (NSTextView *)[[self window] 
fieldEditor:NO forObject:self];
NSRect newRect = [self frameOfCellAtColumn:[self editedColumn] 
row:editedRow];
[editor setFrame:newRect];
}
 
[super textDidChange:aNotification];
}

I have confirmed that the editor is an object of the expected class (a subclass 
of NSTextView, but I have also checked with NSTextView), so as far as I can 
tell, it is the actual text editor.

No matter what I do, it doesn't update the frame of the editor. When the editor 
wraps to the next row, it draws the cell the right size but the editor only 
covers the top line of the cell. 

I can't help thinking I must be missing something obvious here, but haven't 
been able to find it. Any suggestions?

Thanks

Gideon








___

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


Table column alignment

2010-09-26 Thread koko
In IB I have set the properties of a table text field cell to be right  
justified but do not see this result when displaying data; i.e. the  
data remains left justified. Is there some other setting that must be  
made for the IB alignment setting to be used?



-koko
___

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: NSTimer memory management

2010-09-26 Thread Jeff Johnson
On Sep 23, 2010, at 6:13 PM, slasktrattena...@gmail.com wrote:

> In this particular case, though, I might just as well get rid of the
> timer altogether and go for NSObject's
> performSelector:afterDelay:/cancelSelector: instead. Jeff's
> enlightening (and frightening!) discussion about implicit retain
> cycles makes me want to stay as far away from NSTimers as possible.

Have you read the documentation for -performSelector:withObject:afterDelay: ? 
"This method sets up a timer to perform the aSelector message on the current 
thread’s run loop." "This method retains the receiver and the anArgument 
parameter until after the selector is performed." ;-)

-Jeff

___

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: NSTimer memory management

2010-09-26 Thread Jeff Johnson
On Sep 24, 2010, at 5:06 AM, Andreas Grosam wrote:

> On Sep 23, 2010, at 3:50 AM, Jeff Johnson wrote:
> 
>> Your object retains the timer, and the timer retains your object. That is 
>> obviously a kind of retain cycle.
> I think, this kind of retain cycle is not a problem by itself when a 
> repeating timer is used.

I don't see how a repeating timer makes a difference. The memory management is 
the same.


>> What can happen is that your app gets into a situation where the only thing 
>> that retains a reference to your object is its own theTimer ivar.
> This can not happen that easily when a repeating timer is used, since there 
> must exist one other object holding a reference to the timer and invoking the 
> -invalidate message. The reference to the timer is most likely an ivar of 
> this other object, or the timer is indirectly retained by the other object 
> (say, as an element of NSArray).

I think you misunderstood what I said. The "one other object" that you're 
talking about seems to be the same as "your object" that I was talking about.

___

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: [ANN] AppKiDo 0.985

2010-09-26 Thread Matt Neuburg
On Sun, 26 Sep 2010 00:50:57 -0400, Andy Lee  said:
>
>
>This should fix the problems at least some folks have been having with the iOS
4.1 SDK. 

Works for me! Thanks - m.

-- 
matt neuburg, phd = m...@tidbits.com, 
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: NAProgressIndicator and key value compliance

2010-09-26 Thread Hrishikesh Murukkathampoondi
Thanks a lot. This works. I looked in the NSProgressIndicator class 
documentation but did not realize there is a separate doc listing all bindings 
in Cocoa.

Thank you
Hrishi
 

On 26-Sep-2010, at 7:57 PM, Dave DeLong wrote:

> I think the keypath you want is "value", not "progress". 
> 
> See the docs for more info: 
> https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSProgressIndicator.html
> 
> Dave
> 
> Sent from my iPhone
> 
> On Sep 26, 2010, at 8:18 AM, Hrishikesh Murukkathampoondi  
> wrote:
> 
>> [pi bind:@"progress" toObject:dls withKeyPath:@"progVar" options:nil]; 

___

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: What would cause my animation's delegate methods to not be called?

2010-09-26 Thread Matt Neuburg
On Sat, 25 Sep 2010 12:46:17 +1000, Gideon King  said:
>I set up the animation to point to my layer as the delegate, and use
addAnimation:forKey: to add the animation

In that order? addAnimation:forKey: must always be the last thing you do to
an animation. Might not be the source of the problem, but since you show no
code, one has to guess... m.

-- 
matt neuburg, phd = m...@tidbits.com, 
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: NAProgressIndicator and key value compliance

2010-09-26 Thread Dave DeLong
I think the keypath you want is "value", not "progress". 

See the docs for more info: 
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSProgressIndicator.html

Dave

Sent from my iPhone

On Sep 26, 2010, at 8:18 AM, Hrishikesh Murukkathampoondi  
wrote:

> [pi bind:@"progress" toObject:dls withKeyPath:@"progVar" options:nil]; 
___

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


NAProgressIndicator and key value compliance

2010-09-26 Thread Hrishikesh Murukkathampoondi
Is NSProgressIndicator not key-value compliant? 


I am trying to bind he progress indicator to a value by doing the following:

[pi bind:@"progress" toObject:dls withKeyPath:@"progVar" options:nil]; 

Where pi is a NSProgressIndicator*

The object dls is my own and it has accessor methods set for progVar.

I get this exception "[ 
valueForUndefinedKey:]: this class is not key value coding-compliant for the 
key progress."

What I am trying to do is to get a NSProgressIndicator to update whenever 
dls.progVar is changed.

Thanks
Hrishi___

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: Cocoa Text System - Temporarily Disabling Layout

2010-09-26 Thread Jonathan Dann

On 25 Sep 2010, at 01:23, Douglas Davidson wrote:

> 
> On Sep 23, 2010, at 7:54 AM, Jonathan Dann wrote:
> 
>> In our app, Kaleidoscope, I have 2 text views side-by-side. In one 
>> configuration the layout of the text in each text view is dependent both on 
>> regions of layout in the "sibling" text view, and the model objects which 
>> represent the the insert, equal and deleted regions of the diff.
>> 
>> The problem I've had to continuously hack around is that NSTextView, in 
>> conjunction with NSLayoutManager, is rather eager to get the text to 
>> re-layout. For example, when I resize the window and need to adjust the 
>> frames of both scroll views, calling -[NSTextView setFrame:] results in the 
>> layout manager invalidating and ensuring layout for the newly visible 
>> character range.
>> 
>> I'd like to know if anybody has had any experience/luck with completely 
>> disabling the automatic layout that the text system does in response to 
>> these changes in state?
> 
> You can look at the source to TextEdit for an example of removing the layout 
> manager(s) from the text storage and then re-adding them, to prevent layout 
> from occurring for a certain period.  This would probably not be appropriate 
> if you want to retain any layout information across this transition, but if 
> all the text needs to be laid out again anyway, it could be useful.
> 
> Douglas Davidson

Thanks Douglas,

This sounds really promising, I'll have a go this week :)

I really appreciate your input.

Jonathan

(Reposted as I forgot to hit reply-all, 
sorry.)___

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: Cocoa Text System - Temporarily Disabling Layout

2010-09-26 Thread Jonathan Dann

On 24 Sep 2010, at 19:59, Martin Wierschin wrote:

> when I resize the window and need to adjust the frames of both scroll 
> views, calling -[NSTextView setFrame:] results in the layout manager 
> invalidating and ensuring layout for the newly visible character range.
>>> 
>>> Why not just turn off text view width/height tracking for the container 
>>> during the resize? That should let the layout manager use the existing 
>>> layout information (ie: for the stale container size).
>> 
>> Because that's just moving the problem further down the line. When I finally 
>> update the text container size for the first text view it will begin to 
>> layout before I've reached the next line of my code where I can fix the size 
>> of the second view.
> 
> My next suggestion would be to subclass NSLayoutManager and override methods 
> that handle invalidation, eg:
> 
>   - (void) textContainerChangedGeometry:(NSTextContainer*)tc ;
>   - (void) invalidateLayoutForCharacterRange:(NSRange)charRng 
> isSoft:(BOOL)isSoft actualCharacterRange:(NSRange*)charRngPtr ;
>   - (void) invalidateLayoutForCharacterRange:(NSRange)charRng 
> actualCharacterRange:(NSRange*)charRngPtr ;
> 
> When your resize starts, set some flag on your subclass that makes all those 
> methods no-ops. When you've finished resizing both text systems, clear your 
> flag and re-invalidate as necessary.

I'll take another look at this, I seem to remember finding some layout 
backtrace that bypassed these, but it's been a long time so I'm probably 
mistaken.

> But really, I might ask you why your own code is so delicate that it needs 
> both layout systems to be in some perfectly matched state at all times. 
> Surely your code could have a flag that tells it layout is not yet synced up, 
> and ancillary tasks should be avoided/delayed until a stable state is 
> established.

Always a good question. In Kaleidoscope (one way) we display the diff between 
two text views by creating gaps (by offsetting the proposed line fragment rects 
for specific lines) in the other text view. For example, a deleted line would 
cause a gap in the text view on the right, and an inserted line causes a a gap 
in the text view on the left. The equal lines are then positioned at the same 
y-ordinate in each text view. This requires (when considering wrapped text) the 
text views to be the same width. When resizing, the I have to account for odd 
or even window widths (not in itself a problem) but also support the cases 
where the text views are scrolled to the top such that they layout their 
strings while resizing, and when the text system delays relayout (when scrolled 
far down) until the views aren't resizing any more. Therefore to layout out 
line x in the left text view all lines above x in the right text view also need 
to be laid out so I can know whether, and how much, to increase the y-origin of 
line x by.

What will make this easier is to have, as you rightly suggest some flag so I 
can better control when to/not to layout. The problem, since the text system 
tries to layout upon resizing the text view in a lot of cases, is finding all 
the right places to put this flag.

> 
>>> The other "state change" you explicitly touch upon is editing the text. If 
>>> you bracket all your changes to the text storage with begin/end editing 
>>> calls, you shouldn't trigger layout until all your changes are finished 
>>> (unless you're also inadvertently triggering layout in other ways).
>> 
>> I'll see how that fits in with setting the 2 strings that are dependent on 
>> each other. It may be a nice workaround.
> 
> Just be careful that you don't trigger layout while the text storage has an 
> edit open, eg:
> 
>   [textStorage beginEditing];
>   [textStorage deleteCharactersInRange:someRange];
>   [layoutManager ensureLayoutForCharacterRange:NSMakeRange(0, 
> [textStorage length])];
>   [textStorage endEditing];
> 
> The layout system isn't tolerant of that. It used to just throw out-of-bounds 
> exceptions, though now it seems to give you exceptions with nice explanations 
> of what you've done wrong.

That's a good one to keep an eye out for.

Thank you very much. I really appreciate having some fresh eyes on the problem.

Jonathan

___

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: Cocoa Text System - Temporarily Disabling Layout

2010-09-26 Thread Jonathan Dann

On 24 Sep 2010, at 18:13, Ross Carter wrote:

> 
>> Yeah I have line numbers views set up in all of this too, for which I have 
>> to set the width before I set the strings of the text views so you don't see 
>> the views resizing on first load if the line numbers aren't wide enough to 
>> accommodate the number of lines in the new string. Resizing the line numbers 
>> shrinks the available width for the text views and then everything lays out 
>> again.
> 
> You might want to take a look at the WWDC 2010 session that Aki gave on Cocoa 
> text. He showed how to do line numbering by subclassing NSGlyphGenerator.

Thanks Ross. Implementing the line numbers isn't an issue per se, but another 
way of implementing them may be useful to me anyway.

Much appreciated,

Jonathan___

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


Get an absolute screen pos of a text cursor in another Carbon application from Cocoa app

2010-09-26 Thread eveningnick eveningnick
Hello!
Is it possible to somehow determine the text caret's absolute screen
position of a Carbon application?
(I've sent it to carbon mailing list, but seems like no one is
interested in carbon development anymore)

What am i trying to do is to display a popup list window near the text
cursor in Microsoft Word (from my own process) - like it is done in
XCode (or Visual studio, or Delphi) as a dropdown code suggestion
menu.
I can't do it by the means provided by Word (Word supports only
getting cursor position relatively to the left-top page corner (it can
be done using AppleScript command), but i've no possibility to
determine where that page corner is located - unfortunately page is
not a separate accessibility object). Maybe it can be done somehow
using "under-the-hood" API?

Or perhaps someone knows how could I get that current page's left-top
corner coordinates? That would solve problem (though i doubt there's
such a possibility)
Thanks a lot for any suggestion!

George
___

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