Presenter Generator. D6 and loading resources

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

Presenter Generator. D6 and loading resources

Tim M
Has anyone tried converting Chris's Presenter Generator in D6?  Or are
there any other tools for generating the presenter code? Like Chris
comments, its seems like such a lot of typing to get something simple
up and running.

I fixed up the menu bits, and how to locate view names in Chris's code
but am stuck on how you instantiate a resource?

generateClassDef

        "Private - CJD 5-8-2001 Generate the class definition, this will add
instance variables for the
                presenters.  We preserve existing variables and will not create
duplicates
                (even from super classes)."

        | ivNames ivStr presenterNames |

        existingIVarNames := targetClass allInstVarNames.
        targetView := (ResourceIdentifier class: targetClass name: self
targetViewName) resource load.  << -----


I get a walkback here as the ResourceIdentifier answers an array (which
DNU load).

Tim


Reply | Threaded
Open this post in threaded view
|

Re: Presenter Generator. D6 and loading resources

Christopher J. Demers
"TimM" <[hidden email]> wrote in message
news:[hidden email]...
> Has anyone tried converting Chris's Presenter Generator in D6?  Or are
> there any other tools for generating the presenter code? Like Chris
> comments, its seems like such a lot of typing to get something simple
> up and running.
...

Yes, I actually have.  I think I have most of it ported and working in D6.
I will put it up on the web when I get home this evening.  I had not posted
it yet because I wanted to test it some more.  Unfortunately I find my self
still mostly working in D5 at my office, so it has been a bit of a challenge
to upgrade my goodies to a version I can't use regularly yet. ;)  I am glad
that it may be of value to you.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Presenter Generator. D6 and loading resources

Christopher J. Demers
In reply to this post by Tim M
"TimM" <[hidden email]> wrote in message
news:[hidden email]...
> Has anyone tried converting Chris's Presenter Generator in D6?  Or are
> there any other tools for generating the presenter code? Like Chris
> comments, its seems like such a lot of typing to get something simple
> up and running.
...

Ok, here it is, sorry it took so long.  I gave it a quick test, and it seems
to work OK.  Let me know if there are any problems.  Download it from the
link bellow.
http://www.cjd77.com/smalltalk/d6/CJDPresenterGenerator.pac

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Presenter Generator. D6 and loading resources

Tim M
Hey - thanks, that seemed to do the trick.

By the way why don't you add:

initialize
        super initialize.

        self addContextMenu.

To the class so that it adds the context menu by default?


Reply | Threaded
Open this post in threaded view
|

Re: Presenter Generator. D6 and loading resources

Christopher J. Demers
"TimM" <[hidden email]> wrote in message
news:[hidden email]...

> Hey - thanks, that seemed to do the trick.
>
> By the way why don't you add:
>
> initialize
> super initialize.
>
> self addContextMenu.
>
> To the class so that it adds the context menu by default?

I had thought about that.  The reason I did not originally do this was that
the approach I used to add the context menu was somewhat experimental in the
D4 version.  I did not want to risk breaking all the class browsers as soon
as someone loaded the package.  As you can see from the dates in the class
comment the package has been around a while.  I think D5 provided a more
standard way to hook into the development UI, and I have been using that
since.  At this point it may be OK for me to add the context menu
automatically.  However, you notice I still call the tool a beta release,
even after a few years. ;)

I think I need to spend a little time with my goodies, polishing them up and
improving the documentation.  If no one can think of a good reason for a
goody to not add its own context menu automatically then I may do that when
I get a chance.  Objections can be voiced here. ;)

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Presenter Generator. D6 and loading resources

Schwab,Wilhelm K
Chris,

> I think I need to spend a little time with my goodies, polishing them up and
> improving the documentation.  If no one can think of a good reason for a
> goody to not add its own context menu automatically then I may do that when
> I get a chance.  Objections can be voiced here. ;)

Just my standard one: I prefer to get code loaded, save, backup, and
then start the extensions.  You will note that my debugger sound effects
extension enables itself by default, but it does one thing, and has an
error trap around that.  Popping a CHB browser context menu is no time
to get a walkback =:0

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]