vb6: error Class xxx of control xxx was not a loaded control class when try to use in another project - user-controls

In a vb6 project, i created an usercontrol and I put in a form, when I try to use that form (with my control) in another project, the IDE give me the error: Class xxx of control xxx was not a loaded control class.
I researched in web but i dont found a solution.
Thank you.

First you need to compile the usercontrol and then reference the usercontrol from the second project.

Related

Adding UIWebView to second (not first) Storyboard view controller

Getting started with xCode 4.6.3 and I'm running into a hiccup.
I've built a simple app using the UIWebView to display a local HTML file and it's contents. I used that to debug any issues with the HTML and/or image displays and I'm all set.
Now I need to recreate that within a larger project I've built with storyboards for all my navigations between multiple view controllers. My issue comes when I'm trying to control-click drag from the WebView into the ViewController.h code below the #interface like many tutorials show, and that worked fine within my smaller single view controller app. It won't do it. I know I'm missing something obvious here. Am I going to have the set up these screens (I have multiple ones to do this same way) as separate xib files and add them into my main project?
Thanks for any help and clarification.
-Chris
You can create a class called for example myWebViewController and in Interface builder add a UIWebView to it. The control+drag to the header file will work.
Every time you want a UIViewController that has a browser in it, define its class as myWebViewController in Interface Builder.
Try not to repeat code. If you see UIViewControllers or any other UIView...that do the same thing, you can group them into a class that you use over and over.

In VS2012 how do I filter the Object Browser to display objects in my Project?

In VS2012 how do I filter the Object Browser to display objects accessible from my Project?
As far as I can make out from the UI it can be configured to show either
1) Everything installed on the machine.
2) A manually selected subset of everything installed on the machine.
3) Everything referenced by the entire Solution.
So where is the most useful view of all, namely the view of everything referenced by the current Project?
The MSDN even states that you can use it to view what can be referenced by the Project
http://msdn.microsoft.com/en-us/library/vstudio/exy1facf%28v=vs.100%29.aspx
"The Object Browser lets you select and examine the namespaces, classes, methods, and other programming symbols available for use in your project."
But I can't see how to do it.
You can use the Class View (Ctrl + Shift + C) to see the references available per project.
Look in the Projects References section of each project in the Class View.
Example: Class Library in Solution
Here, I am looking at the System.Collections classes.
Example: WPF Project in Solution
Here I am looking a the System.Diagnostics classes
To view the class in Object Browser, right click and choose, "Browse Definition".

xPages Ext Lib ViewController

I've found this interesting bit of code link which implements a ViewController in the the Extension Library.
How can a programmer access this class from a managed bean. I have the Extension Library (8.5.2) installed. But com.ibm.xsp.extlib.data.ViewController can't be resolved. I may be in over my head here, but willing to take a plunge.
Thanks,
-- Jeff
Right click on Project in Java perspective/Package Explorer view. Use Build Path\Configure Build Path... menu. Use fourth tab Order and Export. Tick Plug-in Dependencies item. Now you will get access to ExtLib classes in Java code.
Unfortunately, class you found sources for is not part of the ExtLib distribution (package com.ibm.xsp.extlib.group), so you won't find it.

How does MonoTouch autogenerate XIB code behind?

I'm a C# programmer dabbling in a bit of iPhone development using MonoTouch.
I add a new View Interface Definition to my project and double click to open it up in Interface Builder. I add a UIButton. I save the file, and inspect the xib.designer.cs file, and I can see no reference to the new button.
I downloaded the code from http://monotouchexamples.com/ where I could see an example of autogenerated code behind :
[MonoTouch.Foundation.Connect("infoButton")]
private MonoTouch.UIKit.UIButton infoButton {
get {
return ((MonoTouch.UIKit.UIButton)(this.GetNativeField("infoButton")));
}
set {
this.SetNativeField("infoButton", value);
}
}
I opened up MainWindow.xib in interface builder. I notice a few differences. File's Owner is of type UIApplication instead of NSObject. What is the importance of this? There is an App Delegate object of type AppDelegate. I can't add an AppDelegate to my own view, or at least I can't find it in the Library. Do I need to add one? I can see that the existing controls on MainWindow.xib have Referencing Outlets to the App Delegate. I add a new button and I want to hook it up. When I click and drag a New Referencing Outlet to the App Delegate a context menu appears that lists the existing controls. How do I add a new element to this list, or where does this list come from?
I've been spoilt by the Visual Studio world where I just dump a button on a form and start writing code for the click event. Could someone provide some pointers about the steps needed to get this working on MonoTouch?
Thanks,
Patrick
Adding a button by itself is not enough. The button is not accessible outside the Interface Builder. You need add an Outlet, and connect the button with the outlet in Interface Builder.
Remember: Outlets are the members in your Controller class that get a reference to the controls, you can't just access the controls without them.
As Dave says, you need to add an outlet to your controller class, and connect your button to that outlet, before any auto-generated code will appear. This caught me out too initially.
You choose your controller class in the Interface Builder library window, choose 'outlets' in the bottom part of the library, and add an outlet there. You then need to select your button, choose the connections tab of the inspector window, and drag from the "New referencing outlet" circle over to your controller class. Interface Builder will then prompt you to choose an outlet to connect to. Then when you save, you should get the auto-generated code appear in the .xib.designer.cs file, and then you should be able to reference your button via that outlet variable in your .xib.cs file.
It sounds like the project I created is out of date - I remember there were quite a few changes around how the generated buttons are created in the designer file. I will update the project soon for you.
As Dave said, to get the code to be auto generated you need to add an outlet with Interface Builder. There should be an example on this video here - http://bit.ly/aWoItN but the server seems to be down at the moment.
Hope this helps,
ChrisNTR

How do I hide an inherited __published property in the derived class in a VCL component?

I have created a new VCL component based on an existing VCL component. What I want to do now is set the Password and Username properties from an ini file instead of the property inspector.
Robert Dunn Link
I read on the delphi forum above you cannot unpublish a property and that the only workaround is to redeclare the property as read-only. I tried this but it all it does is make the property read only and grayed out in the object inspector. While this could work I would prefer if the property wasn't visible at all.
__property System::UnicodeString Password = {read=FPassword};
Thanks in advance for any help or links to c++ VCL component writing tutorials. I am using CB2010
Look up DesignIntf.UnlistPublishedProperty. See this tread.
The language as defined will not allow you to hide published properties.
I would make use of aggregation instead of inheritance i.e. Create a new VCL component that delegates its methods to the existing component, you then have full control over what properties to publish.
I know this is an old question, but there is still no good documentation on how to do this. I ended up here myself trying to figure this out and thought that others ending up here for the same reason deserve an explanation on how to do this.
In the writing moment, I'm using C++ Builder 10.4 (Sydney).
There is a package called designide that you need to add as a reference to your project.
In your package project, right click on "Requires" and select "Add Reference..."
Click the "Browse" button and go to your install folder look for designide.bpi in lib\win32\release or lib\win64\release depending on your target.
The include path must also be updated so it can find the header file.
Right click on your package project and select "Options"
Select "Shared Options"
For convenience, set "Target" to "All configurations - All platforms".
Select "Include path" and click on the "..." to edit the value.
Add the line $(BDSINCLUDE)\windows\vcl\design
Click the Ok button and then save the changes.
In your code add #include <DesignIntf.hpp> and use the function UnlistPublishedProperty() to unpublish properties in your package function Register().
void __fastcall PACKAGE Register() {
// Register components
TComponentClass classes[1] = {__classid(TMyVCLClass)};
RegisterComponents(L"MyComponent", classes, 0);
// Unpublish properties
UnlistPublishedProperty(__classid(TMyVCLClass),L"AlignWithMargins");
UnlistPublishedProperty(__classid(TMyVCLClass),L"Margins");
}

Resources