Problem with statement Cell

Recently I have started to change my panorama 6 database to panorama10. With this I have lot of problems but when I look in Panorama help I can find how to solve various problems.
Now I found that in procedures with the statements:
Field “A”
Cell data
nothing happens. The Field get highlighted but the data is not in the data cell. I tried a new file and I have the same problem. I have no idea what I am doing wrong.

I just tried this, with both a text and a numeric field. I tried assigning constants, and a variable named data, and they all worked correctly.

Could you paste in the exact code that is failing for you? The problem must be somewhere in what you have not told us.

The problem is solved. I restarted the computer and now it is working. Something central in the system went wrong???

I’m glad the problem is solved. For future reference, a much more modern way to change the value of a field would be to use an assignment statement, simply

A=data

Of course the cell statement should still work for compatabililty with existing databases, but for new code, or if you run into problems, I would change it to an assignment.

Thanks. The assignment works well.

Hmmm. Using the 10.2 version of Pan X, under OS 10.13.6, I am seeing the same problem, the cell statement does nothing. I tried a new program with just the Data Sheet, and it’s no-go.

I’m switching to assignment statements in my other code, but just wanted to add this experience. Haven’t tried rebooting yet.

Though I recommend using assignments instead, the cell statement still works just fine in Panorama X 10.2.

Just tried it on a different Mac, OS 10.14.5, the “cell” statement still seems to fail. Must be doing something wrong. (Also updated Pan X today to 3901.)
Created a new file, wrote this proc:

field A
cell "xyz"

When I run this proc, with the Data Sheet open, nothing appears in Field A. I also tried field “A”

What am I missing?

I copied your code, pasted it into a new procedure in a new database, ran it, and it worked just fine. OS 10.13.6

I just did the same thing with the same results, using macOS 11 (Big Sur).

And for me on 10.11.6 as well as 12.1

OK, some progress here. Back on my 10.13.6 system, after rebooting my Mac, I found the cell statement will work, until I open a certain form in a file (call it “A”) converted from Pan 6. Then it quits working, until I quit and relaunch Pan X.

I open file A Data-Sheet-only, and my cell test file works fine. I tried opening a few other forms first, in file A, cell still works. But after I open my main form, containing many objects, the cell statement fails, until I restart Pan X.

Thanks to everyone who has responded here with their tests, and any guesses as to what could be going on are welcome. Again, not a high priority, as we don’t need to use the cell statement anymore.

Cell did not work on my computer, an M1 Mac mini, OS 12.1, PanX 10.2.0.b25.
This code works:

 Zipcode="12345"  //Zipcode is a text field.

This code does not, i.e. the cell remains empty:

 Field Zipcode
 Cell "12345"

Cooper’s 2nd example of code does work for me.
Same macOS, and Panorama build.
MacBook Pro M1 Max

Second example works for me as well.
PanX build: 10.2.0.b25•12-10-2021• 3901

So 3 people have reported that Cell does not work at least some of the time.
5 people reported that Cell worked each time.

For what it’s worth, in Panorama X the cell statement is actually written in Panorama code, not Objective-C, and it is actually just an assignment. You can open it and look at it yourself, but I’ll save you the trouble.

The first line, hush, doesn’t actually do anything, but it does tell Panorama to never include the following statements in the instrumentation log.

If you aren’t aware, «» means “the current field”. So the second line assigns the parameter to the current field.