Hi.
I deploy programs a lot these days. I'm in a termproject + Homework summit season. One of my program has a openning splash that notes that warns not to do some GUI operation may fall into bug. I would better fix it rather than warning it, but I running out of time so. Problem is that, Splash expires before the complition of deployment process. x-) PS: I've learned that considering reusability is one big burden of OOP. Reusablity makes gives light to users while shadow to developers. Do you agree? Hwa Jong Oh |
Hwa Jong Oh wrote:
> PS: I've learned that considering reusability is one big burden of OOP. > Reusablity makes gives light to users while shadow to developers. Do you > agree? I do. I think it's quite widely recognised that a potential problem for any OO developer is getting seduced into thinking *too much* about future uses of the code that you are writing, and making unnecessary work for yourself. I have several times though of some neat little program or feature that I could use, then generalised it as I realised how I could put in all sorts of extra flexibility. In the end the idea grew to to be too complicated to implement without spending much longer on it than the need could justify. So I never did write the original neat little program. Perhaps you recognise the symptoms ? One of the skills of an OO programmer seems to be knowing where to stop. I don't claim to have developed this skill yet myself. I am getting there, though. One thing that has helped me was reading about XP. It's not that I find XP particularly attractive in itself, but just reading about it, and knowing that people were making it work, has given me more confidence to just say "stop". I don't have the XP URL handy, but probably something like www.xp.org or www.extremeprogramming.org. There's also Kent Beck's new book on it -- eXtreme Programming eXPlained. Martin Fowler's "Refactoring" book is of central importance too. (BTW, I'm not suggesting that it's bad to design for re-use, just that it's easy to overdo it.) > Hwa Jong Oh |
In reply to this post by Howard Oh
Hwa Jong Oh,
> Problem is that, > Splash expires before the complition of deployment process. I'm not quite sure what you mean here. You have an application that shows a splash when it start but you want the splash to be visible for longer. Is that right? If so than you can use #showTimed: and specify the delay - as in DolphinSplash new showTimed: (Delay forSeconds: 10) If you want the splash to be displayed for the duration of some start up operation then you can fork the splash. I'm using #factorial to provide a delay here, you would perform your lengthy initialisation. [splash := DolphinSplash new. splash showTimed: (Delay forSeconds: 100). 25000 factorial. splash close] fork I'm still not sure I've answered your question though - ask again if not. Ian |
Ian,
I found out that you are not mentioning about deployment at all in your reply, and that might be a hint for your misunderstanding. The problem I am asking for a help is induced by Splash application and Deployment but not by alone. As written in Education Center, there are three ways to deploy an application. Instance, Package-instance, Package-class are them as you know far well. As I mean deployment is the first and the second one. For both cases, instance of an application is required to be openned in the image at the moment of deployment. I open an application and then call deployment wizard, and go though the steps of it. And the step takes time. If that passing time is longer than the Splash show time, then the application won't have the Splash in its stripped image. Also the contrary case is an application with an openning dialog prompts by calling it at #onViewOpen of the application view. In this case, deployed will be only the dialog with all the other views stripped. Ian, do you copy? :-) PS: It's nice to know that you _do_ make mistake. Hwa Jong Oh |
Hwa Jong,
Trying to deploy with the splash screen already open is just not going to work. The simplest way to deploy an application with a splash screen is to use class based deployment. This only involves adding one extra class (a subclass of RuntimeSessionManager) to your application. Then all you need to do is override #showSplash to include a call to your splash screen in the manner which Ian suggested: MySplash new showTimed: (Delay forSeconds: 10). Actually, the #showSplash method is available only in Dolphin 4.0. As I think you are still on Dolphin 3 then you'll have to override #tertiaryStartup and do the same thing (but also include a call to super). If you really must use instance based deployment then just hang off the image startup event. i.e. Create a class side method: MyApp class>>showSplash MySplash new showTimed: (Delay forSeconds: 10). And then, before deployment, evaluate: SessionManager current when: #sessionStarted send: #showSplash to: MyApp. Best regards, Andy Bower Dolphin Support http://www.object-arts.com --- Visit the Dolphin Smalltalk Wiki Web http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm --- > I found out that you are not mentioning about deployment at all in your > reply, and that > might be a hint for your misunderstanding. The problem I am asking for a > help is > induced by Splash application and Deployment but not by alone. > > As written in Education Center, there are three ways to deploy an > application. > Instance, Package-instance, Package-class are them as you know far well. > As I mean deployment is the first and the second one. For both cases, > instance of an > application is required to be openned in the image at the moment of > deployment. > I open an application and then call deployment wizard, and go though the > steps of it. > And the step takes time. If that passing time is longer than the Splash > time, then > the application won't have the Splash in its stripped image. > > Also the contrary case is an application with an openning dialog prompts by > calling > it at #onViewOpen of the application view. In this case, deployed will be > only the dialog > with all the other views stripped. > > Ian, do you copy? :-) > PS: It's nice to know that you _do_ make mistake. > > Hwa Jong Oh > > > |
In reply to this post by Howard Oh
Hwa Jong Oh,
> I open an application and then call deployment wizard, and go though the > steps of it. > And the step takes time. If that passing time is longer than the Splash show > time, then > the application won't have the Splash in its stripped image. OK, got you now - but I still can't help much. I gave up using instance based deployment, one reason being the difficulty in detecting when the app was being opened. I found that I often needed to do something at the start up stage - read a file or even show a splash screen!! - and that's much easier with class based deployment and #onViewOpened or whatever. I tend to use class based even when it's not really needed as the overhead of adding one class with one method is no great disadvantage. NB: I haven't looked too hard at instance base deployment since the early Dolphin version of it (V1?) so if OA have added bits that overcome the above then I apologise to them <g> > PS: It's nice to know that you _do_ make mistake. If I give the impression that I don't make mistakes then I had better stop posting here as "you just couldn't be more wrong" [1]. The big advantage about Usenet is that you can have a think about, and check, what you written before making it public. I just take full advantage of that <g> Ian [1] to quote Emerson Lake & Palmer |
In reply to this post by Andy Bower
Andy -
> Trying to deploy with the splash screen already open is just not going to > work. The simplest way to deploy an application with a splash screen is to > use class based deployment. This only involves adding one extra class (a > subclass of RuntimeSessionManager) to your application. Then all you need to > do is override #showSplash to include a call to your splash screen in the > manner which Ian suggested: > > MySplash new showTimed: (Delay forSeconds: 10). > > Actually, the #showSplash method is available only in Dolphin 4.0. Thanks, this also solves my problem of getting the Splash to splash for a specific duration in 4.0. Best wishes, Ken |
Free forum by Nabble | Edit this page |