Archive

Archive for the ‘Windows’ Category

Serial Control in Windows Vista/7 Doesn’t Work Properly

July 9th, 2010 Bob Keeney 2 comments

I’ve had one of those weeks where I thought I was going crazy (crazier?).  My cross-platform application that works fine on Mac OS X was behaving very strangely in Windows but only sometimes.  This particular application talks to a hardware via a serial port.  My standard test platform is Windows 7 with Windows XP as the secondary and both of these are run in VMWare on my Mac.  So a bunch of things might be at fault but after trying this out on an old Windows XP laptop I quickly narrowed the problem down.

The data packet the hardware device sends is very small – 4 characters to be exact.  What I was experiencing was that RB captured the first character on the first send – but not the whole packet.  Then it would complete the first message on the 2nd message and only get part of the 2nd message.  It would go something like this:

  1. A
  2. B | A
  3. C | A
  4. D | A

Where A is common to all messages so they should be AB, AC, AD and so on.

These messages in the real world are sporadic and with the exception of a regular hardware pass message it might be days or weeks in between messages so as you can imagine, this problem mucks up the logic quite a bit.

If you are not familiar with the Serial control, the DataAvailable event fires when there is data available (duh) and there you can check what’s in the serial buffer by using the LookAhead function.  LookAhead in this case showed just the first character.  The other property to check is  BytesAvailable which should tell you how much is still in the buffer.  It simply returned zero so I should have a complete message.  Definitely something screwy going on there.

Invoking Serial.Poll via timer did not produce any different results.  Neither did forcing a ReadAll.

One other thing that I discovered was the Serial Port Monitors are worth their weight in gold.  Using one, you can at least verify that the data got to the computer.  A free 14 day trial was good enough but if I do any other serial projects it will be worth it.

The good news is that I wasn’t crazy.  The client is okay with Windows XP for now.  The bad news is that it might take a release cycle (or more) to get it fixed. Oh well, battles for another day….

For those that care, the Feedback id is 12723.

RB 2010 R2.1 Has A Nasty Windows Bug

July 1st, 2010 Bob Keeney 25 comments

Be aware that RB 2010 R2.1 has a nasty Windows-only bug that might affect you.  It seems that the keyboard accessibility for pushbuttons (and possibly other controls) no longer works properly.

To duplicate, put two pushbuttons on a window.  Put a message box in the Action event saying which one has been pushed.

Test it with the mouse.  Works fine.  Now tab to each pushbutton and press the spacebar.  Works fine.

Now, tab to each one and press the Return or Enter key.  Nothing.  If you happen to have a default pushbutton the Enter/Return key will activate that button regardless of where the focus is.

Nasty bug that leads the average Windows user to curse your name in vain if they rely on the keyboard to navigate.  I spent hours trying to figure this one out because it manifests itself in the MessageDialog class too.

Yeah, I’m a little pissed.   I have to revert to RB 2010 R1 where it does not manifest itself.  The hard deadline for the project I’m working on is today.  Gives me a black eye for a problem outside of my control.

For those that care, Feedback ID 12626

Visual Studio For the Mac?

May 26th, 2010 Bob Keeney 5 comments

Interesting little blurb at http://blogs.barrons.com/techtraderdaily/2010/05/26/apple-will-steve-ballmer-show-up-at-the-wwdc-keynote/ about Microsoft presenting at Apple’s World Wide Developer Conference (otherwise known as WWDC) to show off Visual Studio for iPad/iPhone and general Mac OS X development.

Geeze.  How many levels of wrong is this rumor?  You think Apple is going to trust Microsoft with the keys to their iPhone/iPad kingdom?  I don’t think so.  Apple has worked too hard building xCode and Cocoa Touch to let a 3rd party develop for iPhone/iPad.  If this does happen, then Apple might as well give Adobe a call and let them know they can restart their iPhone/iPad programs too.  And we all know where that feud isn’t over yet.

Where this might make sense is desktop applications.  Microsoft, while doing all that work to write Microsoft Office for the Mac in Cocoa, wrote their own Cocoa libraries and other Mac GUI editors and put it into Visual Studio.  Seems like an awful lot of work with minimal gain for Microsoft unless they’ve decided to make a push in REAL Software’s corner.  They certainly have the knowledge and resources to do such a product.

While I don’t think this rumor has legs it does make you think.  No doubt Microsoft is feeling the pinch of developers learning Cocoa which does nothing for Microsoft.  If they developed a cross-platform Visual Studio it stems the bleeding because now developers don’t have an either/or decision to make.  Learning a new development tool and frameworks suck and letting all those Windows developers develop for Mac and Windows using their tool keeps Microsoft in the game.  It doesn’t help them with iPhone/iPad development (now) but in five years who knows.  If it does happen it will generate some serious buzz which is something Microsoft wants (needs?).

What does this do, if true, to our favorite development tools company located in Austin?  I don’t think it would be good news.

REALbasic IDE: Mac vs. Windows

January 25th, 2010 Bob Keeney 9 comments

Normally I run REALbasic on Mac OS X and remote debug in Windows.  This works 99.9% of the time but late last week I ran into a situation where I wanted the IDE on the Windows side as well.  So I installed RB and downloaded the plugins that I needed.  Then I started to use RB.

Using RB for Windows was…different.  I’m not sure that I can quantify it other than that it seemed less polished.  It just doesn’t feel like a normal Windows app and it certainly was not as smooth as the Mac OS X version.

The reason I was in Windows to begin with was of tracking down a printing bug that was affecting my product.  Turned out it was the Application.UseGDIPlus property that had been set to true.  The end result was that my reports were ‘blown up’ about 10 times bigger than they should have been.  This has been documented and is <feedback://showreport?report_id=10399>.  Turning off the property fixed the problem.  Some fix, eh?

I don’t think that Windows gets as much attention as the Mac OS X.  Why do I believe this?  The ARBP surveys consistently show Mac users being about 80% of the membership.  Likewise, traffic to this website is roughly 80% Macintosh.  What this means is that beta testers are predominantly Mac based.  I believe that most of the developers at RS are Mac users as well.

Currently, RS is in the transition to get Cocoa out.  It won’t be happening for 2010 R1…so it’s obviously a much tougher nut to crack than they originally thought.  Honestly, I’m not surprised.  Going from Carbon to Cocoa is like creating an entire new platform.  Eighteen months to two years isn’t out of the question for such a big undertaking.

I’m hoping that when Cocoa is out and working great (you think it won’t have some bugs in the first release?) that RS pays a lot of attention to Windows.  They’ve said in the past (sorry no reference for this) that a vast majority of new licenses are Windows users.  But yet, based on observation, the professionals and beta testers are mainly Mac users.  Does that not say something?  Would better Windows support translate into more Professional and Studio licenses?  I don’t know, but I suspect so.

Perhaps it’s time to kill support for Windows 2000.  I’d even suggest killing off XP but I know a lot of places in the world are still actively using it so that’s probably a non-starter.  I believe Cocoa support will effectively kill support for anything less than Mac OS X 10.4 so why not for Windows too?

I suggest that everyone that has a Studio license do a bulk of their work in Windows for a couple of weeks.  More Windows-specific bug reports will (hopefully) get some of the more obvious (and painful) bugs fixed.

What are your feelings about this?  Am I right, wrong, or somewhere in-between?

Installing Windows 7 In VMWare Fusion

October 24th, 2009 Bob Keeney 2 comments

File this under the “how not to make a good first impression” section.  I’ve had a miserable 24 hours.  I’ve spent many hours working with VMWare trying to get Windows 7 installed.  After a couple of missteps I finally hit the right combination.

My first issue was that my VM image that was running Vista wasn’t big enough.  Of course it couldn’t tell me right away but only after installing temporary files and starting the installation process.

So I created a new VM image.  The installer gets to the point where it asks for the 20 character product key and it just says the product key is invalid.  No other explanation given.  I suspect, but have no idea because it doesn’t tell me, is that the activation process was looking for a previous installation.  But since my VM disk wasn’t big enough I had to do a clean install.

Finally, in desperation I did some research and came across an entry from January 2009 on how to install the beta of Windows 7 in VMWare.  I created a new VM using the Windows 2008 Server setting, did a clean install and did NOT try to enter my product key and activate.  Then I followed the instructions at http://community.winsupersite.com/blogs/paul/archive/2009/10/23/clean-install-windows-7-with-upgrade-media-the-answer.aspx.  After that everything (so far) has been working fine.

Come on Microsoft!  You REALLY need to work on the end user experience and that starts with the installer.  Really!?  I have to edit the registry to get it to install?

How come I can’t get a better error message when the product key was failing?  If it was because it didn’t detect a previous installation then just say so.  Don’t make me Google it and guess.

VMWare:  Your support section sucks.  How about something that’s easy to find stuff?  You would think that Windows 7 would be THE #1 topic this week.

Look, I’m not a Windows person.  I admit that AND I’m running it in VMWare so it’s NOT just Microsoft and it’s NOT just VMWare.  Just frustrating.

Hopefully someone else finds this useful.

Categories: Windows Tags:

Windows 7 and the REALbasic HTMLviewer

August 17th, 2009 Bob Keeney 3 comments

I don’t venture into Windows-land very often but I ran across a couple of articles today that gave me cause for concern.

http://www.microsoft.com/presspass/press/2009/jul09/07-24statement.mspx is talking about how European users might get to choose which browser is used by their machine.

The second is http://www.aeroxp.org/2009/03/ie8-functionally-removable/ is about how Internet Explorer is functionally removable from Windows 7.  The article states that the procedure only removes the Internet Explorer executable and not all of the supporting libraries so it shouldn’t be much of a concern to RB developers.  Or is it?

During the ARBP chat last week, REAL Software president and CEO, Geoff Perlman stated that he was unaware of any Windows 7 incompatibilities.  No one asked specifically about what happens if the user uninstalls Internet Explorer in Windows 7 or a European users chooses FireFox, Safari, Chrome or Opera as their web browser rather than Internet Explorer.

Will the HTMLviewer still work?  I think it will because it’s dependent upon the supporting libraries but it’s a question that I’d like reassurance on from RS.  But perhaps the real question is whether the HTMLviewer.IsAvailable is an adequate check and it jumps into the libraries or if it’s simply a check on what version of Windows you’re running?  After all, if you’re using Windows XP or Vista you HAVE TO HAVE Internet Explorer.  But it seems like Windows 7 might be changing that rule.

I’ve been particular critical of the HTMLviewer control over the past several years.  Yes, RS has worked some of the bugs out but it’s still not as stable as I’d like to see it.  My biggest beef is that it’s not using the same supporting libraries on Windows, Linux and Mac OS X.  On Mac OS X it uses WebKit.  On Windows it uses Internet Explorer and on Linux it uses GTK.  This leads to platform incompatibilities, instabilities and downright bugs between the platforms.

If you didn’t read the release notes for RB 2009 R3 you’ll find that RS isn’t shipping REALbasic with the Language Reference for Linux because HTMLviewer has too many issues so Linux users have to rely upon a PDF version.  Ouch.

REALbasic’s strength is cross-platform so why not use a cross-platform web browser as the basis for HTMLviewer?  Use Gecko (Firefox) or Webkit (Safari and Google’s Chrome)!  We might need it for Windows 7 which is being released in October?

Thoughts?

Kicking XP to the Curb

May 29th, 2009 Bob Keeney 1 comment

I’m a Mac user.  I have been since 1986 and even in my electrical engineering days I always had a Mac at home while I slaved away on a Windows machine at work.  Get over it.

I think it’s time to move on though.  Windows XP has such lousy performance with threading that I’m almost tempted to pull support of XP for one of my apps that uses a lot of threads.  What’s taking mere minutes in Vista (and half that time in Mac OS X!) to complete is taking a whole lot more minutes under XP.  Both environments are running in VMWare with the same allotted RAM and running on the same drive with nothing else on the Mac running.

As much as I hate the UI changes (I can’t give specific’s it just feels slightly off-kilter!) the performance increase is enough for me to start using it more and more.  XP, I’m kicking you to the curb for good I think.  I’ll still use you to kick the tires on app testing but no more of your crappy performance.

RB For Windows

May 27th, 2009 Bob Keeney Comments off

I spend most of my time using REALbasic in Mac OS X.  About the only thing I ever need to do in Windows is test applications and using the Remote Debugger works fine for that. Unfortunately, one of my projects is requiring a bit more coding work than is reasonable using the Remote Debugger.

So this morning I started up VMWare and installed REAL Studio (since I figured, hey, I ponied up the money for it I might as well use it) and either copied or redownloaded all of my plugins.  And then started RB for Windows.

I must say that it’s…um…not nearly as pleasant as working in Mac OS X.  The UI doesn’t refresh properly, it responds somewhat sluggishly and in general it just seems a bit ‘spastic’.  After I bumped my VMWare memory up to over 2 GB it was better but it still wasn’t hard to get the UI to erase itself and stay erased for 10 to 15 seconds.

My app uses a number of threads to increase performance in Mac OS X and it sure seems like the threads are slowing DOWN my performance in Windows.  Is this a common problem?  I’m really starting to wonder if I need to spend more time running RB in Windows to really understand what the Windows ‘experience’ is.  I’m also wondering if there’s a significant difference between Windows XP and Vista (and Windows 7 by extension).

Is it time for RS to really get serious about Windows after they get done with Cocoa?  Do you have any tricks for increasing performance of REALbasic for Windows?  Are you seeing the same sort of issues?

Windows 7

April 27th, 2009 Bob Keeney Comments off

A friend sent this one to me today. http://www.xkcd.com/528/

Categories: Humor, Windows Tags:

REALbasic and ActiveX

December 1st, 2007 Bob Keeney Comments off

REALbasic is wonderful at cross-platform programming. With a little elbow-grease it’s possible to make very nice Windows and Mac OS X applications. That’s the bread and butter of my business.

I have one client, however, that has had me working on a commercial VB6 application for five years. Since we know that someday VB6 will not be adequate for our needs we’re looking for the ‘next’ development environment. .NET is the easy answer but since I have a lot invested in RB so I thought that if I can get them halfway to cross-platform that would be a win-win for everyone.

Categories: REALbasic, Windows Tags: