UIControllerView demo

2011-12-27 Thread Brian Bruinewoud
Hi, In the WDC 2011 Session 102 on UIControllerView containment, Bruce Nilo implies that the code in the demo will be available. Does anyone know where this is? He doesn't mention the name of the app, I can't find anything that looks right on developer.apple.com and the quick help in XCode does

UIScrollView zooming a rotated view

2011-06-23 Thread Brian Bruinewoud
Hi All, I have a UIScrollView that contains a single UIView. I have a couple of buttons in the toolbar that let me rotate the UIView in 90 degree increments. When the rotation is 0, zooming via the pinch mechanism works fine. When the rotation is 90 or 270, zooming via pinch does nothing. When t

Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)

2011-06-18 Thread Brian Bruinewoud
d the setContentOffset code while I (it seems so far) do not. Regards, Brian. On 19/06/2011, at 13:24 , Matt Neuburg wrote: > > On Jun 18, 2011, at 6:50 PM, Brian Bruinewoud wrote: > >> Actually, that didn't work for me but it did lead me to find a solution. > > Cool

Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)

2011-06-18 Thread Brian Bruinewoud
the content that were off screen. Could you check in your code to see if its the same issue - at least that will suggest some kind of bug in the frameworks/documentation rather than my code :) Thanks, Brian. On 19/06/2011, at 02:05 , Matt Neuburg wrote: > On Sun, 12 Jun 2011 14:30:42 +100

layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)

2011-06-11 Thread Brian Bruinewoud
Hi All, I have an app that consists of a scroll view subclass which contains a single subview. In the scroll view subclass I override layoutSubviews based on Apple sample code (see below). The intention of layoutSubviews is to centre the subview in the scrollview when the subview is smaller tha

Re: An architectural question for iOS app

2011-05-30 Thread Brian Bruinewoud
21:55 , Brian Bruinewoud wrote: > Hi all, > > I'm about to start writing an app (Target is iPad running 4.3 or later) but > I've gotten to a position where I'm not sure of the best way to proceed with > the architecture. I thought I'd better ask now before I

An architectural question for iOS app

2011-05-30 Thread Brian Bruinewoud
Hi all, I'm about to start writing an app (Target is iPad running 4.3 or later) but I've gotten to a position where I'm not sure of the best way to proceed with the architecture. I thought I'd better ask now before I paint myself into a corner. The parts of the app with which I am having troub

Re: Why NSClassFromString(@"CADisplayLink")?

2011-05-11 Thread Brian Bruinewoud
n OpenGL iPhone app, I believe. Thanks for your answers - I'll check the XCode project as soon as I'm able. On 10/05/2011, at 20:34 , Brian Bruinewoud wrote: > Hi All, > > Just curious, why does this work (compiles and runs): > >displayLink = [NSClassFromString(@&qu

Why NSClassFromString(@"CADisplayLink")?

2011-05-10 Thread Brian Bruinewoud
Hi All, Just curious, why does this work (compiles and runs): displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget: tapped selector:@selector(respond:)]; But this doesn't link because the CADisplayLink class is missing: displayLink = [CADisplayLink

Re: block animation

2011-05-06 Thread Brian Bruinewoud
Thanks David, that's led me on the right path - I seem to have two instances of the view controller where there should be one so I'll need to check my NIB wiring, something wrong there. On 06/05/2011, at 01:47 , David Duncan wrote: > On May 4, 2011, at 4:50 AM, Brian Bru

Re: block animation

2011-05-04 Thread Brian Bruinewoud
]; } Full project available on request (33Kb zip) On 04/05/2011, at 01:53 , David Duncan wrote: > On May 3, 2011, at 3:40 AM, Brian Bruinewoud wrote: > >> Hi All, >> >> self.view.alpha is animated but nothing at all happens to drawingVC.view. > > > My guess would b

block animation

2011-05-03 Thread Brian Bruinewoud
Hi All, This animation doesn't code doesn't work properly: - (IBAction) gotClicked: (id) sender { [UIView animateWithDuration: 1.0 delay: 0.0 options: UIViewAnimationOptionCurveEaseIn animations:^{

UIView not loading

2011-05-03 Thread Brian Bruinewoud
Hi All, This has got me annoyingly stumped. What I'm trying to do: In a popover, I have buttons On touching a button, a subview will be created in the main view of the screen (that is, beneath the popover) What's not happening: The view isn't being instantiated For debugging purposes, I've imp

Re: Value Bindings in IB - Where's the documentation?

2010-05-03 Thread Brian Bruinewoud
Thanks, Ken, the CocoaBindingsRef is what I was looking for - now I'll see if I can work it out from there before looking at the other links you sent :) On 02/05/2010, at 20:27 , Ken Thomases wrote: > On May 2, 2010, at 5:14 AM, Brian Bruinewoud wrote: > >> I'm trying

Value Bindings in IB - Where's the documentation?

2010-05-02 Thread Brian Bruinewoud
Hi All, I'm trying to find documentation about what the various bindings in IB actually do. If I look at the documentation for NSArrayController (or any controller) and NSPopUpButton (or any UI control) I don't find what I'm looking for. In general, where is there a description of the various b

Re: iPhone: UITableView with cells of varying heights

2010-01-15 Thread Brian Bruinewoud
Be sure to still have a maximum height for each row. Some RSS feeds (eg. BetaNews.com) contain the entire article rather than just text. Also, some feeds contain images (eg. Online comics and the entire cheese burger network stuff). On 15/01/2010, at 05:16 , Eric E. Dolecki wrote: > Sure thin

Re: NSDate without time portion

2010-01-06 Thread Brian Bruinewoud
Wow. I didn't expect so much conversation from such a 'simple' question. Obviously, not a simple question after all. My iPhone app records events input by the user. The user can then view a list of events with a count for each day on which there was at least one event. I've stuck with the code

NSDate without time portion

2010-01-04 Thread Brian Bruinewoud
Hi All, What's the best way to get an NSDate object for 'today' such that the time is 00:00:00 (or any other constant). I not interested in the time, I only care about the year-month-day, but I do need the the hours-minutes-seconds to be the same on all dates so that I can compare the dates. C

Re: Creating CoreData classes

2009-12-29 Thread Brian Bruinewoud
Ah, that seems perfect (haven't tried it yet), but it claims to do what I want. Thanks. On 28/12/2009, at 17:51 , Rob Keniger wrote: > On 28/12/2009, at 2:52 PM, Brian Bruinewoud wrote: >> But I'm looking for something more like this: >> >>

Creating CoreData classes

2009-12-27 Thread Brian Bruinewoud
If I've generated core data classes from my model, how do I use them to create new values? Currently I'm doing this: CDClass *cdObject = (CDClass *)[ NSEntityDescription insertNewObjectForEntityForName: @"CDClass" inManagedObjectContext: context ]; But I'm looking for something more like th

[iPhone] Refreshing a UITableView in a UINavigationController...

2009-12-26 Thread Brian Bruinewoud
Hi all, I have a navigation controller based app consisting mostly of table views. Table View 1 moves you to Table View 2 when you select a row. When you return from Table View 2, Table View 1 needs to be updated to show the changes made. There is no fetchedResultsController for Table View 1. I k

Re: Compile errors with Objective-C++ properties as STL/TR1 smart pointers

2009-12-26 Thread Brian Bruinewoud
It's probably just a parsing thing, have you tried: > ::NSLog(@"The value's amount is %d", (valueUser.value)->GetAmount()); ? On 27/12/2009, at 11:20 , Tron Thomas wrote: > I'm running into a issue using STL/TR1 smart pointers with Objective-C++ > properties that I think is a bug, and I wanted

Re: [Solved] IPhone- Datasensitive bug from CoreData...

2009-12-25 Thread Brian Bruinewoud
he current view). Reading about the navigation controller now... On 26/12/2009, at 01:29 , Kyle Sluder wrote: > On Dec 25, 2009, at 12:48 AM, Brian Bruinewoud wrote: > >> *** -[NSCFType controllerDidChangeContent:]: unrecognized selector sent to >> instance 0x3a11d70 > &

Re: IPhone- Datasensitive bug from CoreData...

2009-12-24 Thread Brian Bruinewoud
e bug is triggered when: 1. Adding to the same user 2. In the same session (ie, without quiting the app in between) 3. A new deed that has a score where sign(new-score) != sign(previous-score) :-( Until tomorrow... On 25/12/2009, at 16:48 , Brian Bruinewoud wrote: > Oh, sorry, here is the me

Re: IPhone- Datasensitive bug from CoreData...

2009-12-24 Thread Brian Bruinewoud
sent to instance 0x3a11d70 with userInfo (null) *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFType controllerDidChangeContent:]: unrecognized selector sent to instance 0x3a11d70' Stack: ( ... On 25/12/2009, at 16:40 , Brian Bruin

IPhone- Datasensitive bug from CoreData...

2009-12-24 Thread Brian Bruinewoud
This has me totally stumped. I have an app that contains (currently) three Entities: Person Deed; and DeedDoneByPerson Deed is effectively a template object. I'll probably re-do the object model but I want to understand what's going on with this bug first. Deeds can be good or not and have a de

Re: Is there a warning for this?

2009-12-24 Thread Brian Bruinewoud
On 25/12/2009, at 01:20 , Kyle Sluder wrote: > On Dec 24, 2009, at 3:26 AM, Brian Bruinewoud wrote: > >> Is there some way to turn on a warning saying 'you are directly accessing an >> ivar where a (non-trivial) getter/setter exists'? > > I'm assuming

Re: [textView:shouldChangeTextInRanges:replacementStrings:] When does this type of event occur?

2009-12-24 Thread Brian Bruinewoud
How about "replace all"? I haven't done any text programming so I'm not sure how much functionality the API offers. So this is purely a guess :) On 24/12/2009, at 19:39 , Iceberg-Dev wrote: > > On Dec 23, 2009, at 10:58 PM, Dave DeLong wrote: > >> In many apps, you can hold down the option ke

Is there a warning for this?

2009-12-24 Thread Brian Bruinewoud
All, I had this code: [[fetchedResultsController sections] count] Which always returned zero even thought sglite showed entries in the table. When I put a break point on the getter, nothing happened. Amazingly, it dawned on me pretty quickly that I needed this: [[self.fetchedRe

Re: CoreData SQL tracing in the iPhone Simulator...

2009-09-23 Thread Brian Bruinewoud
:44 , Sean McBride wrote: On 9/22/09 9:23 PM, Brian Bruinewoud said: Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app runn

CoreData SQL tracing...

2009-09-22 Thread Brian Bruinewoud
Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app running in the simulator. Thanks, Brian. __

Re: [iPhone 3.0] Flipping view doesn't play nice with Navigation and Tab bars.

2009-09-01 Thread Brian Bruinewoud
ller.delegate = self; controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; } On 01/09/2009, at 20:07 , Brian Bruinewoud wrote: I have a Navigation Controller based app. In one of the view that

[iPhone 3.0] Flipping view doesn't play nice with Navigation and Tab bars.

2009-09-01 Thread Brian Bruinewoud
I have a Navigation Controller based app. In one of the view that can be navigated to, I have a tab bar and an (i) for information. Tapping the (i) flips the view to show the settings on the 'back'. All standard navigation methods and all more-or-less working EXCEPT, that the back-side view

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-26 Thread Brian Bruinewoud
Ok, apologies to Georg. That does work. My fingers still type 'NS' by default sometimes, it seems :( Thanks all. On 25/08/2009, at 23:02 , Andy Lee wrote: On Aug 25, 2009, at 8:28 AM, Brian Bruinewoud wrote: On 25/08/2009, at 20:42 , Georg C. Brückmann wrote: On 25.08.2009, at 12

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-25 Thread Brian Bruinewoud
On 25/08/2009, at 20:42 , Georg C. Brückmann wrote: On 25.08.2009, at 12:30, Brian Bruinewoud wrote: I have a simple view that contains a UITextField and a UIButton. The user will most often want to type text and ignore the button. Is there some way I can make the keyboard appear

[IPhone 3.0] How do I make a UITextField the first responder?

2009-08-25 Thread Brian Bruinewoud
All, I have a simple view that contains a UITextField and a UIButton. The user will most often want to type text and ignore the button. Is there some way I can make the keyboard appear immediately that view is shown? I can't find anything in IB and reading about UITextField, UIView, UIWin

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-19 Thread Brian Bruinewoud
Resending because I never saw this appear in the list. On 10/08/2009, at 21:51 , Brian Bruinewoud wrote: I found the motivating example for this thread. Files are: http://media.pragprog.com/titles/amiphd/code/FileIO/FilesystemExplorer/Classes/DirectoryViewController.m http

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-10 Thread Brian Bruinewoud
I found the motivating example for this thread. Files are: http://media.pragprog.com/titles/amiphd/code/FileIO/FilesystemExplorer/Classes/DirectoryViewController.m http://media.pragprog.com/titles/amiphd/code/FileIO/FilesystemExplorer/Classes/FileOverviewViewController.m For this book: http://bo

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-10 Thread Brian Bruinewoud
All, Thanks for the responses so far. I'm getting there. If I may quote Henry McGilton (Boulevardier) out of order: On 10/08/2009, at 15:02 , Henry McGilton (Boulevardier) wrote: Similar situation with the call to makeKeyAndVisible - I've seen samples of applicationDidFinishLaunching where m

Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-08 Thread Brian Bruinewoud
se the new view should call on methods/properties of its File's Owner to discover what it needs to display. I haven't tried this so I don't know if its a workable solution, but it seems like it could be. Thanks, Brian. On 08/08/2009, at 23:35 , Luke the Hiesterman wrote: O

[iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.

2009-08-08 Thread Brian Bruinewoud
Hi, I'm a little confused about how this code works: MyController *myController = [[ myController alloc ] initWithNibName: @"myView" bundle: nil ]; [[ self navigationController ] pushViewController: myController animated: YES ]; myController.myProperty = itsValue;

Creating a 'complex' ArrayController based view.

2009-06-24 Thread Brian Bruinewoud
All, I'm ok with creating a special view for a simple value - that is, a single item. I'm not sure what the best way is to design a view that displays items from an array. For the single item view, the view is based on three values that are bound to the view. (eg: width, height, colour) F

Re: Warnings suggest compiler confusion between 32 and 64 bit code.

2009-06-23 Thread Brian Bruinewoud
Thanks to all the responses. -Wconversion made the warnings go away. Hopefully that wont come back and bite me later... On 23/06/2009, at 15:11 , Kyle Sluder wrote: On Mon, Jun 22, 2009 at 9:01 PM, Michael Ash wrote: I think you mean -Wshorten-64-to-32. -Wconversion warns you every time a f

Warnings suggest compiler confusion between 32 and 64 bit code.

2009-06-22 Thread Brian Bruinewoud
Hi all, In a custom view I have the following code (simplified for the purpose of this post): - (void)drawRect:(NSRect)rect { // Drawing code here. NSRect bounds = [ self bounds ]; NSLog( @"size of CGFloat %d, float %d, double %d, literal float %d, literal %d, long literal %d"

Re: [SOLVED] Rendering OpenGL in timed loop (CoreVideo).

2009-04-11 Thread Brian Bruinewoud
That did it, adding [[ self openGLContext ] flushBuffer ]; To the end of getFrameForTime: did the trick. Thanks. On 12/04/2009, at 03:13 , Michael Ash wrote: On Sat, Apr 11, 2009 at 2:20 AM, Brian Bruinewoud wrote: Ok. That "works". I was coming from an NSOpenGLView example where

Re: Rendering OpenGL in timed loop (CoreVideo).

2009-04-10 Thread Brian Bruinewoud
Ok. That "works". I was coming from an NSOpenGLView example where the view sets the context before the drawRect is sent. Any it, doesn't crash/hang/stop now, but it doesn't draw anything, either... :( Oh well. On 11/04/2009, at 14:18 , Michael Ash wrote: You can't just go and start calli

Re: Rendering OpenGL in timed loop (CoreVideo).

2009-04-10 Thread Brian Bruinewoud
that maybe glGetError was some sort of macro or inline function that might put some code in the caller. Doesn't seem to be the case. It's a dynamic link stub: dyld_stub_glGetError (as is NSLog). I'm not sure how to debug this. Any pointers? On 11/04/2009, at 11:38 , Bri

Re: Rendering OpenGL in timed loop (CoreVideo).

2009-04-10 Thread Brian Bruinewoud
/Debug/FirstOpenGLtest.app/Contents/MacOS/ FirstOpenGLtest', process 1053. [Switching to process 1053 thread 0x4c03] On 11/04/2009, at 11:22 , Greg Parker wrote: On Apr 10, 2009, at 6:15 PM, Brian Bruinewoud wrote: However, if I place any openGL code (even just glGetError) in the "

Rendering OpenGL in timed loop (CoreVideo).

2009-04-10 Thread Brian Bruinewoud
All, I'm trying to run an OpenGL animation. At first I tried an NSTimer, but couldn't get the output to appear unless I resized the window. It was as if the redraw caused by NSTimer wasn't swapping buffers or whatever whereas the redraw caused by resize was. Note, however, that the OpenGL

After Hillegass

2009-01-17 Thread Brian Bruinewoud
Firstly: is there a FAQ for this list? I was able to find a FAQ for the mailing lists in general but none for this list in particular. Secondly: I've read the 3rd edition of Hillegass and it has gotten me a fair way. What book should I move to next? I searched the archives and the latest da

Re: Implementing an Inspector similar to the one in IB.

2009-01-13 Thread Brian Bruinewoud
Just to clarify, I mean the exposable areas below that can be shrunk to a heading or expanded to full. The link that Brandon posted is exactly what I'm after. So, thanks everyone for the reply. On 12/01/2009, at 20:59 , Kyle Sluder wrote: On Sun, Jan 11, 2009 at 3:20 AM, Brian Bruin

Implementing an Inspector similar to the one in IB.

2009-01-11 Thread Brian Bruinewoud
Hi, I'm an experienced C++ developer but a relative newbie to Objective-C and Cocoa and am learning my way. I would like to implement an inspector that has views that show/hide by clicking on their headings similar to the ones in the Interface Builder inspector. This control doesn't see

CAD programming.

2009-01-10 Thread Brian Bruinewoud
Hi, I'm an experienced C++ developer but a relative newbie to Objective-C and Cocoa and am learning my way. I'm porting a program to Mac OS X Cocoa and part of the requirements is a CAD-like functionality. A substantial part of the rest of the program is already written in Cocoa. I've b