Re: Programmatically loading an NSImage via other field
Re: Programmatically loading an NSImage via other field
- Subject: Re: Programmatically loading an NSImage via other field
- From: email@hidden
- Date: Thu, 04 Dec 2008 12:03:17 -0500
Namaste!
OK, I've been playing around with this for too long now...
NOTHING gets called when text in a control is set via code or a
mechanism other than strict keyboard/mouse entry by the user from what
I can determine. This, in a word, is not good.
I've set up an observer, delegates, and all that, per previous posts
and only when keys are actually pressed do the delegate methods get
called.
Also, I've noticed that when the record is moved (either next or
previous), there is a "buffer" time between when code executes and the
interface gets changed.
Thus:
- (IBAction)movePrevious:(id)sender
{
[tblPattern selectPrevious:self];
[btnPrevious setEnabled:[tblPattern canSelectPrevious]];
[self pushPicture];
}
Doesn't work. The Apple dox state the reason the move action is moved
to another process is to give the error mechanism a way to respond.
As a consequence, nothing changes and the code executes, then the
stuff changes. What happens is the previous image gets loaded as the
current image, despite what the textfield says.
Not good.
For a simple "OnChange" thing, this is absolutely frustrating (and has
resulted in quite a bit of code).
Bottom line is, it looks like I need some way to "see" changes that
were made to either the underlying Cell (thinking along the lines of
display changes) or some other route to take this.
I have three scenarios under which the image needs to get pushed:
1. When selected from a file.
2. On Window display - first record is displayed.
3. When records are scrolled (Move Next/Move Previous).
I've solved #1, though I don't like having to "manually" push the
image (meaning I call the pushPicture routine). 2 & 3 are still
unsolved at this point.
Any further thoughts??? Anyone else only keep paths to images and
dynamically load from that data? Storing the pictures in the data
structure is not going to happen as they'll take up far too much space
and suck resources.
Thanks for all the help so far!
Peace, Love, and Light,
/s/ Jon C. Munson II
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden