How to generate a feature programmatically correctly ...

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

How to generate a feature programmatically correctly ...

Marten Feldtmann-4
I've created lots of source code (from my modelling tool) - also action features - but they are somehow not fully recognized by the system.

I've connected a button click event to one of my actions (in the composition editor) and the result is (during runtime) an instance of AbtEventToActionConnection. That's fine.

The attribute executableAction of that AbtEventToActionConnection  helds an AbtvariableExecutableFeature and the featureName is set, but NOT feature and selector.

In this error case I go to the PublicInterfaceEditor, select the Action tab, select the Action I've programmatically added, press update, force a Save Part and then the stuff is working ...

... until I created the features again programmatically.

Therefore I'm still missing some steps to (I tried Class>>reinitializeInterfaceSpecFromMethod but that did not do the work) make all thinks correctly ... but what steps are missing ?
 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a feature programmatically correctly ...

Richard Sargent
Administrator
On Thursday, October 8, 2015 at 8:33:09 AM UTC-7, Marten Feldtmann wrote:
I've created lots of source code (from my modelling tool) - also action features - but they are somehow not fully recognized by the system.

I've connected a button click event to one of my actions (in the composition editor) and the result is (during runtime) an instance of AbtEventToActionConnection. That's fine.

The attribute executableAction of that AbtEventToActionConnection  helds an AbtvariableExecutableFeature and the featureName is set, but NOT feature and selector.

In this error case I go to the PublicInterfaceEditor, select the Action tab, select the Action I've programmatically added, press update, force a Save Part and then the stuff is working ...

... until I created the features again programmatically.

Therefore I'm still missing some steps to (I tried Class>>reinitializeInterfaceSpecFromMethod but that did not do the work) make all thinks correctly ... but what steps are missing ?

Marten,

There is a pretty substantial step that occurs when you hit Save in the visual editor. This creates a couple of objects are that are stored with the class (library objects). When you generate code, these objects are not created. I don't have any simple examples of doing this correctly. (I have some large work, porting VW window specs to VA, but I don't have time to split that out and write it up. I wish I did.)

The very short summary is that you need to create a #newTopLevelPartBuilder, populate it with your code (including the new feature stuff), then recreate the part builder record. In my work, I did this by generating archival code and then used #recalculatePartBuilderRecordFromArchivalCode:. You can do this more directly, but I don't have notes on that.

These part builder records made sense in 1994, when 60 MHz was a very fast computer. I don't think they make sense now.

 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a feature programmatically correctly ...

Marten Feldtmann-4
Hey,

yes I know that so many people hesitate to use that stuff. I've always used the WBPro stuff for over 15 years now - but I wanted to make now a test project just with CompositionEditor and it was not that bad.

I've to lift my hat for those IBM persons programming this stuff 20 years ago.

The testing application is a REST oriented database application (server is Gemstone) and I created all the API's and the database model in a way to fit the CompositionEditor style and it is now a very fast development cycle. The look and feel could be better - but ok, its just a prototyping project.




--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.