Re: WTF is happening?

2014-12-13 Thread Phillip Mills
Why do you think the problem is with “respondsToSelector:”?  The error says 
you’re accessing past the end of a string.

On Dec 13, 2014, at 10:20 AM, Maxthon Chan m...@maxchan.info wrote:

 This got me scratching my head, hard. Why would class_respondsToSelector() 
 crash? (BTW this is used in a class search loop so I cannot use [NSObject 
 respondsToSelector:] just yet.)
 
 /Users/technix/Developer/Subtitler 
 Pro/Frameworks/SubtitleKit/SubtitleKitTests/SKSubripParseTest.m:33: error: 
 -[SKSubripParseTest testFileFormatSearch] : failed: caught 
 NSRangeException, *** -[__NSCFString substringFromIndex:]: Index 18 out of 
 bounds; string length 17
 (
   0   CoreFoundation  0x7fff926c 
 __exceptionPreprocess + 172
   1   libobjc.A.dylib 0x7fff8725976e 
 objc_exception_throw + 43
   2   CoreFoundation  0x7fff9266651d 
 +[NSException raise:format:] + 205
   3   Foundation  0x7fff8f127b2e -[NSString 
 substringFromIndex:] + 118
   4   AppKit  0x7fff8a4e1c49 
 +[_NSObjectAnimator _targetClass] + 92
   5   AppKit  0x7fff8a4e1b79 
 +[_NSObjectAnimator resolveInstanceMethod:] + 34
   6   libobjc.A.dylib 0x7fff8725c954 
 _ZL28_class_resolveInstanceMethodP10objc_classP13objc_selectorP11objc_object 
 + 80
   7   libobjc.A.dylib 0x7fff87262799 
 lookUpImpOrForward + 356
   8   libobjc.A.dylib 0x7fff87262617 
 lookUpImpOrNil + 20
   9   libobjc.A.dylib 0x7fff872545ff 
 class_respondsToSelector + 37
   10  SubtitleKit 0x0001000d02c8 +[SKFormat 
 formatEngineForExtension:] + 184
   11  SubtitleKitTests0x00010008551e 
 -[SKSubripParseTest testFileFormatSearch] + 142
   12  CoreFoundation  0x7fff9253f3cc 
 __invoking___ + 140
   13  CoreFoundation  0x7fff9253f222 
 -[NSInvocation invoke] + 290
   14  XCTest  0x000100097919 -[XCTestCase 
 invokeTest] + 253
   15  XCTest  0x000100097b1a -[XCTestCase 
 performTest:] + 150
   16  XCTest  0x0001000a0700 -[XCTest 
 run] + 257
   17  XCTest  0x00010009682b 
 -[XCTestSuite performTest:] + 379
   18  XCTest  0x0001000a0700 -[XCTest 
 run] + 257
   19  XCTest  0x00010009682b 
 -[XCTestSuite performTest:] + 379
   20  XCTest  0x0001000a0700 -[XCTest 
 run] + 257
   21  XCTest  0x00010009682b 
 -[XCTestSuite performTest:] + 379
   22  XCTest  0x0001000a0700 -[XCTest 
 run] + 257
   23  XCTest  0x00010009383c 
 __25-[XCTestDriver _runSuite]_block_invoke + 56
   24  XCTest  0x00010009f36d 
 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 162
   25  XCTest  0x000100093770 
 -[XCTestDriver _runSuite] + 269
   26  XCTest  0x000100094359 
 -[XCTestDriver _checkForTestManager] + 678
   27  XCTest  0x0001000a35b0 
 +[XCTestProbe runTests:] + 182
   28  xctest  0x00011256 xctest + 4694
   29  xctest  0x000115d6 xctest + 5590
   30  xctest  0x00010ed3 xctest + 3795
   31  libdyld.dylib   0x7fff90e315c9 start + 1
 )
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/phillip.mills1%40acm.org
 
 This email sent to phillip.mil...@acm.org


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Prevent display of PDF controls in a WebView

2012-09-02 Thread Phillip Mills
In an OSX application, I use a WebView to display a variety of file types. When 
the type is PDF, something within Cocoa (PDFKit?) intercepts mouse movement in 
the lower portion of the screen and responds by displaying a translucent gray 
view with clickable areas that give options for the user to zoom in and out, 
open the file in Preview, or save it as a download.

I see this on 10.8 but testers have reported it back to 10.6.8.

(Part of my problem may be that I don't know what to call this element: 
contextual floating toolbar? ...hud panel? ...?)

Anyway, I need to prevent it from appearing as it both interferes with how the 
program is supposed to function visually and gives options (zoom) that will 
cause incorrect program behavior if used.

How is this thing activated and, much more important, how do I stop it?


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Prevent display of PDF controls in a WebView

2012-09-02 Thread Phillip Mills
On 2012-09-02, at 4:16 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote:

 Have you investigated supplying your own PDF view. Webkit doesn't really 
 offer anything about its built in PDF view beyond its existence.

I thought about that.  I've created my own view/representation pairs for two 
other (simple) data types but PDF sounded like something complex enough that 
letting the existing mechanism take care of it would be safer. Maybe not.

Thanks for the suggestion.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Sandboxing. WTF?

2012-05-30 Thread Phillip Mills
On 2012-05-29, at 11:30 PM, Quincey Morris wrote:

 A number of commentators have jumped into the thread to declare, in effect, 
 that the sandboxing could *never* work. Such a point of view seems 
 inexplicably to ignore the fact that there is a platform out there already 
 (iOS) for which sandboxing is demonstrably viable -- technically, 
 economically, and functionally.

iOS devices are successful but it's as easy to claim that it's in spite of an 
OS that is a functional failure as it is to give the OS any credit.  Since 
people don't get to choose between increased flexibility and security, there's 
no way to know.

The convoluted methods required when attempting to use two different apps when 
working with one document are strong evidence against functional viability from 
a *computing* perspective.  Those devices make great media consumption tools 
but that's an awfully low setting of the bar if it's applied to real 
computers.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Sandboxing. WTF?

2012-05-29 Thread Phillip Mills
On 2012-05-29, at 10:34 AM, Kyle Sluder wrote:

 It solves the problem of applications being unable to express their intended 
 boundaries to the operating system.

I'm honestly curious  When did that become a real-world problem for Mac 
users?
(And if it's anticipatory, what's different now that requires it?)

I use, and program for, iOS.  Mostly, I enjoy my iPad but there are days when 
sandboxing makes it seem more like a digital picture frame than a computing 
device.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Trying to customize UITableViewCell with IB but having odd exception

2012-01-28 Thread Phillip Mills
On 2012-01-28, at 1:55 AM, James West wrote:

 I get -[UIAccessibiltyBundle setProduct:] unrecognized selector sent to 
 instance

It looks as if the cell has been deallocated and its address reused to hold a 
different kind of object. (UIAccessibiltyBundle)
If it's not obvious how this is happening, I'd try using Instruments to check 
for zombies.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: add crlf to UITextView

2011-05-25 Thread Phillip Mills
On 2011-05-25, at 2:10 PM, koko wrote:
 
 How does one get crlf into a UITextView?

I've put things on a new line by doing essentially:
m_notes.text = [m_notes.text stringByAppendingFormat:@\n\n%@, [m_backing 
objectAtIndex:index]];

At which point, the object would be @Text to add.  I'm not sure about '\r', 
not whether the do anything useful nor whether they work the same in a format 
string.


___

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


iOS: Data sharing/upgrade

2011-04-29 Thread Phillip Mills
I have an application that uses iTunes file sharing for documents (PDF, rtf, 
Pages...) and Core Data with sqlite for storing metadata about those documents.

I'm thinking of creating a simpler version with the same essential capability 
but without some of the advanced features, partly to promote the main program 
and partly because some people don't need the full version.  The light edition 
would use the same document types and a subset of the Core Data structure.

My concern is that I'd like to support the scenario where someone starts with 
the simple version and then moves to the more complex one.  Logically, the data 
should be perfectly transferable but to actually share or copy files seems 
painful.

What I don't know is, is there any coding possible that helps this happen?


___

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


UIWebView: Unexpected NSURLErrorCancelled

2011-04-26 Thread Phillip Mills
I'm trying to debug something in an iPad app with very limited information and 
hoping that the symptoms will ring a bell with someone.  This is based on a 
report from one user and is nothing I've been able to reproduce.

I have a  UIViewController subclass that shows a UIWebView and is also its 
delegate.  At a certain point, this controller is presented full-screen modal, 
does some setup, and invokes loadRequest: for its UIWebView.  The URL always 
points to a local file.  There's nowhere in the code that allows the user to 
stop the load or to load anything else while the first load is taking place.
 
The program, however, is getting a callback at webView:didFailLoadWithError: 
with the -999 error code.  I'm told that it doesn't always happen and there 
seems to be no clear pattern (so far).  The user suspects that the behaviour 
may have started with her most recent upgrade of iOS.

 I haven't found any documentation that describes a situation that returns this 
error and which could match these conditions.  Or, if I have, I didn't 
understand it.  :-)
 
Suggestions?


___

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: UIWebView: Unexpected NSURLErrorCancelled

2011-04-26 Thread Phillip Mills
On 2011-04-26, at 8:52 AM, Jeff Johnson wrote:

 You can get this error when the page automatically redirects via 
 Javascript. I would recommend just ignoring the error, treating it as a 
 non-error condition.

I'm coming around to the idea that your solution is the right one.  However, in 
this case, I'm still baffled by the cause.  The local files involved are a mix 
of .pages, .pdf, and possibly .rtf, so redirect doesn't seem to account for it.

(Hmmm.  I wonder if one of the structured document types does a multi-step 
load...?)


___

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


MPMusicPlayerController playbackState

2011-04-20 Thread Phillip Mills
I have a simple program that uses code such as:

MPMusicPlayerController *player = [MPMusicPlayerController 
applicationMusicPlayer];
[player setQueueWithQuery:entityQuery];
[player beginGeneratingPlaybackNotifications];
[player play];

In case it matters, 'entityQuery' always references a single item.

What then happens is that my 
MPMusicPlayerControllerPlaybackStateDidChangeNotification handler gets called 
twice with (playbackState == MPMusicPlaybackStatePlaying).  There are no 
intervening calls, which first got me wondering how 'playing' to 'playing' can 
be defined as a state change.  Some debugging revealed that userInfo for the 
notification contains a MPMusicPlayerControllerPlaybackStateKey item which is 0 
on the first call and 1 on the second.

Assuming (at least somewhat reasonably) that the userInfo code should match the 
advertised state and checking the associated enum, it seems as if the first 
call should have reported 'Stopped' rather than 'Playing'.

Anyone have any better information on this?  If there's documentation on when 
and why notifications are sent (and the expected state transitions) beyond the 
implications in their names, I haven't been able to find it.


___

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: Setting a delegate on a UITextField

2011-03-03 Thread Phillip Mills
On 2011-03-03, at 5:01 PM, Jon Sigman wrote:
 
 What am I overlooking?

First question: Is your 'nameTextField' truly non-nil when you set its delegate?

Second question: What do you define as finished editing?



___

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


UIWebView: Scale factor

2011-02-25 Thread Phillip Mills
I'm loading files into a UIWebView on an iPad and need to be able to scroll 
them programatically to positions in the displayed files.  Many of these files 
are PDF, but generally it could be any of the types supported by loadRequest.  
I'm able to do what I want using JavaScript if I set up my UIWebView with 
scalesPagesToFit = NO.  However, doing that looks terrible.

The problem with allowing automatic scaling is that I know my scrolling 
requirements in screen units but JavaScript interprets them as document units.  
Depending on the original file and the iPad orientation the error factors I've 
seen are in the 20-to-40% range.  How do I set scalesPagesToFit = YES and 
know what scaling was applied?

(I have a truly terrible hack in mind but I hope to be saved from that madness. 
:-) )


___

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


UITableView: Delay select recognition

2011-01-27 Thread Phillip Mills
I would like to have either an action occur that's linked to a double-tap in a 
UITableViewCell subclass *or* the action specified by the 
...didSelectRowAtIndexPath:... method of the owning UITableView, but not both.  
I've encountered some problems with each approach I've tried.

- Having the table's select method perform an action after a delay and ask the 
cell whether it should *really* do it sort of works but is a bit scary since it 
depends on the length of delay.  (I really don't like things that only function 
if a timing window is always valid.)

- Obviously, pulling out the table's gesture recognizer and setting up 
dependencies is a bad idea, mostly because that recognizer isn't documented, 
but also because it's not the cell that's recognizing its own selection.  
(Having the table depend on the failure of all its cells sounds overly complex.)

- I had one idea that seemed promising for a while.  Creating both a single-tap 
and a double-tap recognizer for the cell does prevent the table's select method 
from being called.  My theory was that perhaps I could use...
[singleTap requireGestureRecognizerToFail:doubleTap];
...in the cell and *somehow* trigger the table's select only if the single-tap 
succeeded.  Unfortunately (and unexpectedly!) putting that dependency on the 
single-tap stopped it from blocking the table's select.

At this point, my feeling is that maybe I should handle both single and double 
taps in the cell -- with the dependency, send a custom notification for the 
table to use when single succeeds, and do nothing in the table's normal select 
cell logic.  OTOH, I also feel that this must be a common requirement and 
therefore easier than I'm making it appear.  (?)

---

( It would be so much easier to not fight with the framework if the framework 
was a little less hostile.  I think I'm seeing one violation of the Principle 
of Least Astonishment for every two hours of work that I do with it.  :) )

___

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: UITableView: Delay select recognition

2011-01-27 Thread Phillip Mills
On 2011-01-27, at 10:42 AM, Luke Hiesterman wrote:

 What is this gesture recognizer you speak of pulling out of the table view? 
 Table view does not use gestures for selection, but you're right that even if 
 it did, you shouldn't mess with it. 

For solely educational purposes, I made the (apparently incorrect) assumption 
that UIScrollViewDelayedTouchesBeganGestureRecognizer would be responsible for 
touches in the table view.  Perhaps it's another trick of timing, but forcing 
it to wait on the outcome of my double-tap seems to do exactly what I 
wanted...in the simplest case I could devise, at least.

 A single tap by itself would fire before the table gets a chance to process 
 any touches. By adding the failure requirement you allow the table to get 
 touch events when the gesture doesn't fire immediately. 

That's certainly what I saw.  (Which once again brings up my lifelong hatred 
for timing-dependent code...as mentioned elsewhere.  :) )

 Have you tried just having a double tap gesture and doing everything there? 
 Perform one action on the succeed case and another on the failure case. 

I'm not sure how that works.  If my target action is called, then the double 
succeeded but how would I know it failed except through a dependent single 
succeeding?  Should I be looking at the UIGestureRecognizerDelegate for that?


___

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: UITableView: Delay select recognition

2011-01-27 Thread Phillip Mills
On 2011-01-27, at 1:06 PM, Luke the Hiesterman wrote:

 Knowing that it failed would require a subclass.

Thanks.  I'll keep that in mind.

For now, it seems as if application-specific notifications sent from the cells 
on single and double taps, combined with ignoring the select in my 
UITableViewDelegate, will work in a way that's more obvious, given my current 
level of knowledge.

I'll take a closer look at your suggestion when things blow up.  :)


___

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: iOS: Settings Security

2011-01-23 Thread Phillip Mills
On 2011-01-23, at 10:57 AM, John Joyce wrote:

 I can see a scenario where you want an app for classroom use by students that 
 is configurable only by the instructor but usable by all.

Thanks for the profile reference, but my situation is more about a single 
device that might sometimes be used by a minor.  Under normal operation a 
program would by considered to have a 4+ rating, but could exceed that if 
someone changed some of its settings to point to URLs with questionable 
material.  If changes to those settings were restricted to the person 
exercising parental control then there would at least be a level of 
protection equivalent to what the system provides for browsers and such.

___

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: Question about split view

2011-01-17 Thread Phillip Mills
On 2011-01-16, at 10:08 PM, Kyle Sluder wrote:

 I'm sure developers would
 love if the frameworks *did* manage memory correctly.

In the absence of page/swap space for modified memory, I'm not sure what 
'correctly' means.  :-)

To my way of thinking, the problem is that there's no well-defined and now 
we're back notification.  Re-using the method that's normally called to load 
the startup state of a view doesn't quite cut it when the view should actually 
represent on-going state changes.  Maybe an approach is to use 
didReceiveMemoryWarning to create a record of differences vs. startup and, if 
not nil, apply those in viewDidAppear.  Another thought would be for the 
framework to have a 'dirty' flag to control whether a view could be 
unloaded/reloaded without harm.

I guess I'll look at the possibility of preventing unloading (at least of the 
detail view), perhaps in combination with my own 'dirty' indicator.

___

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


iOS: Question about split view

2011-01-16 Thread Phillip Mills
I see a problem with the following scenario:
1) Start with the template project for a split view
2) Add a function where a modal view can be shown over it using a style of 
UIModalPresentationFullScreen
3) Run in portrait mode
4) While the modal view is being shown, trigger a memory warning
5) Dismiss the modal view

The result is that the 'Events' button that brings up the popover root 
controller is no longer displayed.  The view has been reloaded, but the 
callback that sets up the 'Events' button hasn't been activated.

I'm handling this by saving a reference to the button the first time I'm given 
it and then,  in viewDidAppear:, checking for portrait orientation and the 
identity of the first item on the toolbar.  This feels like a hack.  Does 
anyone have a better strategy for this 
one?___

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


iOS: 'Random' enable/disable

2011-01-15 Thread Phillip Mills
This may be obvious to people, but it took me a while to figure out, so I 
thought I'd post it in case it saves someone a bit of time.

My application is structured with a split view controller as the main interface 
element.  The root view has a primary controller, and a second one which is 
pushed onto it by means of clicking a toolbar button on the detail view.  When 
the primary controller is active, the button is enabled; when the second one is 
active, the button is disabled.  All is good, except

The application also presents a full screen modal view according to a user 
request, with a button to dismiss it.  Very rarely, when the modal view is 
dismissed and the second controller is active, the button to select the second 
controller shows as enabled.  There is no code path in the app that allows 
that.  The answer is: if there is a memory warning delivered while the split 
view controller is obscured, its controllers dump their views and reload them 
when needed.  Of course they reload them in whatever state they're defined in 
the nib file.

Lesson: assuming that nib settings are only for application start up is wrong.

___

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


UIActionSheet: Odd behavior / appearance

2010-12-23 Thread Phillip Mills
While attempting to use a UIActionSheet with dynamically added buttons, I seem 
to have discovered some oddities with how they work...or don't.

I create a simple View-based application and add the following code:

- (void)showMyActionSheet {
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@Test Sheet 
delegate:self cancelButtonTitle:nil destructiveButtonTitle:@Delete 
otherButtonTitles:nil];
for (int i = 1; i = 14; i++) {
[sheet addButtonWithTitle:[NSString stringWithFormat:@Button %d, i]];
}
UIView *aView = [self view];
[sheet showFromRect:CGRectMake(472.0, 233.0, 58.0, 29.0) inView:aView 
animated:YES];
[sheet release];
}

- (void)viewDidLoad {
[super viewDidLoad];
[self performSelectorOnMainThread:@selector(showMyActionSheet) 
withObject:nil waitUntilDone:NO];  // Hack to avoid nil: 'viewDidLoad' isn't 
'viewDidLoadCompletely'
}

If I run this in portrait orientation, I get a display of buttons up to Button 
12 with thick black lines between, a small amount of the next button, and no 
ability to scroll to the end of the list.

If I run it landscape, the button style is different with thin dividing lines, 
scrolling is enabled, but the Delete button has only a small red section at 
the beginning instead of having an entirely red background.  (I could live with 
this; it;s the portrait display that's a deal-breaker.)

Another troubling variation comes from running landscape and replacing the 
'showFromRect' line with:

[sheet showFromRect:CGRectMake(472.0, 633.0, 58.0, 29.0) inView:aView 
animated:YES];

In this case, I get the nicer, scrollable sheet...but it will not scroll far 
enough to leave the bottom two buttons on the screen (scrolls and bounces back).

Solutions would be nice, of course, but I'm as much interested in whether 
someone can run a sanity check to see if they witness the same 
strangeness.___

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: UIActionSheet: Odd behavior / appearance

2010-12-23 Thread Phillip Mills
On 2010-12-23, at 6:31 PM, Fritz Anderson wrote:

 It's not designed to handle that many well

The actual minimum number of buttons that cause it to fail is unknown (to me); 
what I posted was chosen because it was a quick way to demonstrate all three 
'surprises'.  Considering that it breaks in *different* ways depending on 
screen location, testing someone else's code for where the boundaries are isn't 
an appealing exercise.  By its nature, the UIActionSheet will scroll its 
contents -- which implies an expectation of more contained items than are 
visible on the screen -- so consistency would be nice.  If there are specific 
limits, documentation of those would also be good.
___

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


UITextField in UIScrollView

2010-12-14 Thread Phillip Mills
I have a number of UITextField objects inside a (subclass of) UIView, which is 
the content view for a (subclass of) UIScrollView.

When the user types into a text field, I dynamically change its size if 
necessary and reset the content size of the content view.  When needed, I also 
scroll so that a rectangle matching the typing position of the active text 
field is visible in the scroll area.  So far, so good.

When the content size is larger than the visible space and the user moves to an 
empty UITextField to type, the display scrolls right and left on each 
character.  The problem is that scrollRectToVisible:: is being called from a 
UIFieldEditor object with a rectangle that is the size of the entire content 
area rather than anything related to the current field or the location where 
characters are being entered.

Here's a bit of the traceback:
#0  -[MultiLineScrollView scrollRectToVisible:animated:] (self=0x4d2b810, 
_cmd=0x6cddd5, rect={origin = {x = 0, y = 0}, size = {width = 1119, height = 
740}}, animated=1 '\001')
#1  0x0035dd84 in -[UIFieldEditor scrollSelectionToVisible:] ()
#2  0x0035bc18 in -[UIFieldEditor webViewDidChange:] ()
#3  0x0001f6c1 in _nsnote_callback ()
#4  0x00d84f99 in __CFXNotificationPost_old ()
#5  0x00d0433a in _CFXNotificationPostNotification ()
#6  0x00015266 in -[NSNotificationCenter postNotificationName:object:userInfo:] 
()
#7  0x00d1d67d in __invoking___ ()
#8  0x00d1d551 in -[NSInvocation invoke] ()
#9  0x0211982a in SendDelegateMessage ()
#10 0x01f6636f in WebEditorClient::respondToChangedContents ()
#11 0x02166fdc in WebCore::Editor::appliedEditing ()

I suppose I could set up a flag to ignore the call if I've already scrolled the 
current text field or if the height suggests that it's *not* a text field, but 
I'm interested in finding a way to handle this that isn't fighting with the 
framework if at all possible.

(Also, strictly out of curiosity, what are WebCore, WebView, and 
WebEditorClient things doing in a 
UITextField?)___

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


iOS: Monospaced fonts aren't?

2010-12-10 Thread Phillip Mills
I've been having one of those I must be doing something stupid days.  The 
code I'm trying to write needs to pad one string with spaces so that certain 
characters line up visually with selected characters in a different string 
(within a view).  It seemed like a relatively easy task as long as I could 
require the use of a monospaced font.  However, it comes out looking various 
kinds of wrong depending on how many spaces I add.  I've tried this with a 
number of Courier variants with the same result.

The following test seems to confirm that a string of spaces does not render in 
the same bounding box as a string of alphanumeric characters or punctuation 
marks.  (Also, that there may not be a neat and obvious formula for how to 
compensate.)  Are these results reproducible?  Was a fixed-size character width 
a bad assumption?  Or is it a bug?

- (void)debugFont {
UIFont *font = [UIFont fontWithName:@CourierNewPS-BoldMT size:24];

// With 22 characters, there's a width difference of 9
NSString *s1 = @1234567890123456789012;
NSString *s2 = @  ;

// The choice of non-space character doesn't seem to matter
NSString *s5 = @..;

// With 23 characters, there's a width difference of 10
NSString *s3 = @12345678901234567890123;
NSString *s4 = @   ;

NSLog(@@. size: %f, s1, [s1 sizeWithFont:font].width);
NSLog(@@. size: %f, s2, [s2 sizeWithFont:font].width);
NSLog(@@. size: %f, s5, [s5 sizeWithFont:font].width);
NSLog(@@. size: %f, s3, [s3 sizeWithFont:font].width);
NSLog(@@. size: %f, s4, [s4 sizeWithFont:font].width);
}

2010-12-10 14:19:03.936 FontTest[1834:207] .1234567890123456789012. size: 
317.00
2010-12-10 14:19:03.937 FontTest[1834:207] .  . size: 
308.00
2010-12-10 14:19:03.938 FontTest[1834:207]  size: 
317.00
2010-12-10 14:19:03.938 FontTest[1834:207] .12345678901234567890123. size: 
332.00
2010-12-10 14:19:03.939 FontTest[1834:207] .   . size: 
322.00


___

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: iOS: Monospaced fonts aren't?

2010-12-10 Thread Phillip Mills
A little more investigation:

On 2010-12-10, at 2:39 PM, Phillip Mills wrote:

 I've been having one of those I must be doing something stupid days.

[...]

 2010-12-10 14:19:03.936 FontTest[1834:207] .1234567890123456789012. size: 
 317.00
 2010-12-10 14:19:03.937 FontTest[1834:207] .  . size: 
 308.00
 2010-12-10 14:19:03.938 FontTest[1834:207]  size: 
 317.00
 2010-12-10 14:19:03.938 FontTest[1834:207] .12345678901234567890123. size: 
 332.00
 2010-12-10 14:19:03.939 FontTest[1834:207] .   . size: 
 322.00

Well, as some kind of consolation I've discovered that similar code (using 
NSString sizeWithAttributes:) and the same font name gives equal widths for 
digits or spaces on the Mac SDK.

The other thing I notice is that the iOS-generated width divided by the number 
of characters is exactly 14 for spaces, but is something close to 14.4 for all 
other tests.  This makes me wonder whether something is being truncated or 
converted at the wrong point within the size 
calculation.___

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: iOS: Monospaced fonts aren't?

2010-12-10 Thread Phillip Mills
On 2010-12-10, at 5:38 PM, Ian Joyner wrote:

 Is plain Courier not available on iOS?

Courier is there but with the same problem.
___

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


iPad: Some popover problems resolved

2010-12-04 Thread Phillip Mills
Yesterday I was getting frustrated that nothing I did in Interface Builder 
produced a popover that looked right when I rotated my split view application 
to portrait orientation.  Not only did it not look the way I wanted, I couldn't 
get it back to its default appearance either.  It had decided that the 
navigation bar should be white lettering embossed on a white background.  
That's not how it looked in IB, but it's how it appeared in every (clean!) 
build of the program.

Late last night, while away from the computer, something I remembered made me 
suspicious.  When I was experimenting in IB with different options, I got to a 
point where the changes weren't visible until I went to the 
UINavigationController and toggled the show setting off and then on again.  I 
guessed that something had gotten messed up inside the .xib file.  This morning 
I created an empty split view project, configured its MainWindow.xib roughly 
like the problematic project and used a text editor to compare.  Sure enough, 
there were persistent background color references in there that didn't match 
the IB settings.

After some careful editing I still don't have what I'd prefer but I'm no worse 
off than before I started color customization.  Compared to yesterday, that's 
success!  :-)


___

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: navigation bar tint color issue on iOS 4.2

2010-12-03 Thread Phillip Mills

On 2010-12-03, at 11:13 AM, Matt Neuburg wrote:

 On Thu, 02 Dec 2010 22:03:50 +0800, Kin Mak kin...@me.com said:
 
 I have just upgraded my XCode to 3.2.5 and built and linked my iPad app 
 using iOS 4.2. However, there seems to be a bug regarding navigation's bar 
 tint color and popover:
 
 I am having an iPad app using split view controller. The pop over controller 
 contains a navigation controller with a table view controller as its root. 
 The navigation bar's tint color is a custom color. 
 
 If the pop over is popped up in portrait mode, the navigation bar's color 
 would switch back to its default color. Afterwards, the tint color would 
 stay as the default one even when the navigation bar is displayed in 
 landscape mode.
 
 The issue only happens on iOS 4.2. The same app does not have any problem 
 when running on iOS 3.2. 
 
 Does anyone have the same issue?
 Or do I miss something here.
 
 As so often with iOS frameworks, it's a timing issue. The split view wants to 
 be in charge of how the nav bar looks. Your change in the tint color is being 
 reverted *after* you make it. The way to get around this, as usual, is with 
 delayed performance (this code is from 
 splitViewController:willShowViewController:invalidatingBarButtonItem:):
 
 [((UINavigationController*)aViewController).navigationBar 
performSelector:@selector(setTintColor:) 
withObject:[UIColor greenColor] afterDelay:0.1];
 
 And so on. But please, pick a nicer color. :) m.

Thanks for posting that.  I have a similar situation with the added complexity 
that the popover itself displays its navigation bar and toolbar in colors and 
styles that don't match what I've configured in Interface Builder for the 
children of the split view controller.  By using something similar to what you 
describe, but in 
splitViewController:popoverController:willPresentViewController: I can affect 
the tint of the buttons but not the toolbar or navigationBar areas shown in the 
view controller that the popover is presenting.

What I'd really like is a use what IB said to use property.  
:-)___

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: navigation bar tint color issue on iOS 4.2

2010-12-03 Thread Phillip Mills
On 2010-12-03, at 1:15 PM, Phillip Mills wrote:

 I can affect the tint of the buttons but not the toolbar or navigationBar 
 areas shown in the view controller that the popover is presenting.

Just as a side note, it seems interesting that the toolbar reverts to its 
intended appearance when rotation goes back to landscape while the 
navigationBar resets to defaults.
(In the popover, the toolbar appears as black opaque with its *buttons* 
matching the IB toolbar settings.)
___

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: navigation bar tint color issue on iOS 4.2

2010-12-03 Thread Phillip Mills
On 2010-12-03, at 3:10 PM, Matt Neuburg wrote:

  But obviously this is something the framework would rather you didn't do. :)

...and if the framework and IB had agreed that it was a bad idea, I probably 
wouldn't have bothered trying...for those hours.  
:-)___

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


iOS: UIWindow orientation

2010-11-29 Thread Phillip Mills
While attempting to track movement during a long press, I was surprised to 
discover that the x direction of an application's UIWindow seems to be for the 
portrait x dimension no matter how the device is turned.  Using [recognizer 
locationOfTouch:i inView:[recognizer view]] matches the apparent x/y direction 
of the rotated device while [recognizer locationOfTouch:i inView:nil] is only 
relative to portrait.

Even after seeing this, I'm having difficulty finding any documentation that 
describes it.  (I'm curious whether I'm supposed to do something to keep the 
values consistent or whether that's just the way it is.)  I'd assumed it would 
be mentioned in the gesture recognizer docs where it describes the option (or 
the UIWindow Class Reference, or the View Programming Guide) but I'm not seeing 
it.  Suggestions of better places to 
look?___

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


iPad: UI Implications

2010-11-26 Thread Phillip Mills
After having written a couple of simple iPad apps to investigate certain 
features, I'm now close to being feature-complete on my first serious 
application.  I'm finding that the lack of a standard menu for centralizing 
actions is the hardest thing to get used to.  As a result of that, I've adopted 
the seemingly reasonable policy of having custom controls or control subclasses 
respond to gestures and behave accordingly.

This leads to a couple of design difficulties: 
1) It's not always obvious what kind of UI element or gesture is appropriate 
(or available) for enabling a specific action, and
2) Any desired gesture has some chance -- not necessarily documented -- of 
conflict with one used by a standard UI element.
(The iOS Human Interface Guidelines are a partial solution but they are 
incomplete and, by necessity, can't provide fine detail. )

At the coding level, I'm noticing that I'm using notifications far more than I 
would in a Mac application.  In the Mac world, it's likely that an 
application-specific action will be recognized first by a controller (in the 
MVC) sense which will coordinate data and view updates in some way.  With the 
iPad, I'm finding it more likely that a lower level object will be the natural 
recipient of the action and will then need to broadcast its interpretation of 
that.  Not that there's anything wrong with that, though debugging session tend 
to be less intuitive, but it has required some revisions to my thinking.  So 
far, I've resisted the temptation to replicate Mac menus using UIBarButtonItems 
and UIPopoverControllers.  :-)

I don't have any specific questions or problems associated with this but I'm 
curious about attitudes, techniques, patterns, or tools that others have found 
helpful going from Mac to iOS.___

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: iPad: UI Implications

2010-11-26 Thread Phillip Mills
On 2010-11-26, at 11:34 AM, Ricky Sharp wrote:

 At a high level, you don't go from Mac to iOS.  i.e. you don't attempt to 
 port, clone the UI, etc.

Actually, I'm going from Mac to iOS at an even higher level: programming style 
and patterns of object interaction.  In other words, this application has no 
existing Mac equivalent, so porting is a non-starter.  :-)

Thanks for the tips, tough.  If I ever try to create parallel applications, 
I'll keep those in mind.

(No worries about GC.  Many years of commercial development using Java has 
convinced me that GC invites a generally sloppy attitude...or maybe it's just 
Java that does that.  [shrug])


___

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


iPad: Distribution of documents

2010-11-22 Thread Phillip Mills
I'm working on an application that lets a user create 'documents' that will 
live in the app's Documents directory.  I'd like to distribute some sample 
documents that would be treated the same as anything the user creates, but 
haven't seen anything that suggests I can have XCode populate Documents as part 
of the installation package.  I also haven't seen anything that says I can't.  
:-)

It seems easy enough to stick them into the main bundle as resources and then 
copy them on a first execution.  OTOH, if there's a direct way of configuring 
this, I'd rather go with it.

(I think my main problem is that I don't actually know what the Cocoa/XCode 
documentation would call this kind of packaging detail even if it 
existed.)___

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


iPad: Multiple master/detail views

2010-11-05 Thread Phillip Mills
I have an application that uses a few different master/detail relationships 
within its model and I'm having trouble figuring out how to represent that in 
the UI.  Conceptually, I want a toolbar that is always available, with some 
buttons that choose what kind of thing should be displayed (plus some other 
global options).  The chosen type of thing is then shown in a split view.  When 
something different is chosen, the split view shows that instead.

Problem #1 is that the view obtained from the split view controller seems to 
insist on taking up the entire window.  I could compromise on that by having my 
toolbar duplicated in different detail views, but problem #2 is that I don't 
see a reasonable way of replacing contained views or view controllers after the 
split view has been initialized from the nib.

I'm going to try experimenting with multiple UISplitViewController objects and 
swapping those (along with duplicated toolbars), but once again I feel there 
should be an easier way that I'm overlooking.

Thanks in advance for tips or pointers to sample 
code.___

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


UITableView Selection

2010-11-02 Thread Phillip Mills
I have an application with a split view, master/detail design.  The 'master' 
items are dynamically created and vary in number.  When I start the 
application, I load these for use by the table view's data source during the 
root view controller's viewDidLoad and everything works quite well.  Except

I'd like the application to automatically select the item that was selected 
when it was last exited.  I can't do this in viewDidLoad because the table 
hasn't been populated yet.  There also seems to be no delegate method for 
dealing with the end of a set of cell requests.  Currently, my best idea is to 
subclass UITableView, override layoutSubviews so that I know when 'super' has 
finished, and (if it's the first time through) append selection logic.  This 
strikes me as a clumsy was of doing something that probably should be simple.

Suggestions for a cleaner approach would be 
appreciated.___

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


UIKit: Customized text display

2010-09-07 Thread Phillip Mills
I'm looking at the feasibility of an iPad application.  A primary view would 
allow for the entry of lines of text, paired with lines of annotation.  
Annotation lines and text lines would have different attributes: height, font, 
edit methods  In fact it might be better for the annotation line to contain 
custom graphic symbols, but that's not a certainty.  Text lines would be edited 
using the virtual keyboard; annotation lines would be manipulated by touch.

Essentially, it would be arranged something like:
Annotation line 1
Text line 1
Annotation line 2
Text line 2
...

My problem is that I'm not familiar enough with the UIKit to figure out what 
kind of view I should be using to build this interface  If I were writing a 
program for the Mac, I'm fairly sure that I could convince NSTextView to do 
what I want.  With Cocoa Touch, UITextView doesn't support multiple attributes. 
 UITableView doesn't support variable cell heights and is said not to work well 
with UITextFields in cells.  Perhaps I need to use my own container view and 
dynamically alternate UILabels and UITextFields...or subclass UITextView...or 
build a new view type from scratch  Core text?  Other 
suggestions?___

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


Client/Server Design

2010-05-05 Thread Phillip Mills
I have ideas for a number of different applications that share a general 
architecture: use an iPhone as a remote data-collection front end to a Mac app 
that does more complicated processing, or to a general purpose application such 
as a spreadsheet or database, or to a variety of apps that each do their own 
specific processing (*nix style).  The core feature in all of this is a need 
for easy file or document transmission between the systems.

I've read the notorious Technical Note TN2152, iPhone OS does not currently 
provide a direct way for third party developers to transfer data between the 
user's computer and their device, but I assume common workarounds are in 
place.  Obviously I could follow the note's suggestions about rolling my own 
from lower level functions (or GameKit?), however I thought I should ask 
whether there are strategies and libraries that other people have found useful 
for solving similar problems.

I'm specifically not interested in web apps since the solution should work with 
systems that don't have a general-purpose HTTP server 
configured.___

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: Client/Server Design

2010-05-05 Thread Phillip Mills
On 2010-05-05, at 2:24 PM, Jens Alfke wrote:

 While the device is docked the user can use iTunes to (clumsily) transfer 
 files between the Mac filesystem and the app’s Documents folder. 

That seems so basic (without the 'clumsy') that I have trouble believing that 
it hasn't existed forever.

 if connecting to the user’s computer you’ll need a small listener app to run 
 there and handle the data transfer.

That was my fallback position.

 Greg already mentioned BLIP, a high-level messaging protocol, which is 
 implemented in my MYNetwork library for Mac and iPhone:
   http://bitbucket.org/snej/mynetwork/

Thanks to both of you.  I'll take a look at that.  I've now also discovered a 
set of classes called 'PKFileServer' that I want to examine.

___

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


Objects from XML

2009-12-23 Thread Phillip Mills
I'm looking at converting some C++ code to Objective C.  A set of utility 
classes that I'd written use the expat C library to convert XML into an object 
graph.  As I experimented with switching that over to use NSXMLParser instead, 
it dawned on me that I was looking at creating a simple-minded, general-purpose 
XML unmarshaller.

Is there something of the kind already freely available?  If so, would it be 
overkill for handling relatively simple XML?

___

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: Sending a Selector to another Class.

2009-10-21 Thread Phillip Mills

- Message from joshua.garn...@yahoo.co.uk -


but i get a warning in xcode, http://cld.ly/7c4la.
(JGManagedObject is what replaces otherClass)


That one is usually a case of not importing the JGManagedObject header 
or not declaring the class method in that interface.


___

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


Dictionary interface

2009-07-15 Thread Phillip Mills
I've been searching the Cocoa documentation pages on extending and 
interfacing with Apple applications, hoping to find notes related to 
the Dictionary application.  An API that finds words using a 
soundex-type function would be nice.  That, plus a plugin method to add 
a UI item similar to Dictionary and Thesaurus would be ideal.


Should I assume that's not possible, or did I miss something?
___

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: Dictionary interface

2009-07-15 Thread Phillip Mills

- Message from glgue...@amug.org -


You might want to explain exactly what you tried.


Sure.  
http://developer.apple.com/reference/Cocoa/idxAppleApplications-date.html


Since I'm not really interested in spell checking, but rather another 
Dictionary-based service it seemed like a page that describes how 
developers can have their applications interact with and extend these 
Apple applications might be a reasonable starting point.


Thanks for the other reference, though.  I'm not sure it's related, but 
I'll have a look.

___

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