Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Common code for runtime and designtime use


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Sep 17, 2014 10:06 AM Last Post By: John Farmer
John Farmer

Posts: 22
Registered: 11/12/10
Common code for runtime and designtime use  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 9, 2014 6:42 AM
Hi,

I have a project that contains a design-time and run-time package and have a number of functions that are common to both. I have created a module that contains the common functions and added it to the run-time package because the design-time package Requires the run-time package. Both packages now reference a function from this common module and both compile successfully. The run-time package builds OK but the design-time package does not with an "Unresolved external" error.

The module within the design-time package that makes the reference is a property editor and all my property editors are stored in a directory separate from that of the run-time code.

What is the correct way to manage shared functions between the run-time and design-time packages?

Regards
FarmerJo
John Farmer

Posts: 22
Registered: 11/12/10
Re: Common code for runtime and designtime use  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 10, 2014 9:48 AM   in response to: John Farmer in response to: John Farmer
Sorted.

The reason for the liner error was that I did not mark the function with PACKAGE.

Regards
FarmerJo
John Farmer

Posts: 22
Registered: 11/12/10
Re: Common code for runtime and designtime use  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 16, 2014 9:32 AM   in response to: John Farmer in response to: John Farmer
Thought this one was resolved but still no joy.

I have a number of functions that are common to both the runtime and design-time packages for my component suite.

What I would like to do is create a library or package containing the common code which can then be called either by a component in the runtime package or by a property editor which also uses the same code.

Any suggestions would be appreciated on how to do this.

Regards
FarmerJo
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: Common code for runtime and designtime use [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 16, 2014 11:49 AM   in response to: John Farmer in response to: John Farmer
John Farmer wrote:
Thought this one was resolved but still no joy.

I have a number of functions that are common to both the runtime and design-time packages for my component suite.

What I would like to do is create a library or package containing the common code which can then be called either by a component in the runtime package or by a property editor which also uses the same code.

Any suggestions would be appreciated on how to do this.

Regards
FarmerJo

Just put it in the runtime package. The design time package requires the runtime
package and can use it. Basically the only code that goes in the design time
package is code only used at design time. If it is used at runtime or design
time then it goes in your run time package.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
John Farmer

Posts: 22
Registered: 11/12/10
Re: Common code for runtime and designtime use [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2014 10:06 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Hi Jeff,

Many thanks for the reply. As you suggested was what I tried initially but could not get a design-time property editor to link correctly. I think I must have forgotten to have used my component namespace in the header file of my module containing the common code. It works now as expected.

Regards
FarmerJo
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02