Connecting the Dictionary with the Application

This is a newbie question. I was doing the Getting Started lesson and made a mistake setting up the Zip Code field. Instead of setting the Screen picture to “@P#####P” (with 5 hashes) I left out a hash and only did 4. Now I have made a whole bunch of changes to the generated solution that I don’t want to lose.

I have fixed the screen picture in the dictionary. How do I fix it in the app? The “Synchronize Application with the Dictionary” command doesn’t seem to fix it. I’m using Clarion 10. Do I really need to manually edit every form that displays the Zip Code? Is there not a way I can generate new forms selectively, rather than the whole app at once?

Is it really that many places? Are there reports too?

Also, I don’t see the point of putting a @P picture for a zip code. What if they have a ZIP+4 zip?

I’ve always used @s10 to @s20. You can validate the contents in code, if need be.

Thanks for the tip. I know nothing about zip codes. In SA we use a 4 digit postal code.

What if I’m using the field in dozens of places?

I’m used to working in an environment (Microsoft Access 97 with extra libraries) where I can propagate changes across dozens of tables and hundreds of fields if necessary, because the field properties are stored in a data dictionary. I’m just horrified that Clarion doesn’t do this. I mean, that’s what data dictionaries are for. Or am I missing something?

I thought I had read a post that dictionary synchronization doesn’t work properly (or perhaps at all) anymore. I have never used it. Maybe someone else knows better.

I think it would probably be just as quick to do a source code search on @P####P to find all of the affected procedures, then have a big cup of tea and power through them and get it over with.

In the USA, we have a thing called ZIP+4. That’s 5 digits, followed by 4, separated by a dash. (92507-6301) Sometimes you know the ZIP+4 and sometimes you don’t. In my opinion, a @s10 or @s20 is adequate. And then you can verify the zip as needed.
In Canada, they use a different format that also contains alpha characters. So a @P######P pattern would not be useful.

For some reason Sync got broken in C7+ and never fixed. I used to use it a lot and miss it. So yes, you need to change it in the app , place by place.
Having said that. You can export the app to txd and do a find/replace then import into a new app and all will be well.

I also use @s10 for postcodes even though Aus also only has 4 digits. It’s just a little more flexable.

Thanks guys.

So basically, once I have generated all the windows, any changes made after that need to be done by hand? (except for the txd method)

You can edit the window definition as text (vs the window formatter) and press Ctrl+F to find/replace while you’re in there. Shouldn’t take all that long, other than being inconvenient. As long as you don’t mess something else up. :slight_smile:

Thanks for all the helpful answers.