Paul-Jan

1

votes
1

answer
163

views

Stop and continue while evaluation an expression tree

At the office, we've applied simple Domain Specific Languages (DSLs) to several problem domains we encountered. Basically, we parse (lex/yacc) the custom script into an expression tree. Every node in the expression tree has an .evaluate() method that gets called recursively, until the program is do...
Paul-Jan
1

votes
1

answer
2k

views

How to handle unused Managed Metadata Terms without a WssId?

The Problem We upload (large amounts of) files to SharePoint using FrontPage RPC (put documents call). As far as we've been able to find out, setting the value of taxonomy fields through this protocol requires their WssId. The problem is that unless terms have been explicitly used before on a listit...
Paul-Jan
1

votes
1

answer
0

views

Profiling a classic ASP application using AQTime

We have developed a large number of websites using ASP (jscript flavour), talking to the underlying intelligence layer (written in Delphi) through COM. These websites are running on IIS (5 and 6). Over the years this ASP layer has grown into something quite heavy (no business logic, but lots of cont...
Paul-Jan
1

votes
1

answer
0

views

How to open source set of plugins

(my apologies for the non-specific wording of the question title, and for liberal use of öpen source' when I actually mean 'project setup at SourceForge') We have recently open sourced a 3D modeler we'd been selling for a couple of years, with the main goal of keeping the application alive. We setu...
Paul-Jan
1

votes
1

answer
22

views

What does an assignment do if it is within square messaging brackets?

In some old(ish) Objective-C code base, I accidentally misplaced the opening bracket trying to send a message to an object. // I meant to type object = [object someEncodingMethod] [object = object someEncodingMethod]; This compiles and runs just fine, but after this line the original object variabl...
Paul-Jan
1

votes
1

answer
479

views

How to find out file association that's not in HKCR

Context For a given file extension, I need to find out the ProgID(?) of the file association (e.g. Word.Document for .docx). I need his (a) to recognize specific associated software (e.g. Adobe versus Nuance) and handle accordingly before they can open a document, and (b) to make Outlook display the...
Paul-Jan
2

votes
2

answer
897

views

Why is DebugHook not set to 1 in my Delphi add-in DLL?

When I'm running my COM Office add-in from within the Delphi 5 IDE (using any of the office applications as the host), breakpoints work fine (when using remote debugging symbols and a properly set output folder), but none of the non-delphi exceptions (like access violations) in my code triggers the...
Paul-Jan
2

votes
2

answer
608

views

How to filter Delphi 2010 compiler output (hints)?

I'm trying to get rid of some hints(*) the Delphi compiler emits. Browsing through the ToolsAPI I see a IOTAToolsFilter that looks like it might help me accomplish this through it's Notifier, but I'm not sure how to invoke this (through what xxxServices I can access the filter). Can anyone tell me...
Paul-Jan
20

votes
2

answer
4.8k

views

Recompiling the RTL - if possible, then how?

I have this craving to do some experiments with modifying the underbelly of the Delphi run time library (RTL), system.pas and the likes... It is possible or not? I'm very fond of challenges like 'yes, but you'll have to provide custom .obj files for some assembler wizardry because they were never di...
Paul-Jan
6

votes
3

answer
387

views

How to keep forms and frames compilable in Delphi 6 - 2007?

We recently converted our long-running Delphi project to Open Source. Multiple people have contributed patches already, which is great, but unfortunately forms and frames when saved with Delphi 2006 (and later) contain new properties in the .dfm that are not handled by older versions. Forms are hand...
Paul-Jan
4

votes
5

answer
6.4k

views

How to fetch from a large list with Throttling enabled?

We have a SharePoint list containing 50.000 items, and want to fetch some data from it without disabling SP2010's default throttling. From the MSDN artical on handling large lists, we figured the key ingredient would be using a small RowLimit on the SPQuery, and using ListItemCollectionPosition for...
Paul-Jan
2

votes
0

answer
98

views

Convert charset into codepage id

While parsing a .RTF file, I run into classic charset identifiers (i.e. 204 = Cyrillic). I'd like to convert them to the appropriate codepage id, so can instantiate the correct Encoding object. There is a nice table on MSDN that lists the available codepages: http://msdn.microsoft.com/en-us/library/...
Paul-Jan
6

votes
2

answer
860

views

Fatal error starting debugging kernel every other deployment on Mac

I'm writing a FireMonkey HD application on my Windows 32 bits machine, and deploying (remote debugging) it on my MacBook running Snow Leopard. I'm running the Delphi XE2 Trial. Everything is working fine, except for one thing: every other run I hit the following error when I press F9: Fatal error st...
Paul-Jan
24

votes
3

answer
6.9k

views

What is the alternative for deprecated Canvas.getMatrix()?

I have the following code snippet, that transforms a set of bounds using the canvas' current transformation matrix. final RectF bounds = renderer.computeBounds activeCanvas.getMatrix().mapRect(result, bounds); return bounds; However, with the latest API level (16) I get a warning stating The method...
Paul-Jan
3

votes
7

answer
2.1k

views

Singleton with a public (single-instance) constructor

As an exercise, I'm translating parts of our large and battle-hardened Delphi-framework to C#. Included in this framework is a generic singleton parent class. Of course, implementing a singleton in C# is fairly easy (there is even a Jon Skeet article, so what more could I wish for), but our Delphi...
Paul-Jan
3

votes
3

answer
1k

views

FlashDevelop (Flex/AS3) and localized compiler messages

I am completely new to the whole FlashDevelop/Flash/etc toolchain, but wanted to do some experimenting. I installed FlashDevelop and Flex SDK on my laptop, and thinks worked out just fine, except for one thing: the compiler messages are localized! Messages like 'gebruik van een niet-gedefinieerde e...
Paul-Jan
4

votes
2

answer
1.2k

views

WebBrowser, IPersistStreamInit and javascript

For one of our desktop applications we use a HTML-based interface, loaded from local files into a WebBrowser control. This works fine, but now we want to load the files from a different source, and are trying to stream them in using IPersistStreamInit (like this example on MSDN). It seems to work O...
Paul-Jan
5

votes
1

answer
3.1k

views

How do I debug a .net Fatal Execution Engine Error?

As a developer, I'm trying to setup a development environment on our brand new VMWare ESX server. Things are not working out: somewhere during the SharePoint Product & Technologies Configuration Wizard, the application just disappears, and in the event log I find the following error: .NET Runtime ve...
Paul-Jan
3

votes
4

answer
1.4k

views

Cross-reference between delphi records

Let's say I have a record TQuaternion and a record TVector. Quaternions have some methods with TVector parameters. On the other hand, TVector supports some operations that have TQuaternion parameters. Knowing that Delphi (Win32) does not allow for forward record declarations, how do I solve this ele...
Paul-Jan
2

votes
4

answer
3.1k

views

How to quickly find a sharepoint document library by id?

Given the SPList.ID and a site collection (or an SPWeb with subwebs), how do I quickly find the document library with the given ID? I can recursively enumerate through all webs and perform a web.Lists[guid] on each one of them, but there might be thousands of subwebs in my case, and I'm looking for...
Paul-Jan
4

votes
1

answer
459

views

Cross Method Dispose Patterns in SharePoint

I've written a class that does various modification to the contents of a SharePoint site. Inside that class, I've implemented a lazy resolved property private SPWeb rootSite { get { if ( _site == null ) { SPSite site = new SPSite( _url ); _site = site.OpenWeb(); } return _site; } } Both the SPSite...
Paul-Jan
2

votes
1

answer
65

views

Is a sleep in the main thread of a windows process always a bad thing

I'm investigating an issue where a (Unity-based) application hangs with an AppHangB1 event after several hours of runtime, and needs to be killed manually. Unfortunately, this application is supposed to run for over 12 hours, continuously, in an unattended setup. We have managed to create a .dmp fi...
Paul-Jan
4

votes
2

answer
579

views

kkrunchy - how to get rid of the tls data in a Delphi executable?

Just for fun and giggles I'm trying to create a 64k intro in delphi. One of the best executable packers for applications of this size is kkrunchy by Farbrausch. However, when I run it on an (otherwise empty) Delphi executable, I get the following output - ERROR: files with exports or tls data are no...
Paul-Jan
3

votes
3

answer
1.4k

views

Where do I put my Office Add-In configuration page(s)?

I'm writing a COM add-in for Word, Excel and PowerPoint. This add-in has some user-configurable settings (about a page full of them actually... or perhaps even more than a single page). What is the standard way of presenting these to the user? Through a custom page under Tools->Options? (how?) Under...
Paul-Jan
1

votes
3

answer
7.1k

views

Query and/or Search for SharePoint Document ID

We have the sharepoint 2010 environment with Document ID's enabled. Given (part of) a Doc ID, we want to programmatically retrieve the document(s) matching that ID. The problem seems to be that this column is rather special, in that it might need special handling. Using an SPSiteDataQuery, fetchin...
Paul-Jan
2

votes
0

answer
30

views

How does ListView binding work under the hood?

We recently run into some concurrency issues working with an ObservableCollection bound to a ListView's ItemsSource on iOS. Investigating this issue was a good excuse to dive into the Xamarin Forms sources, as I'm still getting my feet wet on this platform. In Xamarin Forms, the ListView is derived...
Paul-Jan
2

votes
2

answer
1k

views

Detecting custom folder content types in MOSS2007

Given an SPListItem representing a folder, I need to find out whether it has the builtin folder content type, or a custom folder content type (with additional fields). Here is what I do SPContentType folderType = aFolderItem.Web.AvailableContentTypes[SPBuiltInContentTypeId.Folder]; SPContentType con...
Paul-Jan
6

votes
1

answer
1.2k

views

Apply Windows Theme to Office Com add-in

For ages, Delphi has supported the Enable runtime themes switch on the Application Settings tab. However, this only works for executables. DLLs are assumed to take over the theming (and other) setings from their parent application. Unfortunately, Microsoft Office doesn't play nice there. Their 'them...
Paul-Jan
2

votes
4

answer
2.7k

views

Invalid pointer operation in TMonitor.Destroy

I'm currently working on porting an existing Delphi 5 application to Delphi 2010. It's a multithreaded DLL (where the threads are spawned by Outlook) that loads into Outlook. When compiled through Delphi 2010, whenever I close a form I run into an 'invalid pointer operation' inside TMonitor.Destroy...
Paul-Jan
4

votes
1

answer
749

views

SharePoint Search SQL: search in location and below (dynamic)

I have a client application that represents the complete SharePoint structure (sitecollections, sites & subsites, doclibs, folders), of any given 3rd pary SharePoint site, as a navigation tree. Users can click on any level in that tree, and do a freetext search. They expect their search results to...
Paul-Jan
1

votes
1

answer
1.3k

views

ASP.NET Charting Pie Chart - both inside and outside label per slice

In an existing applications (web forms, but the underlying Microsoft Charting stack is basically the same for winforms/webforms/razor charts) I have Pie Charts, with for each slice the following business data: Value Label Color (used for categorization, same color for multiple slices) The requiremen...
Paul-Jan
11

votes
2

answer
5.7k

views

NullReferenceException in DbContext.saveChanges()

Taking my very first babysteps with Entity Framework 5.0, I run into an exception with the very first Entity I create. Please note that every table created after that works just fine. Also, do note that I've taken the usual steps of regenerating the database and/or restarting the Visual Studio IDE....
Paul-Jan