I have recently done something similar for an angular slider. Like Graham the
control responds to the scroll wheel. But as well I allow changing of the value
by holding down the command key when moving the mouse.
Tracking a circular path is much easier if you are not at the same time holding
do
Am I correct to believe there is NO way to use
NSUndoManager.prepareWithInvocationTarget: if your undo method requires a
parameter?
I can use any method I want which has no parameter, but any method with
parameters gets me the error “AnyObject does not have member named…”
I thought about makin
Thanks MIchael. That's what I was afraid of (i.e., that Apple doesn't make this
straightforward). I first looked at BSManagedDocument 2-3 years ago but never
got around to trying it for my original app as I kept hoping Apple would have
an official solution to this problem.
Also thanks to Jens
My understanding is you call [[NSUndoManger
prepareInvokationWithTarget:aTarget] doFoo:foo withBar:bar];
That is, after having registered your target with the preparation message you
can send the returned proxy all the messages your object can handle.
What I'm not sure is how memory management
On May 10, 2015, at 7:07 AM, Charles Jenkins wrote:
> Am I correct to believe there is NO way to use
> NSUndoManager.prepareWithInvocationTarget: if your undo method requires a
> parameter?
>
> I can use any method I want which has no parameter, but any method with
> parameters gets me the er
Hi,
I am observing outlets are nil after the awakeFromNib call in my
viewcontroller which is created from the storyboard.
As per the apple documentation, awakeFromNib will be called after
initialising all the objects and outlets for a view controller from nib.
i hope awakeFromNib is va
I don't know why they are nil, but in general it is quite helpful to
use assertions anywhere you could have made a coding error.
This is, rather than:
void foo: (char*)buf
{
// buf points to a valid C string
...
}
use this:
void foo: (char*)buf
{
assert( buf != NULL );
...
}
On
I would try CloudKit. Its super simple and far simpler than using Dropbox.
Plus using Dropbox you end up with lots of issues going forward that you
don't want to mess with. Different database versions, data that is not
written to disk when you make the copy due to disk caches, and a lot more.
Clou
> On May 10, 2015, at 6:16 AM, davel...@mac.com wrote:
>
> Also thanks to Jens Alfke for his reply about Couchbase Lite
> (http://www.couchbase.com/nosql-databases/couchbase-mobile). I may look into
> it but after skimming the site, I couldn't tell exactly what I would need
> (i.e., would I ne
> On 10 May 2015, at 11:07 pm, Charles Jenkins wrote:
>
> Am I correct to believe there is NO way to use
> NSUndoManager.prepareWithInvocationTarget: if your undo method requires a
> parameter?
No, that’s not correct.
This approach allows you to pass any method signature whatsoever, because
> On 10 May 2015, at 2:38 pm, Steve Mills wrote:
>
> On May 9, 2015, at 23:20:08, Graham Cox wrote:
>>
>> Me too, which is why it does :)
>
> Heh, I didn’t notice that before. One thing I’d suggest: When the knob is set
> to stop on tick marks, the scroll event should take it immediately to
Solved, thanks to Charles Srstka for the example!!!
I wondered why the invocation would work for him but not me. In the example,
Charles marks the method to be invoked “dynamic.” That was the difference. Like
most examples in the docs, NSUndoManager’s invocation example is shown in
obj-c, where
> On 11 May 2015, at 11:05 am, Charles Jenkins wrote:
>
> Here’s my registerUndo function that now works great:
>
> // Document_Undo.swift
It would have been useful to have mentioned that you’re using Swift, saves us
Obj-C guys giving you useless advice. You’re still in the minority you kno
Quite right. I also tend to use the obj-c style to describe method signatures
because the punctuation is cleaner. Looking at my original message, only the
word AnyObject gives a clue I’m using Swift. I’ll try to do better.
—
Charles
On May 10, 2015 at 9:47:41 PM, Graham Cox (graham@bigpon
> On 11 May 2015, at 11:55 am, Charles Jenkins wrote:
>
> only the word AnyObject gives a clue I’m using Swift
Which isn’t really a clue for people (like myself) who haven’t looked at Swift
in any detail and wouldn’t recognise it as “Swiftian”. It could have been an
obscure compiler warning
> On 11 May 2015, at 9:29 am, Graham Cox wrote:
>
>> One thing I’d suggest: When the knob is set to stop on tick marks, the
>> scroll event should take it immediately to the next/prev tick instead of
>> waiting for the float value to get close enough to the next tick value.
>
>
> Yes, that m
On Sun, May 10, 2015, at 11:58 AM, Sasikumar JP wrote:
> Hi,
>
>I am observing outlets are nil after the awakeFromNib call in my
> viewcontroller which is created from the storyboard.
>
> As per the apple documentation, awakeFromNib will be called after
> initialising all the objects and
There was a WWDC video on Responsive Scrolling.
It's not the easiest API to get sophisticated with, but worth it if you have
the time.
The key is in the kinds of event phases you get.
It's all about NSEvent.
You just need to check things within the scrollWheel: method and branch
accordingly.
18 matches
Mail list logo