×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VFP7&9 Windows 7 Punctuation Anomoly

VFP7&9 Windows 7 Punctuation Anomoly

VFP7&9 Windows 7 Punctuation Anomoly

(OP)
I have a form with one pagefram which contains 10 pages.  
One of the pages has a caption which reads "User Maint."  
On my XP machine, the caption is fine in both the IDE and .EXE.  
On my Windows 7 machine however, the caption reads ".User Maint"  (Note the placement of the ".")
If I change the caption property on the properties sheet to read ".User Maint", the caption on the page reads "User Maint."!
I get the same behavior with characters that are not alpha nor numeric.  In other words, !?<&%... all behave the same way, and only on a page caption.  I don't get this behavior on a command button.  
This is both within the IDE and a compiled .EXE on the Windows 7 box, for both VFP 7 and VFP 9.

Just wondering if anyone else had noticed this.  I would hate to start writing code for dynamic captions depending on the OS.  

 

  -Dave Summers-  
 cheers
Even more Fox stuff at:
http://www.davesummers.net/foxprolinks.htm

RE: VFP7&9 Windows 7 Punctuation Anomoly

Interesting.

I don't get that with VFP9 on Vista.

happy shades

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

To be fair, I just tried that with a button on a form, not a page frame...

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Ok

On a pageframe, even in design mode, it does exactly what you say in Vista!

(sorry for not properly reading your question!)

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Also I get the same result in VFP6 on Vista

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Dave,

I've heard of this problem before. Some time ago, there was a thread in this forum on the subject. I can't remember the details or whether there is a solution, but I definitely remember seeing it.

Sorry, that's not much help, but at least you know you're not alone.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 

RE: VFP7&9 Windows 7 Punctuation Anomoly

Mike,

I remember that too, but also don't now what the reason was or if there was a solution other than putting the dot at first, if you want it last. Tried setting the caption programmatical and turned themes off, both doesn't work out.

Bye, Olaf.

RE: VFP7&9 Windows 7 Punctuation Anomoly

(OP)
Thanks all for the feedback.  I don't recall seeing this in a thread before or I wouldn't have brought it up again.  But oh well.

It's very curious why captions would behave this way for W7 and not for XP though.  Like I said, I would hate to have to write OS specific code for something this silly.

I guess the best option is to avoid anything but alpha-numeric for page captions.
 

  -Dave Summers-  
 cheers
Even more Fox stuff at:
http://www.davesummers.net/foxprolinks.htm

RE: VFP7&9 Windows 7 Punctuation Anomoly

Hi Dave,

it may not have been a tek-tips thread. Could also have been somewhere else. It has to do with the OS, not with the foxpro version or SP. I wonder if there was a workaround. Using CHR(160) (nonbreakable space) as last char after a "." also doesn't help.

Bye, Olaf.

 

RE: VFP7&9 Windows 7 Punctuation Anomoly

It is curious, any character outside the 0-9, a-z and A-Z ranges is reversed and tucked into/onto the wrong end!

You could write a function to sort it... but why does it do it?

CODE

FUNCTION PAGEFRAMECAPTIONFIXER
    PARAMETERS m.CAPSTRING
    PRIVATE m.CAPSTRING,m.PREFIX,I,X,m.STRING
    m.STRING = ""
    m.CAPSTRING = ALLTRIM(m.CAPSTRING)
    IF VAL(OS(3)) >= 6
        FOR I = LEN(m.CAPSTRING) TO 1 STEP -1
            IF ISTEXTORNUM(SUBSTR(m.CAPSTRING,I,1))
                ** finished checking
                ** pop it at the left
                m.CAPSTRING = LEFT(m.CAPSTRING,I)
                FOR X = 1 TO LEN(m.STRING)
                    m.CAPSTRING = SUBSTR(m.STRING,X,1)+m.CAPSTRING
                NEXT
                I = 0
            ELSE
                m.STRING = SUBSTR(m.CAPSTRING,I,1)+m.STRING
            ENDIF
        NEXT
    ENDIF
    RETURN(m.CAPSTRING)

FUNCTION ISTEXTORNUM
    PARAMETERS m.MYCHAR
    PRIVATE m.MYCHAR,m.FLG
    m.FLG = .F.
    IF UPPER(m.MYCHAR) $ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        m.FLG = .T.
    ENDIF
    RETURN(m.FLG)

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Found It!

There was an article on Foxite... it suggested setting the pageframe RightToLeft property to .f.

That sorts it

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

(OP)
Griff,

Glad you found something, I didn't pursue it any farther.  I was just going to take my own suggestion and avoid punctuation.
Still somewhat odd that it does that with anything non alpha-numeric.  I would think that as long as it was a printable character, it would behave as expected.
 

  -Dave Summers-  
 cheers
Even more Fox stuff at:
http://www.davesummers.net/foxprolinks.htm

RE: VFP7&9 Windows 7 Punctuation Anomoly

It's an odd default. I *think* it is just set the wrong way, if you change the same property of a command button, you get the same result.

What is it for?

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Righttoleft is for languages written right to left, arabic for example.

I wonder why this defaults to .T. now on Vista and Win7 or if it always defaults to .T.

I haven't installd any right-to-left language, and I assume you all too. So it's odd that this changed.

What I found is this report on Vista beta versions: http://www.interact-sw.co.uk/iangblog/2006/04/21/rtlshortcut

You may try, but this hotkey for changing left-to-right to right-to-left doesn't work for me, maybe it was only in the beta.

Still something of that bug remained, righttoleft should not be .t. for systems with only left-to-right languages installed. I bet this is not a foxpro bug, but an OS level bug, also because it just happens on Vista and Win7.

Bye, Olaf.

RE: VFP7&9 Windows 7 Punctuation Anomoly

Quote:

. I *think* it is just set the wrong way, if you change the same property of a command button, you get the same result.

That looks right. The default for pages seems to be .T. For all other controls, it's .F.

Very rum, especially as the Help says that RightToLeft is "disregarded unless you are running a Middle Eastern version of Microsoft Windows". I assume none of us is doing that.

Mike

 

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 

RE: VFP7&9 Windows 7 Punctuation Anomoly

Actually, it's starting to make some sense... not that the default is switched - I think that is just an error by the dev team... the behaviour.

If you are designing in a non-european language, you are probably talking about labels that contain (mostly) non ASCII alpha (0123456789ABCDEFGHIJKLMNOP...) characters, and the RightToLeft function would reverse all of them.

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

(OP)
I would think that if the RightToLeft property is set to .T. it would reverse the order of all the characters - or at least the words - rather than just the non alpha-numeric ones.  So the behavior still don't make sense to me.

Oh well.  At least it can be fixed without adding a bunch of code.
 

  -Dave Summers-  
 cheers
Even more Fox stuff at:
http://www.davesummers.net/foxprolinks.htm

RE: VFP7&9 Windows 7 Punctuation Anomoly

In Arabic, for example - I think I've seen this in Dubai, the words read from right to left... but the numbers still work from left to right!

So if you had an expression like 'I want 300 widgets' it would convert to (roughly) 'stegdiw 300 tnaw I' [to get this to work in my head I had to think of the letters in the example as being the non-ASCII Arabic characters, like punctuation].

Perhaps this part of the behaviour is actually an OS bug-fix rather than a new bug!

 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: VFP7&9 Windows 7 Punctuation Anomoly

In fact, taking it a bit further - I *think* that european words are written left to right in Arabic (when put there in context) like the numbers are.


 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close