KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Updating the Codewarrior or Visual C++ project inside the Plug-in Wizard
PRODUCT: 4D Plugin Wizard | VERSION: 6.8 | PLATFORM: Mac & Win
Published On: June 27, 2002

There may be times when you need to make some adjustments or updates to a copy of the Codewarrior or Visual C++ project that you now wish the Wizard would produce. The Plug-in Wizard has built-in code to import these changes. Once imported, you can now use your newly updated projects.

If you go to the Design Environment and then to the Explorer, you will want to open the method called "CreatePrivateResources". This method is what is used to import all of the resources, projects, and other files such as the API files into the Plug-in Wizard. You can go to the User Environment and run this method to import in all of the files needed by the Plug-in Wizard, or you can copy and paste the necessary code into your own method and run this from the User Environment.

Let's take a Codewarrior project for example. Say we have made some changes to our Codewarrior project and we want to import this into the Plug-in Wizard. Instead of running the "CreatePrivateResources" method and having to deal with all of the files, we are going to create our own method called "CreateCWResources" and place the following code within:

ALERT("Please locate 4D Plugin.mcp CodeWarrior Project")
$ref:=Open document("";"";Get Pathname )
If (ok=1)
DOCUMENT TO BLOB(document;$blob)
COMPRESS BLOB($blob)
SET RESOURCE("DOCs";51;$blob)
SET RESOURCE NAME("DOCs";51;"4D Plugin.mcp")
End if

Now all we have to do is run this method to load our Codewarrior project instead of having to run "CreatePrivateResources".