Re: Vertical alignment in NSTextView

2011-05-04 Thread Rimas M.
Hello Andrew, Nope - that will not going to work, because container inset is expressed as a size and inset is set equally from both sizes: inset.width for left and right "margins", inset.height for top and bottom "margins". But overwriting NSTextView's -(NSPoint)textContainerOrigin might do the t

Re: Interruption of NSTreeController's selectionIndexPaths updating after mouseDown

2011-05-04 Thread Quincey Morris
On Apr 28, 2011, at 07:46, Kirill K wrote: > the thread that adds nodes to TreeController interrupts the sequence > (I guess) called by mouseDown event so insertObject: > atArrangedObjectIndexPath: is called before > thensetSelectionIndexPaths:. If you guess the sequence of events when it fails,

Re: onSocketDidDisconnect in CocoaAsyncSocket

2011-05-04 Thread Bing Li
Dear Patrick, Thanks so much for your reply! I ever believed that TCP protocols handle everything on the connection. Only UDP needs a lot of work to manage the connection. According to your description, it is not like that? I have not worked on a so low level network programming. Your email help

Best strategy of handling many separated text lines

2011-05-04 Thread Дмитрий Николаев
Hello! Does using many NSTextView is good strategy for several separated text lines ? I need draw text right-aligned and calculate width for each line. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Best strategy of handling many separated text lines

2011-05-04 Thread Graham Cox
Hard to say from the vague description, but I'd say that having one text view per line is probably a bad idea. You could have one text view, set the text right-align (NSParagraphStyle on NSAttributesString/NSTextStorage) then set the line spacing to space the lines how you want, but on the othe

Re: block animation

2011-05-04 Thread Brian Bruinewoud
Ignore my parallel issue with loading views - they are not affecting this. I've now made a simple project which exhibits this animation issue. I create a view based ipad app Add a toolbar to the top and add two buttons to the main view: "Animate" and "Nothing" The button that comes with the toolb

Re: image rotation

2011-05-04 Thread John C. Randolph
Several years ago, I wrote this sample code project: http://developer.apple.com/samplecode/Transformed_Image/index.html It demonstrates the use of NSAffineTransform to rotate, scale, and shear images. -jcr On Apr 29, 2011, at 7:48 AM, Amy Heavey wrote: > Hi, > > I'm trying to generate a new

Converting a large project to GC

2011-05-04 Thread Joao Manuel Da Silva Neves
Apple's documentation states: "The process of migrating a large project that uses reference counting can be difficult and error-prone—some patterns that work correctly with manual memory management will be incorrect after translation. In general, it is recommended that you use garbage collection

L-shaped custom view in Cocoa?

2011-05-04 Thread Vyacheslav Karamov
Hi All! I need to make custom view in the form of letter L. How to do it? Thank you in advance, Vyacheslav. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

iOS nib weirdness...

2011-05-04 Thread Steve Christensen
I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller and the controller's nib, plus I filled in some basic functionality in the view controller. Since it's relevant, the controller's IBO

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Ken Thomases
On May 4, 2011, at 8:41 AM, Vyacheslav Karamov wrote: > I need to make custom view in the form of letter L. > How to do it? You don't need to. You may think you do, but you don't. And you can't. Just make a regular rectangular view and only draw in the parts you want to. Regards, Ken __

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Steve Christensen
All views are rectangular in shape. You can restrict drawing and responding to events to an L-shaped area, but the view itself will still be a rectangle. On May 4, 2011, at 6:41 AM, Vyacheslav Karamov wrote: > I need to make custom view in the form of letter L. How to do it? __

Re: iOS nib weirdness...

2011-05-04 Thread Alexander Spohr
Is your viewController a subclass of UITableViewController? Then your nib is not loaded. UITableViewController is broken. It does not keep the contract of initWithNibName:bundle: atze Am 04.05.2011 um 16:00 schrieb Steve Christensen: > I'm working on an app that uses a tab bar. I crea

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
Yes, the table view is typed as MyTableView in the xib. On May 4, 2011, at 7:21 AM, Evadne Wu wrote: > Just a wild thought, but could you probably look into the (offending) XIB and > make sure that the table view is of a custom class? > > -ev > > On May 4, 2011, at 22:00, Steve Christensen wr

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
No, the view controller is a subclass of UIViewController and is being initialized via -initWithCoder:. On May 4, 2011, at 7:47 AM, Alexander Spohr wrote: > Is your viewController a subclass of UITableViewController? > Then your nib is not loaded. > > UITableViewController is broken. It does n

Re: iOS nib weirdness...

2011-05-04 Thread Fritz Anderson
On 4 May 2011, at 9:00 AM, Steve Christensen wrote: > IBOutlet MyTableView* _resultsTable; > IBOutlet UIActivityIndicatorView* _searchActivityIndicator; > IBOutlet UISearchBar* _searchBar; > > When I ran the app and used the new view's UI, I got an unexpected > "unrecognized selector" exception

Request for beta testers/feedback for programmer utility [please reply off-list]

2011-05-04 Thread Jim Thomason
All, I've written a small-ish mostly background clipboard/macro type utility and was wondering if anyone would be interested in helping me beta test/provide feedback. It's simply a way to store and insert frequently used snippets of text in a very fast manner. I wanted something to pop in, give m

Re: iOS nib weirdness...

2011-05-04 Thread glenn andreas
On May 4, 2011, at 9:00 AM, Steve Christensen wrote: > I'm working on an app that uses a tab bar. I created a new nib to set up a > view+controller and added a new tab item to the main nib that references the > controller and the controller's nib, plus I filled in some basic > functionality in

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:02 AM, Fritz Anderson wrote: > On 4 May 2011, at 9:00 AM, Steve Christensen wrote: > >> IBOutlet MyTableView* _resultsTable; >> IBOutlet UIActivityIndicatorView* _searchActivityIndicator; >> IBOutlet UISearchBar* _searchBar; >> >> When I ran the app and used the new view's U

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Vyacheslav Karamov
Yes, I understand, I meant want to know how to restrict drawing and responding to events to L-shaped area. 04-May-11 17:38, Steve Christensen пишет: All views are rectangular in shape. You can restrict drawing and responding to events to an L-shaped area, but the view itself will still be a re

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:17 AM, glenn andreas wrote: > On May 4, 2011, at 9:00 AM, Steve Christensen wrote: > >> I'm working on an app that uses a tab bar. I created a new nib to set up a >> view+controller and added a new tab item to the main nib that references the >> controller and the controlle

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Ken Thomases
On May 4, 2011, at 10:21 AM, Vyacheslav Karamov wrote: > Yes, I understand, I meant want to know how to restrict drawing and > responding to events to L-shaped area. You are responsible for writing the drawing code and the code which responds to events. In your drawing code, just don't draw in

Nested NSCollectionView scroll weirdness

2011-05-04 Thread Half Activist
Hello all, I'm having kind of troubles with embedded collection views. I'm displaying a list of items vertically, each of these items may have subitems i list in another collection view, this time horizontally. Everything fine so far, the NSCollectionViewItems get loaded w

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Steve Christensen
You could either use a path or a pair of rectangles to clip drawing and test for events such as a mouseDown or tap. You'll need to calculate the dimensions based on the current size of the view. On May 4, 2011, at 8:21 AM, Vyacheslav Karamov wrote: > Yes, I understand, I meant want to know how

NSClassFormString returning nil.

2011-05-04 Thread Gustavo Pizano
Hello all. Im sorry if this isn't the right place to post this, I wasn't sure if xcode list obj-c list or this one, so I decided this one. I have created a Static Library which makes use of another library (cocos2d to be more specific), then I created a project that will use that library i cre

Re: Enable a button once text is added to textfield

2011-05-04 Thread Peter Hudson
In IB set the button to be disabled. Set yourself up a delegate for the text field and let the delegate respond to -(void)controlTextDidChange:(NSNotification *)aNotification It is also convenient if the delegate has a pointer to the button as well. When the delegate receives this notificat

Re: NSClassFormString returning nil.

2011-05-04 Thread Quincey Morris
On May 4, 2011, at 09:12, Gustavo Pizano wrote: > linker problems Vagueness like this makes it hard to help you. Sometimes the actual error messages are important in deciding where to look for a solution. > What can I do? I'd very seriously suggest you don't use a static library at all. It r

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Quincey Morris
On May 4, 2011, at 08:38, Ken Thomases wrote: > For events which have location associated with them, you should check the > location and just invoke super for any which fall outside of the L shape. There's also -[NSView hitTest] for customizing the behavior at a slightly higher lever than redir

Re: NSClassFormString returning nil.

2011-05-04 Thread Kyle Sluder
On Wed, May 4, 2011 at 10:11 AM, Quincey Morris wrote: > I'd very seriously suggest you don't use a static library at all. It really > doesn't provide you with any benefits, so you may as well include the source > code directly instead. Static ObjC libraries are still very useful on iOS, becaus

Re: NSClassFormString returning nil.

2011-05-04 Thread Gustavo Pizano
Quincey Hello and thx for the reply I need to use the a library because its a iOS project so no framework, and also because I will be reusing the code in the lib for many other apps not just this one Im making.. So right now I have the following set up: On my Library Project: Note: By nothin

Re: NSClassFormString returning nil.

2011-05-04 Thread Gustavo Pizano
I found why the file not found.. I had the header path wrong.. now its ok.. im gonna try to see if the NSClassFromString works or what... On May 4, 2011, at 7:31 PM, Gustavo Pizano wrote: > Quincey Hello and thx for the reply > > I need to use the a library because its a iOS project so no fr

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Bertil Holmberg
You can create it from two rectangular views, perhaps rotating the one, depending on your needs. Regards, Bertil___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: NSClassFormString returning nil.

2011-05-04 Thread Gustavo Pizano
Hello again, im really wondering if this is the right list, but anyway if you don't mind please dont kill me. :P If I take out the linker flags it compiles bu the NSClassFromString doesn't work if I put the flags -ObjC and -all_load the I get this problem: ld: duplicate symbol _OBJC_IVAR_$_C

Re: NSClassFormString returning nil.

2011-05-04 Thread Gustavo Pizano
Ok I solved it,, I didn't need to link again cocos2d into the final app... then all went ok the NSClassFromString now works :D:D:D On May 4, 2011, at 7:41 PM, Gustavo Pizano wrote: > Hello again, im really wondering if this is the right list, but anyway if you > don't mind please dont kill

Re: Converting a large project to GC

2011-05-04 Thread Quincey Morris
On May 4, 2011, at 06:03, Joao Manuel Da Silva Neves wrote: > Apple's documentation states: "The process of migrating a large project that > uses reference counting can be difficult and error-prone—some patterns that > work correctly with manual memory management will be incorrect after > trans

Re: NSClassFormString returning nil.

2011-05-04 Thread Quincey Morris
On May 4, 2011, at 10:19, Kyle Sluder wrote: > Static ObjC libraries are still very useful on iOS, because you can't > load code dynamically. It's just so much easier and faster to split > our apps up into seven or eight static libraries rather than our old > method of compiling all the source int

Re: Converting a large project to GC

2011-05-04 Thread Greg Parker
On May 4, 2011, at 6:03 AM, Joao Manuel Da Silva Neves wrote: > Apple's documentation states: "The process of migrating a large project that > uses reference counting can be difficult and error-prone—some patterns that > work correctly with manual memory management will be incorrect after > tran

RE: L-shaped custom view in Cocoa?

2011-05-04 Thread Shawn Bakhtiar
Actually you only need one view. Subclass it, and over ride the draw method [[NSColor clearColor] set] NSFillRect(...) <- the size you want to clear out. If you want the cut out to be more sofisticated, you can use NSBeizerPath and fill it with the clear color. You will not receive any si

[NSMenu _enableItem} crash

2011-05-04 Thread Tony Cate
Reliably: Launch project and get first document window. Close document Main Menu file open second document. Close document Click anywhere on the main menu and the project crashes. Most of the time the stack ends with: 0 objc_msgSend 1 stub helpers 2 [NSMenu _enableItem] Occasionally it consist

Re: [NSMenu _enableItem} crash

2011-05-04 Thread Martin Wierschin
> Most of the time the stack ends with: > > 0 objc_msgSend > 1 stub helpers > 2 [NSMenu _enableItem] > > Occasionally it consists of > 0 objc_msgSend > 1 ??? (or a reasonable facsimile) > > After reading through some threads on this I thought my validation stuff may > be an issue Likely menu v

Re: [NSMenu _enableItem} crash

2011-05-04 Thread Fritz Anderson
On 4 May 2011, at 3:36 PM, Tony Cate wrote: > Most of the time the stack ends with: > > 0 objc_msgSend > 1 stub helpers > 2 [NSMenu _enableItem] > > Occasionally it consists of > 0 objc_msgSend > 1 ??? (or a reasonable facsimile) > > After reading through some threads on this I thought my valid

how can I copy from another app?

2011-05-04 Thread Jim Thomason
I know this has been asked a bajillion times before, yet here we are. So it turns out that my simple little applescript to copy in from another app was ineffective. Lots more digging around led me to create this: tell application "Xcode" activate tell application "System Events"

RE: how can I copy from another app?

2011-05-04 Thread Shawn Bakhtiar
I have not been on this list that long to have heard this abajillion times and without knowing what others have said, I can surmise that their replies where no less perplexed with the question "but Why?" The copy and past function is a user interface object, designed to aid in process flow

Re: how can I copy from another app?

2011-05-04 Thread Jim Thomason
> and without knowing what others have said, I can surmise that their replies > where no less perplexed with the question "but Why?" This gloriously ugly hack isn't the correct "why" question - the correct "why" question is "why do I even need to do it?" I want to be able to copy the current sele

update a tableView from a different class

2011-05-04 Thread Martin Batholdy
Hi, I have a singleton class which manages a tableView. In the UI everything works fine. I can delete entries, edit entries and the table gets updated properly. Now I have another class which manages the entries of a dropdown menu. Now when an item of this dropdown menu is getting pressed I wan

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Kyle Sluder
On Wed, May 4, 2011 at 1:09 PM, Shawn Bakhtiar wrote: > Actually you only need one view. Subclass it, and over ride the draw method > > > > [[NSColor clearColor] set] > NSFillRect(...) <- the size you want to clear out. > Don't do this. It doesn't do what you think it does. The window only has o

Re: update a tableView from a different class

2011-05-04 Thread Kyle Sluder
On Wed, May 4, 2011 at 5:52 PM, Martin Batholdy wrote: > I have a singleton class which manages a tableView. > In the UI everything works fine. I can delete entries, edit entries and the > table gets updated properly. How is the table view getting its data. If it's through bindings, I bet it's b

Re: how can I copy from another app?

2011-05-04 Thread Graham Cox
On 05/05/2011, at 10:01 AM, Jim Thomason wrote: > This gloriously ugly hack isn't the correct "why" question - the > correct "why" question is "why do I even need to do it?" No, it is the right "why" question. When something is this hard, then you must clearly be fighting the designed architec

Re: update a tableView from a different class

2011-05-04 Thread Martin Batholdy
On 05.05.2011, at 03:06, Kyle Sluder wrote: > How is the table view getting its data. If it's through bindings, I > bet it's because you're not mutating the array in a KVO-compliant way. Well, I dont use an ArrayController or something like this in the interface builder. and I implemented all

Re: update a tableView from a different class

2011-05-04 Thread Graham Cox
On 05/05/2011, at 10:52 AM, Martin Batholdy wrote: > - (void)updateView { > [content removeObjectAtIndex:1]; > [table reloadData]; > [table deselectAll:self]; > } > > > and when the menuitem is pressed the following is invoked (in a different > class): > > > prefShow = [Pre

Re: update a tableView from a different class

2011-05-04 Thread Martin Batholdy
On 05.05.2011, at 03:35, Graham Cox wrote: > Have you checked to see whether removeObjectAtIndex:1 actually succeeds? If > the index is out of bounds, an exception will be thrown and -reloadData will > never be reached. You can easily check that in the debugger. It looks > suspicious that you

Re: update a tableView from a different class

2011-05-04 Thread Graham Cox
On 05/05/2011, at 11:40 AM, Martin Batholdy wrote: > So [table reloadData]; gets executed but has no effect ... Well, it definitely does have an effect, just not the one that you are assuming. Show the code for your data source. How does the table get its data from ? Set a breakpoint in -tab