We just moved our FileMaker Pro 10 database to a new server. In the process, we switched from FM Server 10 to 11, but kept the FMP 10 database. Perhaps that's what caused the problem.
The Problem
A button that used to bring up a "Match Current Record Only" with the "Go To Related Record" command now matched the entire found set... no matter what setting GTRR was given.
The Solution
Layout 1 (with the button) and Layout 2 (the new window opened when the button was pressed) both referred to the same Table Occurrence (don't ask). So I created a new TO for the same table, and pointed Layout 2 to the new TO. (I also had to change the GTRR command for the button to point to the new TO and the same Layout 2.)
Matchmaker, Matchmaker, make me a match!
Find me a found set! Catch me a catch!...
Wednesday, November 28, 2012
Friday, November 9, 2012
Parallels 8 / is really great!
Installing Parallels 8 on my Mac, so as to run Windows 7. But I ran into two, er, challenges.
1) The installer kept freezing. The solution our IT help desk provided to me worked like a charm: Repair disk permissions.
2) When creating my W7 VM, P8 kept throwing an error to the effect of, "Unable to allocate memory for VMM purposes." I dug around online and found an old thread from 2007 stating that memory allocation problems sometimes crop up when trying to install a VM while your system has Spaces enabled. Disabled spaces, and the VM creator worked like a... oh wait, I already used that cliche!
1) The installer kept freezing. The solution our IT help desk provided to me worked like a charm: Repair disk permissions.
2) When creating my W7 VM, P8 kept throwing an error to the effect of, "Unable to allocate memory for VMM purposes." I dug around online and found an old thread from 2007 stating that memory allocation problems sometimes crop up when trying to install a VM while your system has Spaces enabled. Disabled spaces, and the VM creator worked like a... oh wait, I already used that cliche!
Friday, October 26, 2012
Same Time, Same Place, Different Buttons
An elegant solution to an unexpected dilemma (FileMaker Pro 12):
I have two layouts. Let's call them Projects and People.* Here's what the table relationships look like:
Projects <------- Join Table -----> People
Sometimes, when looking at a project, I just want to get more information on the people related to it. So I set up a "Related Record" button that takes me to People, and another button/script combo that takes me back when I'm done. I call this button the "Back" button. Pretty crazy, no?
But sometimes I want to add a person to the Project. I have a script that does all the right calculations, grabs all the right info, plops the user down on the People layout and lets them enter data. Then the user must click a button ("Done") to show that they are done entering data. This button Resumes the script, which creates the necessary join record and takes the user back to the Project layout. So far, so good.
But it looks tacky to have a "Back" button and "Done" button on the same layout. I could create otherwise duplicate layouts that have distinct buttons, but that's a lot of pain to maintain/create. I want to use the same layout, but have different buttons depending on what the user's doing.
I could alternatively merge the scripts together—and I did briefly play with this—but it turned out to be complicated and I'm under a deadline.
So I searched around and found this.
Aha! Not a complete solution, but inspiration struck. And hard.
I created a tab object with two tabs, called "Back" and "Done". On each tab area I placed one of the buttons. I gave the tabs names ("Back" and "Done", naturally). Then I made the entire tab object "invisible" (i.e. formatted its text, lines, background, etc., to the same color as the layout's background). Finally, I made the "Back" tab default, and inserted a "Go to object 'Done'" step into my script. Voila'! It works!
Now if the user wants to look at or edit info, s/he will go to the layout and see a "Back" button. And they can indeed go back when they are ready. But of they want to add a new user, they go to the layout, the script pulls up the "Done" button on the "Done" tab, and when they are "Done" they return to the Project layout. All the magic happens in the background.
I did add one more feature. I didn't like seeing a black rectangle appear around the invisible tab (a result of the "Go to Object" command), so I made a rectangle of the same color as the background and placed it over the top of the tabs. No more black rectangle! This has the added advantage that now the user can't accidentally click on the tabs and pull up the wrong button. Booyah!
-----------------------------------------------------------------
* because that's what they're called.
I have two layouts. Let's call them Projects and People.* Here's what the table relationships look like:
Projects <------- Join Table -----> People
Sometimes, when looking at a project, I just want to get more information on the people related to it. So I set up a "Related Record" button that takes me to People, and another button/script combo that takes me back when I'm done. I call this button the "Back" button. Pretty crazy, no?
But sometimes I want to add a person to the Project. I have a script that does all the right calculations, grabs all the right info, plops the user down on the People layout and lets them enter data. Then the user must click a button ("Done") to show that they are done entering data. This button Resumes the script, which creates the necessary join record and takes the user back to the Project layout. So far, so good.
But it looks tacky to have a "Back" button and "Done" button on the same layout. I could create otherwise duplicate layouts that have distinct buttons, but that's a lot of pain to maintain/create. I want to use the same layout, but have different buttons depending on what the user's doing.
I could alternatively merge the scripts together—and I did briefly play with this—but it turned out to be complicated and I'm under a deadline.
So I searched around and found this.
Aha! Not a complete solution, but inspiration struck. And hard.
I created a tab object with two tabs, called "Back" and "Done". On each tab area I placed one of the buttons. I gave the tabs names ("Back" and "Done", naturally). Then I made the entire tab object "invisible" (i.e. formatted its text, lines, background, etc., to the same color as the layout's background). Finally, I made the "Back" tab default, and inserted a "Go to object 'Done'" step into my script. Voila'! It works!
Now if the user wants to look at or edit info, s/he will go to the layout and see a "Back" button. And they can indeed go back when they are ready. But of they want to add a new user, they go to the layout, the script pulls up the "Done" button on the "Done" tab, and when they are "Done" they return to the Project layout. All the magic happens in the background.
I did add one more feature. I didn't like seeing a black rectangle appear around the invisible tab (a result of the "Go to Object" command), so I made a rectangle of the same color as the background and placed it over the top of the tabs. No more black rectangle! This has the added advantage that now the user can't accidentally click on the tabs and pull up the wrong button. Booyah!
-----------------------------------------------------------------
* because that's what they're called.
Friday, October 5, 2012
FileMaker Pro 10 disappearing menu text
From the "Well, that was odd..." department:
I was trying to export some records into Excel from FileMaker Pro 10. FMP froze, so I force-quit it. When I re-launched, the text on the menu bar at the top of the window was (mostly) missing.
This included the names of icons and the number of round records. Not incapacitating, but obnoxious.
The text in alert boxes also disappeared. That's more dangerous.
I tried several options. Re-installing FMP (just the application, not all the associated files) did the trick. Yay!
B-)
\o/
I was trying to export some records into Excel from FileMaker Pro 10. FMP froze, so I force-quit it. When I re-launched, the text on the menu bar at the top of the window was (mostly) missing.
This included the names of icons and the number of round records. Not incapacitating, but obnoxious.
The text in alert boxes also disappeared. That's more dangerous.
I tried several options. Re-installing FMP (just the application, not all the associated files) did the trick. Yay!
B-)
\o/
Wednesday, September 19, 2012
I'm sorry, I can't let you do that Dave... because you're not Dave
We have a computer. Well, more than one, technically; but only one that will speak to one particular printer. And since that's the only printer that can print posters, when we need posters we need that one computer.
So when that one computer decides not to talk to that one printer, it's a problem.
The weirdest version of this problem, IMO, is that every so often the computer suddenly refuses to log on to our network. (Both the computer and printer are on the network via Mac's Airport, not directly connected to each other.) If you try to get on to the network, or to perform any diagnostics, the computer pops up a little window asking for a username and password. But not just any valid username and password—one specific username and password.
The first time, it required the u/p of my colleague on the other side of the building. She entered the info, and the computer cooperated. For a time. Then, like an addict unable to quit, it came back and demanded it again. Again, she complied. Now it's begun asking for the u/p of one of our IT liaisons who doesn't even work for us anymore, not even in the same building!
Oh, we tried entering other u/p's: mine, my aforementioned colleague's, etc. Nada. It wouldn't even give an error message, just go back to refusing to access the network.
Fortunately, I found at least a temporary solution:
In "System Preferences" —> "Network" —> "Airport", there's an "Advanced" settings button. Clicking it opens a window of tabs with all kinds of esoteric names, including one that reads something like "802.1X". Under that is a list of "User Profiles".
For our particular computer, there was only one "User Profile" listed, with a little check mark in the check box next to it. And in the "User Profile" itself was... the very username and password we were being prompted for!
Unchecking the checkbox next to the "User Profile" did make the computer stop asking for a password. But it did make it accept my own u/p. Hopefully, it will also accept others' when necessary. But even if it doesn't, I'm just in the next room, so that's a bit more convenient. :-)
So when that one computer decides not to talk to that one printer, it's a problem.
The weirdest version of this problem, IMO, is that every so often the computer suddenly refuses to log on to our network. (Both the computer and printer are on the network via Mac's Airport, not directly connected to each other.) If you try to get on to the network, or to perform any diagnostics, the computer pops up a little window asking for a username and password. But not just any valid username and password—one specific username and password.
The first time, it required the u/p of my colleague on the other side of the building. She entered the info, and the computer cooperated. For a time. Then, like an addict unable to quit, it came back and demanded it again. Again, she complied. Now it's begun asking for the u/p of one of our IT liaisons who doesn't even work for us anymore, not even in the same building!
Oh, we tried entering other u/p's: mine, my aforementioned colleague's, etc. Nada. It wouldn't even give an error message, just go back to refusing to access the network.
Fortunately, I found at least a temporary solution:
In "System Preferences" —> "Network" —> "Airport", there's an "Advanced" settings button. Clicking it opens a window of tabs with all kinds of esoteric names, including one that reads something like "802.1X". Under that is a list of "User Profiles".
For our particular computer, there was only one "User Profile" listed, with a little check mark in the check box next to it. And in the "User Profile" itself was... the very username and password we were being prompted for!
Unchecking the checkbox next to the "User Profile" did make the computer stop asking for a password. But it did make it accept my own u/p. Hopefully, it will also accept others' when necessary. But even if it doesn't, I'm just in the next room, so that's a bit more convenient. :-)
Wednesday, September 12, 2012
ColorBurst crashes on opening (again)
Yet another instance of ColorBurst crashing on opening. When I investigated, I saw when I opened the application that it would briefly show a document in the print queue. Then KABLAMMMO!!!
Application DOA.
The solution was surprisingly simple. I went to the Colorburst folder, went to the Hot Folder, and deleted the one item I found there.
Then it worked.
:-D
Application DOA.
The solution was surprisingly simple. I went to the Colorburst folder, went to the Hot Folder, and deleted the one item I found there.
Then it worked.
:-D
Tuesday, September 11, 2012
"One or more pages are in use and could not be deleted."
Well, that was interesting...
Upgraded my computer last week (yay!) and when I reinstalled Adobe Acrobat Pro... it looked different. And behaved different.
Didn't mind it until I tried deleting some pages. Whereupon His Majesty Adobe Acrobat Pro the Tenth declared:
In use??? OF COURSE, it's in use!!! Fi upon you, tyrant!
Anyway, after Googling to little avail, I tried holding down Option while opening Acrobat. Lo and behold! it worked!
I'm not sure why, but—it worked!
Upgraded my computer last week (yay!) and when I reinstalled Adobe Acrobat Pro... it looked different. And behaved different.
Didn't mind it until I tried deleting some pages. Whereupon His Majesty Adobe Acrobat Pro the Tenth declared:
"One or more pages are in use and could not be deleted."
In use??? OF COURSE, it's in use!!! Fi upon you, tyrant!
Anyway, after Googling to little avail, I tried holding down Option while opening Acrobat. Lo and behold! it worked!
I'm not sure why, but—it worked!
Thursday, August 23, 2012
A Tale of Two Annoyances: The Rails Tutorial Continued
Annoyance 1:
Site works fine on my computer. After moving to Heroku, no pages could be accessed except the home page.
Turns out they were invisible because they were not in the public directory, and I needed to do a bit more configuring to make them accessible.
Annoyance 2:
The new home page I created, when loaded, defaulted to the old one.
Even after I deleted the old one.
Even when inspecting the source code showed the new page's source code!
Deleting the cache solved that one.
Site works fine on my computer. After moving to Heroku, no pages could be accessed except the home page.
Turns out they were invisible because they were not in the public directory, and I needed to do a bit more configuring to make them accessible.
Annoyance 2:
The new home page I created, when loaded, defaulted to the old one.
Even after I deleted the old one.
Even when inspecting the source code showed the new page's source code!
Deleting the cache solved that one.
Tuesday, August 21, 2012
ExecJS::ProgramError
... is never a nice thing to hear/see. On chapter 2 of Hartl's tutorial, when I was supposed to see a nice little page like this:
After a brief websearch, I found the answer here.
I've noticed a few people saying that they prefer the "Agile" book to Hartl's, but I'm sticking with this for now because I'm still learning a ton and haven't encountered any insolvable errors yet.
I instead saw the above error and a bunch of information that would probably be useful to somebody who had been coding since I was in diapers.Listing users
Name
New User
After a brief websearch, I found the answer here.
I've noticed a few people saying that they prefer the "Agile" book to Hartl's, but I'm sticking with this for now because I'm still learning a ton and haven't encountered any insolvable errors yet.
Rails Tutorial vs. Heroku
Continuing our trek into Rails...
Since Hartl's guide to Rails recommends Heroku for deploying apps, I followed his instructions. Everything went smoothly until I hit the first perplexing roadblock of this trip (all the others heretofore have been minor—astonishingly painless, really).
I was able to log in to Heroku, and then suddenly Heroku started throwing the same Library not loaded error my way, regardless of comman! Clearly a problem with the gemset, as a little poking around confirmed. But how exactly to isolate and resolve the issue?
For the record, here's the error message:
Turns out everything works fine as along as I use the global gemset, but the problems appear when I use the gemset that Hartl recommends for his tutorial. It appears that Hartl's gemset as used in the
tutorial must conflict with the current Heroku requirements. I'm no expert, so maybe there's another explanation, but this is what I'm going with for the moment.
So I can do a couple of things:
Update (same day): So maybe there's no problem after all. In trying to follow Heroku's instructions to create an app, I switched to the app's folder (with Hartl's gemset) and tried to run Heroku. No luck. But as long as I can run Heroku outside that folder/gemset, there's no problem. So we'll cross our fingers and soldier on...
Update II (same day): Wouldn't you know it! When trying to run Rails Console ("rails c") the exact same error appeared! Fortunately, after much digging, the following solution emerged:
Works like a charm now! (Apparently has to do with the fact that I'm running Snow Leopard instead of Lion. Darn cats. Meow.)
Since Hartl's guide to Rails recommends Heroku for deploying apps, I followed his instructions. Everything went smoothly until I hit the first perplexing roadblock of this trip (all the others heretofore have been minor—astonishingly painless, really).
I was able to log in to Heroku, and then suddenly Heroku started throwing the same Library not loaded error my way, regardless of comman! Clearly a problem with the gemset, as a little poking around confirmed. But how exactly to isolate and resolve the issue?
For the record, here's the error message:
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle, 9): Library not loaded: /usr/lib/libedit.3.dylib (LoadError)
Referenced from: /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle
Reason: image not found - /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/lib/heroku/command/run.rb:1:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/lib/heroku/command.rb:14:in `block in load'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/lib/heroku/command.rb:13:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/lib/heroku/command.rb:13:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/lib/heroku/cli.rb:24:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/heroku-2.30.3/bin/heroku:16:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin/heroku:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin/heroku:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `<main>'
Turns out everything works fine as along as I use the global gemset, but the problems appear when I use the gemset that Hartl recommends for his tutorial. It appears that Hartl's gemset as used in the
tutorial must conflict with the current Heroku requirements. I'm no expert, so maybe there's another explanation, but this is what I'm going with for the moment.
So I can do a couple of things:
- Use the global gemset for the tutorial and see what happens.
- Ignore Heroku for now.
- ???
Update (same day): So maybe there's no problem after all. In trying to follow Heroku's instructions to create an app, I switched to the app's folder (with Hartl's gemset) and tried to run Heroku. No luck. But as long as I can run Heroku outside that folder/gemset, there's no problem. So we'll cross our fingers and soldier on...
Update II (same day): Wouldn't you know it! When trying to run Rails Console ("rails c") the exact same error appeared! Fortunately, after much digging, the following solution emerged:
cd /usr/lib sudo ln -s libedit.2.dylib libedit.3.dylib
Works like a charm now! (Apparently has to do with the fact that I'm running Snow Leopard instead of Lion. Darn cats. Meow.)
Monday, August 20, 2012
Ruby on Rails, Here We Come!
So, jumping on the Rails shtick, using ruby.railstutorial.org as my guide to getting my feet wet (and hopefully waist and even head). Installation has been remarkably painless thus far. JewelBox won't work yet—just crashes on launch—but we'll worry about that later.
At the moment, the biggest headache I encountered was when I followed the instructions for updating rvm. I got the error message:
Right.
Anyway, typing rvmsudo install etc. did no good. Just more error messages. And then I found this helpful little note:
Ah, of course! I ran the command, looks like it executed just fine!
On with the Rails!
At the moment, the biggest headache I encountered was when I followed the instructions for updating rvm. I got the error message:
Upgrading the RVM installation in /usr/local/rvm/
cp: /usr/local/share/man/man1/rvm.1: Permission denied
Please run the installer using rvmsudo to fix file permissions
stat: /usr/local/share/man/man1/rvm.1: stat: No such file or directory
chown: /usr/local/share/man/man1/rvm.1: No such file or directory
cp: /usr/local/share/man/man1/rvm.1.gz: Permission denied
Please run the installer using rvmsudo to fix file permissions
stat: /usr/local/share/man/man1/rvm.1.gz: stat: No such file or directory
chown: /usr/local/share/man/man1/rvm.1.gz: No such file or directory
RVM PATH line found in /Users/slittle2/.bashrc /Users/slittle2/.zshrc.
RVM sourcing line found in /Users/slittle2/.bash_profile /Users/slittle2/.zlogin.
Right.
Anyway, typing rvmsudo install etc. did no good. Just more error messages. And then I found this helpful little note:
rvmsudo
is equivalent of sudo, it does not appendrvm
to the command, you should run:rvmsudo rvm get head
Ah, of course! I ran the command, looks like it executed just fine!
On with the Rails!
Friday, July 27, 2012
Portal filters and global fields: A cautionary tale
I'm up and running with FileMaker Pro 12! Playing around with portal filtering, I discovered an odd little nuance that can be quite important.
I have a "Menu" table/layout and three portals to three tables: Process, Task, and Project. The Menu table includes two global variables, Selected Process # and Selected Task #; Task has a Process # that indicates which process the task belongs to, and Project has a Task # that indicates which task it belongs to. The portals appear like this:
Process 1 --------------------------------- Task 1 ------------------------- Project 1
Process 2 etc.
...
The idea is that if you click on Process 1, the Task portal will only show those tasks essential to Process 1. (So if the Process is "Walk the Dog," the Tasks will include "Get leash" but not "Cast vote".) Once you select a Task (say, "Put leash on dog"), the Project portal will show only the relevant projects (e.g. in this case we only want dogs, so we'd see "Fido" and "Spot" but not "Dumbo").
Clicking on a Process sets the Selected Process # to the process's number, and likewise clicking a Task sets the Selected Task # to that task's number. The portal filters use these to determine which Tasks and Projects to show, by matching them against the relevant fields in the Task and Project tables. So far so good.
But things began behaving bizarrely. Although the Process and Task portals worked and updated properly, the Project portal—which should only be dependent on the Task #—would only update after I clicked the Process portal.
After much agonizing, I discovered the culprit. My table relationships looked like this:
Menu::Selected Process # ---------- X ----------- Process:: ID #
Menu::Selected Process # ---------- X ----------- Task:: ID #
Menu::Selected Process # ---------- X ----------- Project::ID #
All of the relationships were tied to Menu::Selected Process #. Lulled into a false sense of security by portal filter, I figured that since I was using 'X' joins it didn't matter which field served as the link between the tables. WRONG!
Once I changed the last relationship to
Menu::Selected Task # ---------- X ----------- Project::ID #
everything worked fine. Boo-yah!
I have a "Menu" table/layout and three portals to three tables: Process, Task, and Project. The Menu table includes two global variables, Selected Process # and Selected Task #; Task has a Process # that indicates which process the task belongs to, and Project has a Task # that indicates which task it belongs to. The portals appear like this:
Process 1 --------------------------------- Task 1 ------------------------- Project 1
Process 2 etc.
...
The idea is that if you click on Process 1, the Task portal will only show those tasks essential to Process 1. (So if the Process is "Walk the Dog," the Tasks will include "Get leash" but not "Cast vote".) Once you select a Task (say, "Put leash on dog"), the Project portal will show only the relevant projects (e.g. in this case we only want dogs, so we'd see "Fido" and "Spot" but not "Dumbo").
Clicking on a Process sets the Selected Process # to the process's number, and likewise clicking a Task sets the Selected Task # to that task's number. The portal filters use these to determine which Tasks and Projects to show, by matching them against the relevant fields in the Task and Project tables. So far so good.
But things began behaving bizarrely. Although the Process and Task portals worked and updated properly, the Project portal—which should only be dependent on the Task #—would only update after I clicked the Process portal.
After much agonizing, I discovered the culprit. My table relationships looked like this:
Menu::Selected Process # ---------- X ----------- Process:: ID #
Menu::Selected Process # ---------- X ----------- Task:: ID #
Menu::Selected Process # ---------- X ----------- Project::ID #
All of the relationships were tied to Menu::Selected Process #. Lulled into a false sense of security by portal filter, I figured that since I was using 'X' joins it didn't matter which field served as the link between the tables. WRONG!
Once I changed the last relationship to
Menu::Selected Task # ---------- X ----------- Project::ID #
everything worked fine. Boo-yah!
Thursday, July 5, 2012
Pre-Troubleshooting FileMaker databases
It's important to think ahead when designing software (or anything, for that matter). 10 minutes of planning will save 90 minutes of work.
So I'm designing a database and thinking to when IT (i.e. me) will have to troubleshoot it.
There are places where I might want to show certain types of data only when troubleshooting. I can put fields on all the layouts (of which we have a lot), but it's a lot of adding fields and then removing them when you're done. I'd rather just make them visible/invisible at will.
So for the moment, I've created a variable $$MetadataVisibility, a global one (obvious from the "$$") set by the following script:
not $$MetadataVisibility
which if true sets the field text to match the layout background color.
In effect, by running the script (easily by pressing Cmd-1, since it's first in my scripts menu), I can turn all the troubleshooting fields on or off just for me (since global variables are for the local user, not for all users).
Of course, once we go live I'll need some safeguards in place: making sure only admins can access the script, that no one accidentally clicks on a field and modifies the data, etc. But that's trivial.
So I'm designing a database and thinking to when IT (i.e. me) will have to troubleshoot it.
There are places where I might want to show certain types of data only when troubleshooting. I can put fields on all the layouts (of which we have a lot), but it's a lot of adding fields and then removing them when you're done. I'd rather just make them visible/invisible at will.
So for the moment, I've created a variable $$MetadataVisibility, a global one (obvious from the "$$") set by the following script:
- Set Variable [$$MetadataVisibility; Value: If ( $$MetadataVisibility = 1 ; 0 ; 1 )]
- Refresh Window[]
not $$MetadataVisibility
which if true sets the field text to match the layout background color.
In effect, by running the script (easily by pressing Cmd-1, since it's first in my scripts menu), I can turn all the troubleshooting fields on or off just for me (since global variables are for the local user, not for all users).
Of course, once we go live I'll need some safeguards in place: making sure only admins can access the script, that no one accidentally clicks on a field and modifies the data, etc. But that's trivial.
Tuesday, July 3, 2012
Counting unique values in MySQL
One of my areas of interest is digital humanities and text mining. Today I was looking for a simple way to count each unique value in a MySQL table.
For example, given a table "Text" with a column "Word", and with the following values:
Word
_____
To
be
or
not
to
be
... could we produce the following?
Repeats/Count
____________
to/2
be/2
or/1
not/1
A quick search brought up a number of possible solutions, of which the easiest was this one:
SELECT COUNT(*) AS Repeats, Word
FROM Text
GROUP BY Repeats
ORDER BY Repeats DESC;
With large texts, you may wish to eliminate some of the results:
SELECT COUNT(*) AS Repeats, Word
FROM Text
GROUP BY Repeats
HAVING repetitions > 1
ORDER BY Repeats DESC;
Voila'! :-)
For example, given a table "Text" with a column "Word", and with the following values:
Word
_____
To
be
or
not
to
be
... could we produce the following?
Repeats/Count
____________
to/2
be/2
or/1
not/1
A quick search brought up a number of possible solutions, of which the easiest was this one:
SELECT COUNT(*) AS Repeats, Word
FROM Text
GROUP BY Repeats
ORDER BY Repeats DESC;
With large texts, you may wish to eliminate some of the results:
SELECT COUNT(*) AS Repeats, Word
FROM Text
GROUP BY Repeats
HAVING repetitions > 1
ORDER BY Repeats DESC;
Voila'! :-)
Friday, June 29, 2012
FileMaker Server 10 admin console refuses to load
Well... that was interesting.
This was the scenario when I arrived at the office this morning:
Resolution (on Mac OS X):
This was the scenario when I arrived at the office this morning:
- One database on our FMS 10 server was accessible just fine.
- The other one was not. Trying to access it made FileMaker Pro 10 hang (icon kept spinning).
- Trying to load FMS admin console resulted in some error code which unfortunately I did not record. I think it had to do with Java. This was on my workstation
- On the server machine itself, trying to start the admin console resulted in... nothing. It opened, and promptly closed without fanfare.
Resolution (on Mac OS X):
- I manually stopped and re-started the FileMaker Server processes:
- Open the terminal.
- Type "sudo launchctl stop com.filemaker.fms".
- Authenticate.
- Type "sudo launchctl start com.filemaker.fms".
- Voila'! Well, not quite. Now the admin console was giving me the same error on the server machine.
- Reboot.
- Voila'! This time, really truly! :-)
Monday, June 18, 2012
Sabine MacCormack, -2012
Yesterday I received news of the unexpected passing of Sabine MacCormack. Sabine was a world-class scholar and also the editor for her History, Languages, and Cultures of the Spanish and Portuguese Worlds series, published through our Press. I was privileged to work with her for the last two years on a number of projects, and know her as a scholar without peer, especially admirable for her attention to and care for young scholars. She will be sorely missed.
Requiescat in pace.
Requiescat in pace.
Thursday, May 24, 2012
Accolades for the Press
One of our authors just sent me the following:
And it's a pleasure working with you, too! :-)
This is great. You have a WONDERFUL staff. Smart and very dedicated professionals.
And it's a pleasure working with you, too! :-)
Wednesday, May 16, 2012
Notre Dame Rhetoric about Rhetoric: The Why and When of Loving Persuasion
Last week (5/7/12), at the Wesley Theological Seminary Commencement, Notre Dame President John Jenkins gave a speech in which he argued:
I don't find the speech a particularly striking example of rhetoric per se, but criticism can be postponed (indefinitely). As a composition instructor at ND, I tried to inculcate this very idea in my students, and try to live it myself: to love is to engage in (the right kind of) rhetoric.
Here is how I presented it to my classes: It is not loving to attack another, not to listen to them. But neither is it loving to fail to tell them something good or true that may benefit them. It's not loving to them, because you're depriving them of some good; it's not loving to you, since you're implicitly denying the goodness of something you hold good, i.e. acting hypocritically; and ultimately it's not loving to God, who gave us language and finite yet real apprehension of the good and the true, which means we have to collaborate and discuss to come to a fuller awareness of both.
So why do we so often fail to be persuasive, or to even try to persuade? (By "we" I mean God-fearers in general, Christians more specifically, Catholics in particular.) The answer is left as an exercise to the reader.
Sed Contra...
All of the above holds only if the other party is also interested in persuasive, collaborative dialogue. But what if they aren't? If they are trying to kill you, or to force you to act against your conscience, or to scream their beliefs at you and drown you out?
As critics of Rogerian Rhetoric have pointed out, such rhetoric only works if there's no power inequalities. Does it do any good to speak truth to power, if Power knows the truth and chooses to ignore it? Then a fortiori it's no good to try to engage in a persuasive dialogue with those who a) aren't interested, and b) have no incentive to engage in it. What the solution might be is, again, left as an exercise to the reader.
Respondeo...
I don't propose easy answers. I do wish I could teach a freshman comp class on this theme—no doubt the students would have some excellent discussions and insight! So I leave you with the following nugget of wisdom from a man with far more nuggets than yours truly:
"In essentials, unity; in non-essentials, liberty; in all things, charity." — St. Augustine
And if we are determined to keep our convictions free of malice, then I propose that we strive to meet one simple test for public discourse: Our attempts to express our convictions should take the form of an effort to persuade.If I am confident in my beliefs, and I have love and good will for the other side, then it would be my duty to try to persuade them. And if I want to persuade them, then how can I vilify them? People are not persuaded by those who attack their character.But if I don’t try to persuade them, but only condemn them, then I am not showing the respect that love demands. To stand apart, proclaim my position, and refuse to talk except to judge does not reduce hatred or promote love. And if it does neither, how can it be inspired by God?The moment I venture into tone and language that is unlikely to persuade, it can be a signal that I have left the sphere of respectful discourse. Once I do that, my odds plunge of winning over another...
I don't find the speech a particularly striking example of rhetoric per se, but criticism can be postponed (indefinitely). As a composition instructor at ND, I tried to inculcate this very idea in my students, and try to live it myself: to love is to engage in (the right kind of) rhetoric.
Here is how I presented it to my classes: It is not loving to attack another, not to listen to them. But neither is it loving to fail to tell them something good or true that may benefit them. It's not loving to them, because you're depriving them of some good; it's not loving to you, since you're implicitly denying the goodness of something you hold good, i.e. acting hypocritically; and ultimately it's not loving to God, who gave us language and finite yet real apprehension of the good and the true, which means we have to collaborate and discuss to come to a fuller awareness of both.
So why do we so often fail to be persuasive, or to even try to persuade? (By "we" I mean God-fearers in general, Christians more specifically, Catholics in particular.) The answer is left as an exercise to the reader.
Sed Contra...
All of the above holds only if the other party is also interested in persuasive, collaborative dialogue. But what if they aren't? If they are trying to kill you, or to force you to act against your conscience, or to scream their beliefs at you and drown you out?
As critics of Rogerian Rhetoric have pointed out, such rhetoric only works if there's no power inequalities. Does it do any good to speak truth to power, if Power knows the truth and chooses to ignore it? Then a fortiori it's no good to try to engage in a persuasive dialogue with those who a) aren't interested, and b) have no incentive to engage in it. What the solution might be is, again, left as an exercise to the reader.
Respondeo...
I don't propose easy answers. I do wish I could teach a freshman comp class on this theme—no doubt the students would have some excellent discussions and insight! So I leave you with the following nugget of wisdom from a man with far more nuggets than yours truly:
"In essentials, unity; in non-essentials, liberty; in all things, charity." — St. Augustine
Wednesday, May 9, 2012
Client Kudos
Received this from an author today:
As are your words, my dear sir! :-)
Stephen, I want to thank you so very much for your work on my behalf! You, your efforts, and your time are appreciated!
As are your words, my dear sir! :-)
Tuesday, May 1, 2012
The importance of FMP Server settings
So... I've decided to reactivate the professional blog: a new title, bit of a makeover, etc. The catalyst for this blogger redivivus is a little incident we had with FileMaker Pro 10. I wasn't able to find a solution online, but I did find that some folks had the same problem. So I figured I'd post our solution here.
The problem: We use a series of scripts to push our data from FMP to a MySQL database. Suddenly, MySQL decided to refuse all incoming calls, sending back a hitherto unforeseen error code every time it hit a Unicode character: "ODBC Error: [Actual][MySQL] Incorrect string value: <some hex value> for column <fieldname> at row <number>".
In other words, its recognition of Unicode chars had somehow switched off.
As a side effect, our website went down. Not good, as they say.
The solution: Turns out the fault was a little switch in FMP Server. (I'm still not sure what caused this to flip the wrong way.) Actually, to be accurate, it was a problem in the ODBC settings, not on the server itself, but on the server's machine.
If you're having trouble with FMP Server 10, MySQL and Unicode on a Mac, try the following:
Happy DBAing! B-)
The problem: We use a series of scripts to push our data from FMP to a MySQL database. Suddenly, MySQL decided to refuse all incoming calls, sending back a hitherto unforeseen error code every time it hit a Unicode character: "ODBC Error: [Actual][MySQL] Incorrect string value: <some hex value> for column <fieldname> at row <number>".
In other words, its recognition of Unicode chars had somehow switched off.
As a side effect, our website went down. Not good, as they say.
The solution: Turns out the fault was a little switch in FMP Server. (I'm still not sure what caused this to flip the wrong way.) Actually, to be accurate, it was a problem in the ODBC settings, not on the server itself, but on the server's machine.
If you're having trouble with FMP Server 10, MySQL and Unicode on a Mac, try the following:
- Open the "ODBC Administrator" application.
- You'll see several options on the window that opens. Select the second one ("System DSN").
- Select the MySQL DSN, and hit "Configure" (on the right of the window).
- Click through the configuration options until you get to the "Database" window.
- Select "Advanced Language".
- A sub-window pops up, with five checkboxes:
- "Auto-detect..." — Uncheck it.
- "to send text" — Uncheck it.
- "to receive text" — Uncheck it.
- "Return Unicode data types" — Check it.
- "Set Application Locale..." — Check it.
Happy DBAing! B-)
Subscribe to:
Posts (Atom)