Archive for August, 2007

Posted by Adam Buenz

This was driving me nuts yesterday, I was looping through all sorts of crap, and all I wanted to do was conditionally display something base on the SPBasePermissions enumeration. Reason being, we have a custom menu that appends to the Site Actions menu (i.e. through the use of a feature) building out relative links to [...]

Posted by Adam Buenz

Sometimes, you want to rotate items out of a SharePoint list on a random basis in order to make this information available to your users, for example, some items that might be housed within your enterprise portal that would be helpful to rotate on something like your intranet frontpage displayed in no specified order are:
Technology [...]

Posted by Adam Buenz

Man, I have never seen this before, but doing a simple SPListItem.URL and returning the URL returns a funky ass value. It looks like hex or some crap, like this:
http://localhost/lists/MyList/6_.000
What the hell is that? Shouldn't the SPListItem.Url property return the actual URL to the item?
To get around this, you have to tailor your code a [...]

Posted by Adam Buenz

I got in a fight, mentally. I love generics, but a lot of the times when I get my code review's occur, people ask me why I didn't use an object array when it would have sufficed?
So in this, I am talking about instead of using this:
Select For Unformatted Code
C#:

ArrayList list = new ArrayList();

Using [...]

Posted by Adam Buenz

In the development newsgroups there was a question then when performing a foreach loop for SPLists in a SPListCollection whether there was a way that the return could be controlled to a specific type. More importantly, not to just a SPBaseType, but also to a BaseTemplate by passing in the ID that corresponds to the [...]

Posted by Adam Buenz

Sometimes you will want to build a query worthy collection of SharePoint objects, something like you want to iterate through all SPList objects that are currently selected in a ListView control (via a checking the ListViewItem.Checked property) in a WinForm application and then perform some operation on them. I don't event think that last sentence [...]

Posted by Adam Buenz

Has anyone else accidentally pulled their respective USB drive out virtual images were running under? I did this weekend when I was working on a book, and all of a sudden the drive comes back and corruptible and unreadable. Now I am sad. Because all my work is on there. It doesn't mean that I [...]