Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

Announcing SPDisposeCheck tool for SharePoint Developers 
Thursday, November 13, 2008, 09:11 - SharePoint
Posted by Administrator
the SPSite class and SPWeb class objects, are created as managed objects. However, these objects use unmanaged code and memory to perform the majority of their work.
The managed part of the object is small; the unmanaged part of the object is much larger.
Because the smaller managed part of the object does not put memory pressure on the garbage collector, the garbage collector does not release the object from memory in a timely manner.
The object's use of a large amount of unmanaged memory can cause some of the unusual behaviors described earlier.
Calling applications that work with IDisposable objects in Windows SharePoint Services must dispose of the objects when the applications finish using them. You should not rely on the garbage collector to release them from memory automatically

Best practice:

Dispose method
using clause
try, catch, and finally blocks


More information can be found at the SharePoint Best Practice Site

Microsoft SharePoint Team announced yesterday that
Microsoft wants to help developers build better quality code that manages available memory better. We are now building a console tool that will help to evaluate customer code against the guidance that is provided. The tool, called SPDisposeCheck, will open your custom compiled assemblies recursively and validate them against the Microsoft published guidance. The output from the tool will contain messages that may indicate the SPSite and SPWeb Dispose() methods guidance are not being followed in the customers source code. While these messages need expert evaluation in order to determine if the software is not performing properly, in some cases just running the tool on your custom code can lead you to simple fixes that improve the quality and performance of custom code on SharePoint.

This tool is planned for release during the coming North American Winter.

More information can be found at the Microsoft SharePoint Team Blog
add comment ( 3 views )   |  permalink   |   ( 2.9 / 122 )
Create an InfoPath form containing lookup functionality to a SharePoint List 
Thursday, November 6, 2008, 17:23 - SharePoint
Posted by Administrator
This is a guide for setting up an InfoPath form that will fill in other textboxes with data retrieved from a SharePoint list or library, this form will be published to a SharePoint form library in order to provide end users an easy way to fill in a form.

This solution is created by using InfoPath 2007 and MOSS 2007. This is a document created in order to help other SharePoint developers while they are creating InfoPath forms that need the same functionality.

CONTENT

1 Introduction
2 Auto Fill in Infopath formulier with ID from sharepoint list
3 Add a data connection that points to your SharePoint list
4 Add a rule to fill in the other controls
5 Finished

klik here to open the document


add comment ( 1 view )   |  permalink   |  related link   |   ( 2.9 / 100 )
How can I automate the update DLL update to the Global Assembly Cache?  
Wednesday, November 5, 2008, 22:31 - SharePoint
Posted by Administrator
First of all your dll needs to be signed.
Create a Batch file that contains these actions:

- remove previous version by using gacutil /u <assembly-name>
- add the DLL to the GAC using gacutil.exe
- copy the pdb file to this location %systemroot%\assembly\gac_msil\<assembly-name>\<version>\<assembly-name>.pdb
- IISRESET /NOFORCE
- open your SharePoint site
- attach your VS project to the w3wp.exe
- perform action and check if breakpoint get's hit.

success!
add comment   |  permalink   |  related link   |   ( 3 / 86 )
new .NET logo 
Tuesday, October 28, 2008, 09:40 - .NET
Posted by Administrator

add comment ( 2 views )   |  permalink   |  related link   |   ( 3 / 103 )
Custom_AddDocLibMenuItems - ctx and m objects properties 
Monday, October 13, 2008, 08:54
Posted by Administrator

Ever wondered what the ctx object properties are when creating a custom context menu?

here they are:

-----ctx---------

0: ctx[listBaseType] : 1

1: ctx[listTemplate] : 101

2: ctx[listName] : {5726BE86-34A8-47F8-AB73-105E34D807F2}

3: ctx[view] : {475151F9-6C22-45FB-B19E-FFE7EC13ADC3}

4: ctx[listUrlDir] : /projects/scans

5: ctx[HttpPath] : /projects/_vti_bin/owssvr.dll?CS=65001

6: ctx[HttpRoot] : http://xxx/projects

7: ctx[serverUrl] : null

8: ctx[imagesPath] : /_layouts/images/

9: ctx[PortalUrl] : null

10: ctx[RecycleBinEnabled] : -1

11: ctx[isWebEditorPreview] : 0

12: ctx[rootFolderForDisplay] : null

13: ctx[isPortalTemplate] : null

14: ctx[isModerated] : false

15: ctx[recursiveView] : false

16: ctx[displayFormUrl] : /projects/scans/Forms/DispForm.aspx

17: ctx[editFormUrl] : /projects/scans/Forms/EditForm.aspx

18: ctx[newFormUrl] : null

19: ctx[ctxId] : 1

20: ctx[CurrentUserId] : 24

21: ctx[isForceCheckout] : false

22: ctx[EnableMinorVersions] : false

23: ctx[ModerationStatus] : 0

24: ctx[verEnabled] : 1

25: ctx[isVersions] : 0

26: ctx[WorkflowsAssociated] : true

27: ctx[ContentTypesEnabled] : false

28: ctx[SendToLocationName] :

29: ctx[SendToLocationUrl] :

30: ctx[OfficialFileName] :

31: ctx[WriteSecurity] : 1

32: ctx[SiteTitle] : Projects

33: ctx[ListTitle] : scans

-----m---------

0: m[language] :

1: m[scrollHeight] : 0

2: m[isTextEdit] : false

3: m[currentStyle] : [object]

4: m[document] : [object]

5: m[onmouseup] : null

6: m[oncontextmenu] : null

7: m[isMultiLine] : true

8: m[clientHeight] : 0

9: m[onrowexit] : null

10: m[onbeforepaste] : null

11: m[onactivate] : null

12: m[scrollLeft] : 0

13: m[lang] :

14: m[onmousemove] : null

15: m[onmove] : null

16: m[onselectstart] : null

17: m[parentTextEdit] : [object]

18: m[oncontrolselect] : null

19: m[canHaveHTML] : true

20: m[onkeypress] : null

21: m[oncut] : null

22: m[onrowenter] : null

23: m[onmousedown] : null

24: m[onpaste] : null

25: m[className] : ms-SrvMenuUI

26: m[id] : 14_menu

27: m[onreadystatechange] : null

28: m[onbeforedeactivate] : null

29: m[hideFocus] : false

30: m[dir] :

31: m[isContentEditable] : false

32: m[onkeydown] : null

33: m[clientWidth] : 0

34: m[onlosecapture] : null

35: m[parentElement] : [object]

36: m[ondrag] : null

37: m[ondragstart] : null

38: m[oncellchange] : null

39: m[recordNumber] : null

40: m[onfilterchange] : null

41: m[onrowsinserted] : null

42: m[ondatasetcomplete] : null

43: m[onmousewheel] : null

44: m[ondragenter] : null

45: m[onblur] : null

46: m[onresizeend] : null

47: m[onerrorupdate] : null

48: m[onbeforecopy] : null

49: m[ondblclick] : null

50: m[scopeName] : HTML

51: m[onkeyup] : null

52: m[onresizestart] : null

53: m[onmouseover] : null

54: m[onmouseleave] : null

55: m[outerText] :

56: m[innerText] :

57: m[onmoveend] : null

58: m[tagName] : MENU

59: m[title] :

60: m[offsetWidth] : 0

61: m[onresize] : null

62: m[contentEditable] : inherit

63: m[runtimeStyle] : [object]

64: m[filters] : [object]

65: m[ondrop] : null

66: m[onpage] : null

67: m[onrowsdelete] : null

68: m[tagUrn] :

69: m[offsetLeft] : -1

70: m[clientTop] : 0

71: m[style] : [object]

72: m[onfocusout] : null

73: m[clientLeft] : 0

74: m[ondatasetchanged] : null

75: m[canHaveChildren] : true

76: m[ondeactivate] : null

77: m[isDisabled] : false

78: m[onpropertychange] : null

79: m[ondragover] : null

80: m[onhelp] : null

81: m[ondragend] : null

82: m[onbeforeeditfocus] : null

83: m[disabled] : false

84: m[onfocus] : null

85: m[behaviorUrns] : [object]

86: m[accessKey] :

87: m[onscroll] : null

88: m[onbeforeactivate] : null

89: m[onbeforecut] : null

90: m[readyState] : complete

91: m[all] : [object]

92: m[sourceIndex] : 1421

93: m[onclick] : null

94: m[scrollTop] : 0

95: m[oncopy] : null

96: m[onfocusin] : null

97: m[tabIndex] : 0

98: m[onbeforeupdate] : null

99: m[outerHTML] :


100: m[innerHTML] :

101: m[ondataavailable] : null

102: m[offsetHeight] : 0

103: m[onmovestart] : null

104: m[onmouseout] : null

105: m[scrollWidth] : 0

106: m[offsetTop] : -1

107: m[onmouseenter] : null

108: m[onlayoutcomplete] : null

109: m[offsetParent] : [object]

110: m[onafterupdate] : null

111: m[ondragleave] : null

112: m[children] : [object]

113: m[nodeName] : MENU

114: m[nodeValue] : null

115: m[ownerDocument] : [object]

116: m[firstChild] : null

117: m[lastChild] : null

118: m[childNodes] : [object]

119: m[nextSibling] : null

120: m[parentNode] : [object]

121: m[type] :

122: m[compact] : false

123: m[nodeType] : 1

124: m[previousSibling] : [object]

125: m[attributes] : [object]

-------------------------------------------------

Create a content editor webpart and add to the source editor:

<script language="javascript">

function Custom_AddDocLibMenuItems(m, ctx)
{
text = "<p>-----ctx---------</p>"
var teller= 0;
for(att in ctx){
text = text + "<p>"+teller+": ctx["+att+"]"+" : "+ctx[att]+"</p>"
teller++;
}

text = text + "<p>-----m---------</p>"


var teller= 0;
for(att in m){
text = text + "<p>"+teller+": m["+att+"]"+" : "+m[att]+"</p>"
teller++;
}

document.write(text);
}

</script>

add comment ( 3 views )   |  permalink   |   ( 3 / 205 )

<<First <Back | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Next> Last>>