When a view with CardContainer is opened, the visible card is the one
that was left opened (selected) in the ViewComposer. Suppose I want to change that after the view has been saved. I open the ViewComposer and select some other card. The ViewComposer change marker does not show any change as I think it should. Regards, Daniel |
You have to save the view again.
But you can change the selected card inside a Presenter. MyPresenter onViewOpened super onViewOpened. (view viewNamed: 'cardContainer') nextCard. Or you can use: (view viewNamed: 'cardContainer') layoutManager showCardWithArrangement: 'Method source'. Regards Bruno --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 |
"Bruno Buzzi Brasesco" <[hidden email]> wrote in message news:<[hidden email]>...
> You have to save the view again. Yes, I know and I do that. It is just that it seems to me that the change marker should show the fact that something has changed and the View must be saved. I know it is cosmetic but would love to see it fixed up. I think one should register to the event #currentCardChanged that the card container triggers and send setModified to the ViewComposer. I tried to do it myself but failed to avoid a horrible hack, so I'll leave it to the will of experts ;o) Regards, Daniel |
Daniel,
> I know it is cosmetic but would love to see it fixed up. I have to say that I find that feature slightly annoying. It's not a great problem but I can certainly remember times where I have had to reopen the VC and re-edit a view because I have left the wrong tab selected when the view was saved. I was wondering if an aspect of CardContainer named something like #initialSelectionIndex might be a better idea. You would select the index of the card to be initially displayed and it then wouldn't matter which tab was selected when the view was saved. Just a thought.... -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
Ian Bartholomew wrote:
> I have to say that I find that feature slightly annoying. A little bit more than "slightly" IMO. Not that it's the end of the world, even so, but... > I was wondering if an aspect of CardContainer named something like > #initialSelectionIndex might be a better idea. Perhaps it'd be worth generalising to a universal "has initial focus" attribute of all Views (rather than defaulting to the "first" subview as is currently the case). I admit that I've not tried to work out the details. -- chris |
In reply to this post by Ian Bartholomew-19
"Ian Bartholomew" <[hidden email]> wrote in message
news:ECwfc.33200$Y%[hidden email]... > Daniel, > > > I know it is cosmetic but would love to see it fixed up. > > I have to say that I find that feature slightly annoying. It's not a great > problem but I can certainly remember times where I have had to reopen the VC > and re-edit a view because I have left the wrong tab selected when the view > was saved. Yes, I am equally annoyed by this. It can be a pain particularly when I am making that one last little change that does not turn out to really be the last change. ;) > I was wondering if an aspect of CardContainer named something like > #initialSelectionIndex might be a better idea. You would select the index > of the card to be initially displayed and it then wouldn't matter which tab > was selected when the view was saved. I think that would be useful. Chris |
In reply to this post by Chris Uppal-3
Chris ,
> Perhaps it'd be worth generalising to a universal "has initial focus" > attribute of all Views (rather than defaulting to the "first" subview > as is currently the case). I admit that I've not tried to work out > the details. I'm not sure that be enough though. For example, if you had a Shell containing a number of widgets, including a TabView, you might end up needing two objects (one of the widgets and the appropriate tab view) to have the "has initial focus" attribute set. It's quite a good idea but I think you'd have to end up with two attributes, a general one and another one specific to TabViews. -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
Ian Bartholomew wrote:
> [...] I > think you'd have to end up with two attributes, a general one and another > one specific to TabViews. I'm afraid you're right. -- chris |
Free forum by Nabble | Edit this page |