Re: Two controllers in a window, how do I get one to run a function in another?

2009-08-31 Thread BareFeet
iles without it. I did it anyway. In your code, you can now do things like this, from your controller: NSString* file = [the_document fileString]; the_document is showing as value nil. It doesn't seem to be linked to the instance of MyDocument. Am I missing something? Thanks for all

Re: Two controllers in a window, how do I get one to run a function in another?

2009-08-31 Thread BareFeet
ass set to MyController. IB will display the outlets "the_document" and "the_controller" and then it's up to you to connect them. Yes, I've done that, control dragged from MyController to File's Owner and selected the_document. For simplicity, I

Re: Two controllers in a window, how do I get one to run a function in another?

2009-08-31 Thread BareFeet
Hi again Graham and anyone else interested, Yes, I've done that, control dragged from MyController to File's Owner and selected the_document. For simplicity, I'm just creating the_document in MyController (I've no need for MyDocument to refer to the_controller). I still get nil for the_do

Re: Two controllers in a window, how do I get one to run a function in another?

2009-09-01 Thread BareFeet
wledge (accessing one object's ivars or methods from another in the same nib). I had seen the IBOutlet approach mentioned in forums, but nothing really laid it out. Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Binding table columns that change at runtime

2009-09-03 Thread BareFeet
ppreciated. Thanks, Tom BareFeet ___ 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 Subscrip

Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet
troller (an NSTreeController). I have a dataRowsArray accessor method setup, so the correct array loads. If the table columns are already in place (such as by me manually running the code above), the data displays perfectly. But I can't see how to trigger my code above (that creat

Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet
On 05/09/2009, at 3:16 AM, Sean McBride wrote: On 9/4/09 9:41 AM, BareFeet said: I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using Core

Re: Binding table columns that change at runtime

2009-09-06 Thread BareFeet
array of NSTableColumns used by an NSTableView to some array in the model data. Probably a bit beyond me at the moment. Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

NSController's class accessing NSDocument methods

2009-09-07 Thread BareFeet
NSString* fileString = @"/Users/tom/Documents/MyFile.sqlitedb"; NSString* selectedEntityName = [self name]; NSMutableArray* dataRowsArray = [MyGenerator dataRowsGivenFilePath:fileString entityName:selectedEntityName];

Re: NSController's class accessing NSDocument methods

2009-09-09 Thread BareFeet
Name = [self name]; NSMutableArray* dataRowsArray = [MyGenerator dataRowsGivenFilePath:fileString entityName:selectedEntityName]; return dataRowsArray; } Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Intercepting user changes to table cells using bindings

2009-09-09 Thread BareFeet
Is there a built in way to extract the column name (same at the dictionary key), or should I just parse out based on the delimiting "." and hope there are no "." in the name? Or is there a better way altogether to interc

Re: Passing variables between .m files

2009-09-10 Thread BareFeet
[linkToFile2 myVariable]; Hope this helps you as much as Graham helped me. If not, flip back to his answers to my question about a week ago. Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Custom NSActionCell subclass + table column binding

2009-09-10 Thread BareFeet
se changes. I hope this helps. If ou need more detail, I'll try to follow up. Tom BareFeet ___ 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

NSCell setControlSize:NSSmallControlSize doesn't show change

2009-09-13 Thread BareFeet
} } Thanks, Tom BareFeet ___ 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 you

Re: Filtering a table view using NSSearchField

2009-09-15 Thread BareFeet
e search field content to a filter key path? Thanks, Tom BareFeet ___ 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.c

NSArrayController addObject or insertObject:atArrangedObjectIndex:

2009-09-22 Thread BareFeet
se tell me what I'm doing wrong? Thanks, Tom BareFeet ___ 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.co

Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:

2009-09-22 Thread BareFeet
array, add the extra object, then write the whole array back to the instance variable? I thought it would be more efficient than that. Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: reading (parsing) CSV (or Excel) data

2009-10-01 Thread BareFeet
fy types, just strings, so any interpretation you make on types is after the actual CSV import. I found this method (the one under the heading "General CSV"), which works fine, caters for delimiters within quotes, escaped quotes etc: http://macresearch.org/cocoa-scientists-

Binding hidden attribute

2009-10-08 Thread BareFeet
in the log: Cannot create attributed string from object of class NSNull What does this mean? Do I have the correct class (BOOL) returned by my accessor? My other bindings to this same model and controller work fine. Thanks, Tom BareFeet ___ Coco

Re: Binding to values which aren't there

2009-10-11 Thread BareFeet
the parent Person, this seems logical to me and, as you said, makes the solution simple. Tom BareFeet ___ 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

Re: Binding "hidden" attribute

2009-10-11 Thread BareFeet
OK, let me put this another way: Has anyone successfully bound the "hidden" attribute of an Interface object, so that it hides and shows when the ivar changes? If so, how? Thanks, Tom BareFeet ---- From: BareFeet Date: 9 October 2009 12:18:38 AM AEDT To: Cocoa Dev Subject: Bind

Re: Binding "hidden" attribute

2009-10-12 Thread BareFeet
t this as a different question. Thank you greatly for your response. It helped me realise my faulty assumptions and better identify the problems. Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Hiding tab view items

2009-10-12 Thread BareFeet
x27;t hide the tab view item itself, so is misleading to the user (ie they can click on it, only to see a blank view). I tried using a segmented control, instead, using bindings to link it to the tab view (now tabless). But segmented control cells also seem to lack a "hidden"

Re: Hiding tab view items

2009-10-18 Thread BareFeet
just leaving out that cell in the rebuild. b) Add/remove tab items on demand That sounds similar to above. However, I feel more comfortable rebuilding just a segmented cell than trying to delete and rebuild a whole view. Seems messy eithe

Re: Hiding tab view items

2009-10-21 Thread BareFeet
second tab view just to switch between different segment controls. Any other insights? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: Hiding tab view items

2009-10-21 Thread BareFeet
hanks, Tom BareFeet ___ 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:

Test for debug vs release

2010-03-20 Thread BareFeet
ow can I detect at runtime? Thanks, Tom BareFeet ___ 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/Unsubscr

Global in NSApplication

2010-01-26 Thread BareFeet
variable? I want to be able to call it from any class in my app, such as: [[NSApp debug] myMethod]; Please reply to the list. Thanks, Tom BareFeet -- Comparison of SQLite GUI tools: http://www.tandb.com.au/sqlite/compare/?ml ___ Cocoa-dev mai

Re: Global in NSApplication

2010-01-26 Thread BareFeet
Yes, I'm familiar with categories, but didn't mention it because it's so similar to subclassing. I just wanted to check if there's a simpler way. I guess not. Thanks, Tom BareFeet Sent from my iPhone On 27/01/2010, at 1:17 PM, Murat Konar wrote: Read up on categ

Re: Global in NSApplication

2010-01-27 Thread BareFeet
elf alloc] init]; > >return s_debug; > } > > > Then whenever you need the debug object, just call: > > [Debug sharedDebug]; > > The first time it's needed it will be created. Thanks Graham and Jens. That does appear to be a simpler

Re: Hiding tab view items

2010-01-28 Thread BareFeet
m atIndex:3]; } else if (!tabViewItemShouldShow && tabViewItemDoesShow) { [tabView removeTabViewItem:retainedTabViewItem]; } } // other code omitted @end From: BareFeet Date: 21 October 2009 6:02:21 PM AEDT To: Cocoa Dev Subject: Re: Hid

Node hierarchy with subclasses

2010-01-28 Thread BareFeet
o be a common UI layout to have a Node tree on the left and various UI elements on the right appearing according to what Node is selected. But how can I do this using bindings? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Binding to an accessor that is only valid for subclass (was: Node hierarchy with subclasses)

2010-02-01 Thread BareFeet
lects a TopClass item, it throws an exception. How can I prevent this? Thanks, Tom BareFeet ___ 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-de

Re: Binding to an accessor that is only valid for subclass

2010-02-02 Thread BareFeet
y.' that raised inside Carbon event dispatch So I added a routine to my code for the SubClass: - (NSString*) subValue { return [parsedDictionary objectForKey:@"subValue"]; } and changed the bindings in IB for the text field to simply have the model key path: subValue T

NSForegroundColorAttributeName without AppKit

2010-02-19 Thread BareFeet
rnative to NSForegroundColorAttributeName I can use without needing AppKit? Thanks, Tom BareFeet ___ 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-

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread BareFeet
n AppKit. > > If you log the actual value of that constant, it's simply @"NSColor". Unfortunately it seems that using the @"NSColor" key as part of an NSAttributedString also requires AppKit. Put another way, I can't see any way to draw multi-colored text in

Re: NSString and regular expressions

2009-07-29 Thread BareFeet
the framework or the AGRegex files (and PCRE folder) to our own project? I've tried both and can't get it to work. I can't find any instructions in the documentation on adding it correctly to your own project. Thanks, Tom BareFeet ___

Re: NSString and regular expressions

2009-07-30 Thread BareFeet
27;=', ',', ';', 'asm' or '__attribute__' before 'ucp_table' Can you please clue me in as to how to get AGRegex to work? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSString and regular expressions

2009-07-30 Thread BareFeet
as anyone discovered any other issues (or had successes) dealing with ICU syntax in RegexKitLite and RegexKitLite in general? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: NSString and regular expressions

2009-08-03 Thread BareFeet
Before I go ahead and port this same method across, is there any built in functionality in Cocoa that will facilitate this (or part of it) directly? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

AGRegex (was: NSString and regular expressions)

2009-08-03 Thread BareFeet
Hi all, Has anyone got procedure for getting AGRegex to work in their project? Thanks, Tom BareFeet From: BareFeet Date: 31 July 2009 9:03:20 AM AEST To: Cocoa Dev Subject: Re: NSString and regular expressions Hi Rob, I personally just compile the files directly into my project

Re: Syntax Coloring?

2009-08-23 Thread BareFeet
Hi Keita, Hello, I'm writing a code editor and so far, i've been using Flex for regex-matching the whole document every time the text is changed and coloring appropriately... How are you doing this? How did you incorporate Flex or regex-matching? I approached it using regex to parse the quote

Re: Two controllers in a window, how do I get one to run a function in another?

2009-08-30 Thread BareFeet
indings are only for linking view objects to model objects, yes? Thanks, Tom BareFeet ___ 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-adm