zallanx <zal...@gmail.com> Oct 03 08:04PM -0700
(copypasta from my SO post.. where no one has answered so far :*( )
I am having a terrible time trying to pass a bit of information from my
GraphingCalcView to myGraphingCalcViewController -_-
Basically, I can know about the width of my screen from my GraphingCalcView using
the functionviewSize = self.bounds.size.width / scale .. pretty simple
stuff. I'd like to pass viewSize*from the View to my Controller* (
GraphingCalcViewController), so that it can do a simple transformation (for
example, do viewSize + 1), and pass it back to to the View.
I have (and believe) that I set up the whole protocal/datSource/delegation
thing correct (I really just followed the example of "Happiness" presented
in the lecture), so I won't paste the details.
I have two equations in my protocol listed in the View's header file..maybe
something is wrong here:
-(float) calcResult: (GraphingView *) sender;
-(void) passingVariable: (float) variable;
Basically, in my *View*, I call the @optional to pass viewSize: [self.dataSource
passingVariable:viewSize] , then in my *Controller*, I set viewSize to a
Model property calledself.result so that: self.result = viewSize, and then
return the model property:
Now, in my *View*, when I assign a float to [self.dataSource
calcResult:self], I always get a 0, instead of any value that I passed to
it.. X_X.. I was wondering if my whole concept about passing stuff from
View to the Controller is correct, and what I am doing wrong.. Thanks for
Asad Khan <asadkh...@gmail.com> Oct 04 04:41PM +0500
Can you post link to your SO post its very hard to read all text here.
You received this message because you are subscribed to the Google Group iphone-appdev-auditors.--
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "iPhone Application Development Auditors" group.
To post to this group, send email to iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-aud...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphone-appdev-auditors?hl=en.