I downloaded that Binary wizard to mark my WPSO Body field plus 4 _PageFormat permanent variables for forms as binary, disabled the .Initialize procedure and saved the file in Author Mode. Pan X immediately crashes. Is there a Pan 6 formula that can extract the text from a WPSO field or do I need to use strip functions to remove the binary data?
Page 701 of the Panorama Handbook PDF file states:
Sometimes you may want to use the text contained in the word processor in a formula. For example, you may want to count the number of letters or words in a document, or search the document to see if it contains a particular word or phrase. To use the text in a formula, use the documenttext( function. This function has one parameter, a word processing document. The result is the text of the document with all of the style information removed.
I don’t believe this function is listed anywhere else and it took me awhile to track it down.
Thank you Gary, you beat me to it. However, I didn’t realize it was missing from the Panorama 6 Programming Reference wizard.
As it turns out, I was using documenttext( to display the character count of my letters. Doing a formula fill on the Body Field converts the WPSO formatted into regular text. I then deleted the WPSO from my forms replacing them with text display SO’s. PanX still crashed. I then used the Binary wizard to remove the Binary designations and that fixed it.
So you changed the text “in place” in the Body field? At which point it no longer contained binary data, correct? However, Panorama would convert the text into binary data when converting to Panorama X (since you had designated it as a binary field). Then you were attempting to display with the text display object – I don’t think the text display object likes binary data. Of course no program should ever crash, but trying to display binary data in in a text display object sounds like a good candidate for something that might cause a crash. Although I just tried it and it worked ok, in fact it actually displayed correctly if I put in the right values into the data.
I looked for a crash report from you but I didn’t find any. I recently discovered that there is a bug in the Panorama X crash reporter – it doesn’t correctly submit bugs if Panorama isn’t running on a logged in account. So I looked a bit further and sure enough, I couldn’t find any trace of an account, or even a trial account for you. If you are running on an un-logged in copy of Panorama you’ll have a much better experience if you start a 7 day trial. There are some features, like the View menu, that don’t work at all if you are not logged in or running a trial.
Jim had asked me if I had a 7 day trial version of Pan X. I had logged onto ProVUE and followed the instructions to download the trial on March 9. I have a functioning View Menu. I am now on day 9 of the trial, maybe really quitting it only twice with over 30 crashes or forced quits after 30 seconds of spinning beach ball. I did not send in the crash report to Apple. I could disable the security features and email Jim a copy of my Pan 6 Correspondence file to see all the incompatibilities in addition to the WPSO. I developed this file for a customer in 1996.
Jim used the term changing “in place” to describe my practice of using the data in a field or variable in a formula and replacing it with the result. I do this to open files with buttons named for the file. I use info(“Trigger”) and a text funnel to store the file name in a variable. I the add the pathname and the .pan suffix to the variable and save it to the variable replacing the original value. This is not working in Pan X. Is this the future?
I don’t really understand what you are describing. However, in Panorama X, database file names end with .pandb, not .pan. So if you have a variable that contains a value like
hd:folder:mydatabase.pan, and try to use that variable to open the database, it won’t work.
One solution is of course to change the value in the variable so that it ends with .pandb. But I would also suggest that you might want to remove the extension completely. If you tell Panorama to open
hd:folder:mydatabase it will work correctly, in both Panorama 6 AND Panorama X.
If you are using a variable it would be something like this:
let databaseNameVariable = "hd:folder:mydatabase"
This will work in any situation where the file is known to be a Panorama database, like
openfile. The only time you need the extension is if you are performing an operation that works on any kind of file, for example
fileerase. If you wanted to erase this database, the code needed would be:
But in most code, the .pan or .pandb extension is never needed, Panorama will supply it automatically, and has done so since Panorama 4.
FYI, I hope you didn’t think my use of the term “in place” was in any way critical. I was just trying to express my understanding of what you were doing, to make sure we were on the same page. I think I am still confused, however, as I don’t understand what doing a formulafill on a word processing content field has to do with database names. That seems like two separate issues but your most recent post seems to indicate that they are connected somehow, so I think I’m still a bit behind the 8 ball on this discussion.
I am amazed you are responding at 10:45 pm. Incredible customer service. Let me try to better explain. I use a variable named “Open” to store the pathname of a file that needs to be opened. My Pan business templates use a Main Menu File with buttons to open files by procedure. I have my own security system so the files don’t work if opened directly from the Finder or Panorama File Menu.
Open = info(“Trigger”)[8,-1]
This returns the name of the file, “Correspondence”, from the button.
The next procedure line would calculate the total pathname and store it in the “Open” variable.
Open = Volume+":Files:”+Open+".pandb"
Where “Volume" is a variable storing the pathname to where the Files folder is. This replaces the original “Correspondence” with “Macintosh HD:Businesses:WCC Pan X:Files:Correspondence.pandb”.
That opens the file in Pan 6 with the Pan 6 suffix. I did this method to get around the 31 character limit on file names in the original Macs. It enables procedures to Open and Save files on networked hard drives up to 7 folders deep.
In Pan X, Open is cleared of the value of “Correspondence” as it is missing from the the new version of Open. When I replace “Open” with info(“Trigger”)[8,-1] as follows:
Open = Volume+":Files:”+info(“Trigger”)[8,-1]+".pandb”
It works as before. I originally did this thinking that the info(“Trigger”) would quickly lose its value and needed to be stored immediately.
The 31 character limit was for the filename portion only, and for each folder name. But the total path could be up to 255 characters. Storing part of the file or name in a variable doesn’t change any of those restrictions, they were baked into the Carbon API’s that Panorama 6 used. Panorama X uses the modern Cocoa API’s, so there is no limit on file names, folder names, or total path name.
I don’t understand what this means. Why is it missing?
Try at 1.00 am Greg - Jim will probably still be there for you - no kidding.
Yes, but a response at 7:45 AM is very, very unlikely, even 10:45 AM is a bit iffy