[vwnc] setting a package programmatically

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

[vwnc] setting a package programmatically

Steffen Märcker
Hi,

I am working on some code generation and want to set the package where the  
generated code will be stored in. How can I set that destination package  
programmatically? ... or even create one on the fly?

THX,
Steffen
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] setting a package programmatically

Holger Kleinsorgen-4
" file into existing package "

Store.Policies packagePolicy
        forcePackage: (Store.Registry packageNamed: 'GeneratedCodePackage')
        while: [ ... ]

" file into package (created on the fly if it does not exist yet) "
Store.Policies packagePolicy
        forcePackage: (Store.Registry packageNamedOrCreate: 'GeneratedCodePackage')
        while: [  ]

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Steffen Märcker
Gesendet: Mittwoch, 13. Januar 2010 10:24
An: vwnc
Betreff: [vwnc] setting a package programmatically

Hi,

I am working on some code generation and want to set the package where the  
generated code will be stored in. How can I set that destination package  
programmatically? ... or even create one on the fly?

THX,
Steffen
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] setting a package programmatically

Samuel S. Shuster-2
In reply to this post by Steffen Märcker
Steffen:

> I am working on some code generation and want to set the package where the  
> generated code will be stored in. How can I set that destination package  
> programmatically? ... or even create one on the fly?


Two answers to two questions, Last one first:

newPackage := PackageModel named: 'MyPackage'.

Store.Policies packagePolicy
        forcePackage: newPackage
        while: ["GenerateCodeHere"]

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, Store Project
Smalltalk Enables Success -- What Are YOU Using?





_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc