I am new to vb.net and I'm having trouble viewing this class that someone has made.
The link to the class is:
http://www.vbforums.com/attachment.php?attachmentid=86867&d=1323127879
I did the following steps:
1. Create a new project with a form
2. Add the above class
3. Create an object of the class in my form load sub as:
Dim newClass As VisualStudiosTabControl = New VisualStudiosTabControl
But when i try to run it I get a whole bunch of build errors like:
Type 'System.Windows.Forms.Design.ScrollableControlDesigner' is not defined.
and
'Control' is not a member of 'Tab_Control_Example.VisualStudiosTabControl.VisualStudiosTabPage.VisualStudiosTabDesigner'.
Please help me.
Thanks
You are missing many of the parent files and this looks to be designed to be added onto a project. Try to load whiten your solution of your project.
Related
I need to get the Title of a project rather than the name of it. This can be done using the ProjectSummaryInfoEx method for the application object but I'm not sure how to get this line to return the value I need. Without any commands, it simply opens up the Summary info dialog box, and any inputs I provide come back as an invalid argument.
Any help anyone can provide would be greatly appreciated.
I suggest using:
ActiveProject.BuiltinDocumentProperties("Title")
or a property of the Project object such as:
ActiveProject.Name
References: Application object, Project object, BuiltinDocumentProperties
In addition to Rachel's answers, you can also use this:
ActiveProject.Tasks.UniqueID(0).Name
UID zero will always be the project summary task, and the name property will be the title of the project.
I'm relatively new to coding, doing this in a class for school, and I'm getting a new error we've never encountered in class while doing a project the teacher has given us to do on our own without step-by-step help from him.
In Application.Designer.vb I am getting the following error.
'form' is a type in 'project' and cannot be used as an expression.
The line of code I'm getting this from is:
Me.Mainform = Global.Project.Form
What's causing this and how do I go about fixing it.
You have created something (probably a form) that has a name of Form ... change the name of your form to something like "myform"
Is it possible to add to a CustomMboSet in Maximo using scripting? I am writing a custom application using a custom object called TIMESHEET. As part of the application I am writing a (Jython) script that needs to dynamically build up an MboSet (a set of TIMESHEETs). The code retrieves an existing CustomMboSet and attempts to add elements to it. It works when using an out of box MboSet, but when I try to run the same code on a custom MboSet it does not seem to work. No error is thrown, but code below the offending line is not run.
In other words, this works (LABTRANS is an out of box MBO):
myMboSet = mbo.getMboSet("LABTRANS")
newMbo = myMboSet.add()
# Set attributes on newMbo, everything is happy
But this does not (TIMESHEET is a custom MBO):
myMboSet = mbo.getMboSet("TIMESHEET")
newMbo = myMboSet.add()
# Code does not execute after the above line
Anyone have any insight as to why I am seeing this behavior? Does the Maximo scripting framework simply not support the dynamic building up of CustomMboSets? Any help is appreciated. Thanks.
You need to make sure that the relationship exists between the Current MBO and the Custom MBO in the database configuration otherwise it will not work.
Alternatively you can use the following code to create an new mboSet on the fly:
timeSheetMboSet = mxServer.getMboSet("TIMESHEET", userInfo)
mbo.getMboSet(RELATIONSHIPNAME).
LABTRANS and TIMESHEET must be the relationship names to the object in auto script.
If you want to get/add records in any object, use
mxServer.getMboSet(OBJECTNAME, userInfo)
A bit more explanation. You can create your own custom relationship from within your automation script. The trick is to make sure it's not already existing. That's why I use a dollar sign for mine.
variable = mbo.getMboSet(tempRelationshipName,Object,where clause)
previousPhaseSet = mbo.getMboSet("$wophasetranstemp1", "exitdate is null")
This is really annoying...and I know it is something extremely simple...
1. I create a new Dynamic Data project.
2. I add a LINQ-to-SQL class and drag and drop some tables onto the class.
3. I open the global.asax.vb and uncomment the line:
DefaultModel.RegisterContext(GetType(YourDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True})
I remove YourDataContext and replace it with the DataContext from my LINQ-to-SQL class:
DefaultModel.RegisterContext(GetType(NorthwindDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True})
I then try to debug/build/etc. and receive the following error:
Type 'NorthwindDataContext' is not defined
Why is it not defined? It seems like its not recognizing I created the DBML file.
This is a very strange issue and I am still not sure that I have entirely fixed the issue. But, here is what I think I have learned:
1. If you are creating a New Project in VS2010 you must place the LINQ-to-SQL DBML file in the root project directory.
2. If you are creating a new Web Site in VS2010 you must place the LINQ-to-SQL DBML file in a newly created App_Code directory.
3. If you place it in the wrong place, scrap the project and start over - it doesn't seem to work even if you move the files to the correct location or recreate them in the correct location.
Dave.
Does your project compile? I am guessing you are missing the namespace to your data context. Something like this:
model.RegisterContext(typeof(MyApp.MyNamespace.NorthwindDataContext),
new ContextConfiguration() { ScaffoldAllTables = true });
I am following an article that explains how to use the ICustomAttributeDataHandler class.
I am creating a custom column for the inbox screen, but the problem is that the value I set for my custom attribute is not being reflected on the screen.
As a test I am changing the task name to "whoKnows". But this code is not effecting what is output on the screen:
ICustomAttributeRecordSet.setCustomAttributeValue(i, "taskName", "whoKnows");
(I am able to print debug lines from my custom class when the inbox is viewed, so I know my code is being run.)
Someone on the comments of that article wrote:
the user must call the
"setCustomAttributesInQuery() method
on the dataprovider passing in a
string array of the custom attributes
...what does that meen? Could this be my problem?
thanks.
To be honest, I have already used Webtop, but just as an user. I found a post in the dm developer discussion group that can be useful, though:
For creating a custom column in the
doclist you dont need to go through
this complex procedures. You can use
custom attribute datahandlers for
this.
First in your object list component xml file add your custom column
definition in the "columns" tag. You
can even add static columns instead of
the documentum attributes.
Now create a class which implements the ICustomAttributeDataHandler.
Implement the default the methods getRequiredAttributes and the getData
function.
In getRequiredAttributes add attributes of the object that you are
looking for.
In your getdata method retrieve each row and then based on the
attribute that you see, just set the
value that you want to. 6) Finally
define your class in the app.xml file
There is a section in WDK developement
guide regarding
ICustomAttribuetDataHandlers. Look for
the topic named "Adding custom
attributes to a datagrid".
I'm not sure if this is the final solution, but I hope it helps!
To answer you question about setCustomAttributesInQuery()
every datagrid in WDK is backed by an underlying data provider. You can get this proivder by using the following code.
Datagrid datagrid = (Datagrid)getControl("doclist_grid",com.documentum.web.form.control.databound.Datagrid.class);
DataProvider dp = datagrid.getDataProvider();
Once you've done that, you can call
dp.setCustomAttributesInQuery(myArr);
I'm not actually sure if this is part of the solution to your problem, but you could try this and see where it gets you.
You have to configure the inbox component.
if using classic view, go to inboxlist component and add your custom attribute.
<column>
<attribute>CustomAttributeName</attribute>
<label>Custom Attribute Label</label>
<visible>true</visible>
</column>
Your custom attribute has to be in a custom type that is a sub type of dmi_queue_item, because inboxlist shows only dmi_queue_item objects.
Hope this helps,
Regards,
Tejas.
This may be a non-issue, but based on your code, I can't tell if you're doing this:
ICustomAttributeRecordSet.setCustomAttributeValue(i, "taskName", "whoKnows");
or this:
ICustomAttributeRecordSet rs;
rs.setCustomAttributeValue(i, "taskName", "whoKnows");
You should be calling the setCustomAttributeValue method on the rs object instance, not on the interface.