Page 1 of 1

PostPosted: Fri Jul 26, 2002 8:50 pm
by design4use
I have a code design for Orbworks:
I wondering where I should put code that mainly consists of reusable function that I want to call from anywhere: e.g from UIForms, UIGadgets that happen to be in the project. Pascal/Basic have the notion of a module that can be added to the project and that just contains of shared code... does something similar exist in OrbWorks or where should I put all this 'global' code?

PostPosted: Sun Jul 28, 2002 1:42 pm
by iboehme
though I know that it?Ǭ¥s not a good C-style (I also come from Delphi ;-) I include gloabal functions via

include "\\..\\general\\lib.oc"

at the top of the app (in the app module. Because in Orbforms C all files are compiled as if they were one single file the functions, objects a.s.o. in lib.oc are knows in all parts and all forms. But if you do so, don?Ǭ¥t include the lib in your project!

But you can also define a prototype as described in the helpfile. So the compiler knows, that this function will be declared below and you can call it anywhere (after the prototype). In this case you can add the module to your project.

If you speak german, have a look at , the website of the first german book on Orbforms Designer