Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Now, I have two more fields that are in the dataSource now. The number of signups and the capacity of the area and I want to bring those in. Those are not going to wind up being displayed, I think, but I do want to see them for debugging purposes. So, let me come in to the library and I'll just drag a text field over here and this is going to contain, move this over a little bit. This will be the number of signups. I want the text there and then I want another field that I can put over here and I'll use this for the capacity. So, with this, I will be able to see if I'm bringing in the data properly. I don't worry about renaming those because those fields are not gonna wind up being there when I'm done, so I'll save this again from the keyboard, run it, select the library and I'm brining in the values. So I don't have to worry about that for now. What I want to do, though, is I want to put an indicator somewhere down here that will tell me if there is availability for this particular event. Not just the number of available seats but where they are as a proportion and one of the things that I can do is to use the transformation in order to convert data so this is the number of signups and this is the capacity and the way in which I do a transformation, you've seen that once before, but now let's take a look at it more seriously. We'll look at it in the Inspector and it's going to show up over here in the bindings and this field is bound to the capacity and you can see there's a value transformer that can be used on this field and what a value transformer is is something that will take whatever that value is and modify it so that when Dashcode is retrieving value from that field, it knows where to go because it's bound to the grid, it's bound to selection.capacity which is right down here but before it returns it to the app, it's going to do something to it and typical transformations are built-in so I can select from any of these and you saw once before the truncated one where I can take something and bring it down to a certain number of characters with 3 dots at the end. That's a standard transformation. There are other transformations available here that I can use as is or build on them, but in this case, what I want to do is a very specific transformation. I want to convert the number of seats for which people have signed up to a percentage of the capacity. That's a fairly sophisticated transformation, so, let's go ahead and do that and create the, we'll call it the percent capacity that has been generated and put that into the interface.
| Course: | Developing iPhone Web Apps |
| Author: | Jesse Feiler |
| SKU: | 34075 |
| ISBN: | 1-935320-89-0 |
| Release Date: | 2009-12-31 |
| Duration: | 8 hrs / 103 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |