Sorry for the second beta in two days, but there’s been a few things that were screwed up in the last build, so here’s a new one. Only changes in this release are bug fixes, so please see Beta 1 for feature info.
Download: SharpMT 2.2 Beta 2
Read: SharpMT FAQ
Screenshots: 1 | 2 | 3
General question not related to this release:
To do a trackback ping, do I put the trackback url in the “urls to ping” box, or is that strictly for the sites like blo.gs? This was probably mentioned at somepoint but I’m too lazy to search all the comments for each release :)
Doh, just found an issue with the plugin: it’s opening multiple instances of #MT instead of new child windows.
URLs to Ping is for trackbacks, one URL per line, if you have multiple – the blo.gs pinging is controlled at a Blog-level on the MT server…
That’s what it’s supposed to do, with the multiple instances – it’s been doing that since I put in multiple draft support and ya double click on an SMT/Draft file…
Personally, I would prefer it to just open up a new draft in the currently running instance of #MT. Maybe make it available as an option? “Allow only one instance of SharpMT” or something like that.
Not that easy, given how the internals work when the app opens. It’s something that I’d have to investigate as #MT was never designed to do that.
Yeah, nearly every MDI application I’ve used either locks itself to one instance (makes sense, after all) or gives the user the option whether to allow multiple instances.
If it’s doable, I’d say make it an option – I’m all into having choices, and I know the whole MDI thing has been a source of consternation for you anyway Randy… :)
Actually, this isn’t MDI. Multiple documents, yes, but not MDI in the true windows sense – you can’t have the documents float in the large window because I hate that… instead I went with tabs, a la VS.NET.
As it stands, I’ve spent the last 9 hours trying to get this to single instance to work and it’s not looking good, at all. When SharpMT launches, I can easily say “oops, another version is running, so don’t open a new one”. That’s the easy part. The nearly impossible part is telling the running Form to do something. I can’t get an object of it, because it’s already running. Trying to get at the static member does me no good because it’s in another process. I’ve looked at the Process and that doesn’t get you much of anything. I looked at putting in a Mutex to gatekeep the main Run method and then use Remoting to open a connection into the running application. That works, except that the IE control (used for preview) doesn’t like the non-apartment state that the additional thread causes, so it takes out the whole application as it crashes. I’ve tried monitoring a registry key and that works too – in that I get the updates – but since THAT needs another thread, that too won’t work. I even tried making the main form inherit the IMessageFilter interface and tried to catch a windows message but that too failed.
Now that I’ve blown away a Friday for a feature that I don’t particularly care about, can you guess the odds of this making a future release, especially when it’s been acting the other way for about 8 months? Sure as shit won’t be an option, if it does some how gimp into life. Also makes me want to pull the damned RSS plug-in option, which I didn’t want to do in the first place, yet has been the start of all this trouble.
So has anyone gotten something like this to work in C#, or am I the only one that is standing in this painted-in corner?
Ok, it works now :)
Sorry about the bit of crankiness but given the time of night and the time spent, I think it can be excused.
And to the Geeks watching this project, I just discovered .Invoke and delegate – that combo runs the member on the original thread, which made all of my specific problems go away. I’ve also decided to use the Mutex and Registry Watching mechanism as it’s all my code (instead of merging snippets of samples together) and less complicated than Remoting (for this thing). New beta soon.
Sweet. :) I’m glad that you were finally able to get it working.
As for Remoting, from my limited experience with it, I would have to say that it’s too complicated for it’s own good. That’s probably why Microsoft is going back to a simpler, easier way of doing things in Indigo.
Yeah, I actually know a few of the people on the Indigo team – they’re very focused on making it for everyone.
From what I saw of it, it would work fine. It did work fine. My concern is that connecting to 127.0.0.1 on a specific port just to shove one string thru to another process… it was like hitting a fly with a dump truck, so I think the registry path was better. Didn’t look too bad, but I think the complexity comes into play in all the of the things that could be wrong between both machines. One machine has a port closed and the whole thing can collapse but it could take a while to check that. Always complex, working across a network no matter how many layers up you are.