I made a lot of changes to the database. This is ASObj-C Database a11.fmpur.zip.
Here is the ASObj-C Database a11.fmpur.zip link
For anyone who doesn’t have a copy of the app to run the file it is uploaded to dropbox. The download link is:
I made a lot of changes to the database. I took ed’s idea of a database with basic intro stuff in it and expanded it. There are now 3 type of examples: Beginners, Intermediate and Advanced. The user can select which one to view. To implement this I added 3 buttons to the bottom of the screen labeled: Beginners, Intermediate and Advanced. These button a have a thin red rectangle around them to show they are related. Just to the left of the buttons is the word “Samples” in red. If there are no samples for a particular level of example for a class item the corresponding button will be dimmed on the class items window. The smaller screen size window did not have enough space on the class items window after adding the buttons so I moved the button “Open sample in SD” on the class items window to the ASObj-C menu and gave it the menu item name “Send Sample to Script Debugger” and gave it a keyboard shortcut of option-command-S (⌥⌘S).
The database can open more then one “sample window” at a time so the sample in the frontmost window will be sent to Script Debugger when executing the “Send Sample to Script Debugger” command. If the front-most window is not a samples window it will error with the text “Either the front window is not a samples window or the script failed to recognize the window was a samples window.”
The actual send to SD command can be initiated by choosing “Send Samples to Script Debugger” in the ASObj-C menu or pressing ⌥⌘S
It is possible to open the Beginners, Intermediate and Advanced sample all at the same time in three different windows for the same class item if you want to compare them. They can be compared in FileMaker or they can be sent to Script Debugger and compared.
The samples column is still in red on the “class items” window. But instead of having a check mark like before there can be any where from no characters to three characters in the “Has Samples” column for each line. If there is a capital letter “B” in the column then there are samples for beginners. If there is a capital letter “I” in the column then there are samples for Intermediate level users. If there is a capital letter “A” in the column then there are samples for Advanced users. If there are no letters in the column then there are no samples for any level of user yet. As I add to the database this situation will almost certainly come up from time to time. Multiple letters means there is more then one level of sample for the class item. It is tough to figure out what kind of sort to use for this column. I went with a straight alphabetical sort for lack of a better idea. But that sort does make it easier to figure out what is there as far as example levels.
I moved the “help” and “glossary” buttons from the “class items window” to the ASObj-C menu with the menu names “Show help…” and “Show glossary…” receptively.
Since I figured people would like a way to see database entries that are geared to the level they are comfortable with I added three additional items to the ASObj-C menu named: Find All Beginning Samples, Find All Intermediate Samples, Find All Advanced Samples. Selecting any of these menu items will select just those database entries. To see all the entries again click the “show all” icon in the top left corner of the class items window. Right now the samples I had before this release were all put in the intermediate level. As time goes on I can put more in the beginning and advanced parts.
Did one Advanced and Beginning example so people could see the difference. The NSString method
writeToFile:atomically:encoding:error: has all three levels. Since the constant NSUTF8StringEncoding has the same samples I also copied the same beginning and advanced samples to that entry as well.
Added a preference window to the database. This can be opened by choosing “Preferences…” from the ASObj-C menu. Currently there is only one thing in the preference dialog to turn off a feature that will copy the name of the method to the clipboard when the the method is clicked in the class items list. This feature is not done yet so the preference currently does nothing right now. But a lot of other preferences are possible. Not every person is going to like the same interface. I thought another thing to put in preferences would be a choice to choose what kind of keyboard short cut to use for the ASObj-C menu items.
In the “first column” on the left of the class items window the text is displayed in purple if the item being referenced is a constant.
Changed the column name from “Class, “Foundation function,” … name” (second column from the left) to “Methods, Functions & Property names”, for the class items window.
Added another “Extra info” topic about “Foundation Functions”
There were a number of small fixes made in this version. They are listed at the end.
Fixed the “record status” problem when switching layouts. It now works correctly.
The sort problem when clicking the “framework name” column heading in the “framework layout” has been fixed.
Removed the underline below “Description” in the column heading in the “framework layout” since the column is not sortable.
Fixed the sort for “has description” and “has notes” in the framework layout. They now sort correctly.
Fixed the sort for “framework name” in the “class items” layout.
Removed the “script trigger” for selecting the “item type” or “class item name” in the “class items” list since it is no longer used and creates an error when clicked.
Bill Kopp