CJDPresenterGenerator - small fix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CJDPresenterGenerator - small fix

Tim M
Chris -

Every once in a while I poke around with UI's in Dolphin (getting a bit further
each time) - and I like that CJDPresenterGenerator tool that you created
(and updated for D6 a while ago).

There is a small glitch in there - in that when it prompts you to select
a View - if you press Cancel you get a walkback.

The following is a crappy fix (I think there is a better way to this but
it involves reworking your main code a bit).

In #generateClass:viewName:

make the following modification (adding an if to generate the components)

[pgen generateClassDef ifTrue: [
                pgen generateCreateComponents]] ensure: [pgen closeView].

In #generateClassDef  

add the ifNil check after assigning targetView:

targetView := (ResourceIdentifier class: targetClass name: self targetViewName)
loadWithContext: View desktop.
        targetView ifNil: [^false].

.... at the bottom also add:  

^true


I'm sure you can come up with better fixes - but I'd like to see the tool
kept up to date as its one of those missing Dolphin things that should be
in there.

Tim


Reply | Threaded
Open this post in threaded view
|

Re: CJDPresenterGenerator - small fix

Christopher J. Demers
"macta" <[hidden email]> wrote in message
news:[hidden email]...
> Chris -
>
> Every once in a while I poke around with UI's in Dolphin (getting a bit
> further each time) - and I like that CJDPresenterGenerator tool that you
> created (and updated for D6 a while ago).
>
> There is a small glitch in there - in that when it prompts you to select a
> View - if you press Cancel you get a walkback.

Thanks for bringing this to my attention.  I will take a look when I get a
sane moment. ;)

Unfortuantly I am still not fully using D6 at work yet, so I am still not
quite there in terms of full goody support. :(  Hopefully soon....

Chris