New version ASObj-C A 19.0

Continuing the discussion from Permanent place for ASObj-C database:

I tried to edit the “Permanent place for ASObj-C database” post to update the page but it wouldn’t let me change the post. Is there some kind of lock on this post? So I am posting to a new topic.

I am only posting 2 files at this time (7/17/2017):
* ASObj-C Database A19.0.fmpur.zip
* ASObj-C Database A19.0 release notes.pdf

These files can be found at:

The dropbox link above is the same one found on “Permanent place for ASObj-C database” so there is no real advantage to linking to the link I just provided.

I have been really busy and have been unable to finish the documentation for the new database version. So I am releasing the database file and the “release notes” now and will update the documentation and post it when time permits. There are a lot of useful enhancements which I thought people would like to use right now.

A big part of the what the enhancements provide is better documentation to ASObj-C. Providing documentation in a completely different language and giving it to ASObj-C programmers has always seemed pretty strange to me.

For now the release notes is the only documentation available but I tried to explain everything new in the release notes. The release in the dropbox folder and the release notes posted below are exactly the same. I’ll let people decide which one they want to read. For now I will be focused on getting more new entries into the database.

The NSDataDetector has some good stuff in it. It can read regular text and detects things it can pull out of the text. NSDimension’s subclasses can do some powerful and highly accurate conversions from one unit to another. PDFDocument and PDFSelection can do some nice things with PDFs. Doing the NSDateIntervalFormatter finished off a big collection of various kinds of formatters for different kinds of data.

Here is the release notes:
Database has very nearly tripled in size since the A18 release. I’ve added 364 entries to the database since the last release so there are now 552 class items. Currently I don’t have time to produce updated documentation but I think the enhancements in the database would be helpful to users so I’m releasing the database now with documentation to follow. For now the release notes will serve as documentation for the new features in the database.

The goal of this database is not just to make using ASObj-C easier. Large parts of Apple’s documented was translated into text that’s easier to understand and the unfamiliar Objective-C jargon was removed and replaced with more familiar words and references. Every effort was made to allow this database to be used “in place of Apple documentation,” not to be used “in addition to Apple documentation.”

There is one known bug in this version of the database. The record status in the top right of the item window occasionally fails to update. I haven’t had time to work with the database to reliably reproduce the bug. I have been clicking the “Go to Class list” button in the lower left of the “Item Window.” Then when I’m in the class window I just just hit the “Go to item list” button and go right back to the “Item” window which forces the window to update the record status. If anyone figures out how to reproduce the bug please let me know and I can fix that and release an update.

The original database design had a flaw with using a popup menu to directly choose a particular class to display. I failed to comprehend just how big that popup menu would be so I will have to come up with a new way to implement that feature. Currently the popup is so large it is bigger then will fully fit on a 27 inch iMac screen. For now the popup is still in the interface since it does in fact work. By the time the number of items in the database is doubled it will be very slow since the names in the popup will have to be scrolled a lot.

The original database design has now been fully implemented. The original window size scheme has been replaced by a more flexible system that gives the user a higher degree of customization.

Removed the “Show Omitted” and “Omit Record” buttons

Moved the “Show All Records” icon from top left to the right top of the window.

Added some text to all the note fields for all methods, functions and properties that require pipes. It basically says pipes are required and for methods and it says which parameters need the pipes. All these notes are in red and always appear at the very top of the notes field.

Currently I only know of one class name that requires pipes and that is NSURL. If I find more classes whose names have to have pipes I will create a list of classes that require pipes and add that information to the database.

Added new methods, properties and functions to previously existing classes. I also added the following 31 new classes along with some of their their methods and properties :
NSDataDetector
NSDateIntervalFormatter
NSDimension
NSMeasurement
NSOperatingSystemVersion
NSSortDescriptor
NSThread
NSUnit
NSUnitAcceleration
NSUnitAngle
NSUnitArea
NSUnitConcentrationMass
NSUnitDispersion
NSUnitDuration
NSUnitElectricCharge
NSUnitElectricCurrent
NSUnitElectricPotentialDifference
NSUnitElectricResistance
NSUnitEnergy
NSUnitFrequency
NSUnitFuelEfficiency
NSUnitIlluminance
NSUnitLength
NSUnitMass
NSUnitPower
NSUnitPressure
NSUnitSpeed
NSUnitTemperature
NSUnitVolume
PDFDocument
PDFSelection

Added the following Foundation functions
NSPoint
NSRange
NSRect
NSSize

Added the following 12 “constants & enums” items. There are now 25 “constants & enums” items.
Foundation constants & enums
NSCalendar constants & enums
NSDate constants & enums
NSDateComponents constants
NSDateFormatter constants & enums
NSDateIntervalFormatter constants & enums
NSDimension Unit Names, Symbols, Constants, Coefficients & Definitions
NSLocale Component Keys
NSLocale constants & enums
NSTextCheckingType constants & enums
NSWindow constants & enums
PDFDocument constants & enums

Added a “sorted by” indicator just above the large scrolling list, just a little to the left of the scrolling list’s center. The indicator has the text “Sorted by” with the name of the column just under the “Sorted by” text. The name of the column is displayed in gold letters.

A “search help” button was added to the “Item List” window. When clicked a small window will appear that contains the syntax for advanced searching. This syntax can be used inside any of the live search fields.

Added two fields, just under the live search fields, on the far left of the window. There is a field labeled “Read” and another field under that which is labeled “Write.” If a database item containing a property is selected then one or both of these fields will be filled in with the literal text used for for getting and setting the property. This includes any pipes that might be needed. If the property is “read only” then the "read field is used, and the “write” field is dimmed; otherwise both fields are used.

Added the parameters to the Foundation functions. Originally it only listed function names.

Added a “read only” column to the "Item List window. Only properties will have an entry in this column. If the property can both be set and read then a “no” appears in the column. If the property is read-only then a “yes” will appear in the column.

Added a new button to the “Item List” window called “Turn on Parameter & Return Type display.” When this button is clicked the entries in the “Class items and Nonclass items” column will change from just listing properties, functions and methods to list the same information along with an indication of what type of input, and what type of output, is required or expected. Once clicked the button name will change to “Turn off Parameter & Return Type display.” The button just toggles between these two states each time it is clicked. The text in the “Parameter & Return Type” text is color coded. All green text shows what type of input is expected, red text shows what type of output will be returned, blue is further explanatory text, and black is the actual text from the method, function, property, …

When the “Parameter & Return Type” information is being displayed it makes the text in the “Class items and Nonclass items” column (third column from the left) wider and some text may run off the right edge of the field. At the top of the fourth column from the left there text that says “Text Past,” but it is printed printed vertically instead of horizontally. This thin column is where a purple capital letter “P” sometimes appears. The “P” appears any time the text has gone past the right end of the second field. The “P” is just a visual indication to the user that some text is not visible. Clicking the field in the third column will cause the bottom of the field to drop down so all the text in the field can be seen simultaneously. Clicking outside the field will cause the field to return to its previous size. The “Text Past” column header at the top of the fourth column can be clicked to cause the record to be sorted, so all the rows with the “P” in fourth column will move to the top of the scrolling list.

The items list column (second column from the left side) lists some very large method calls and it doesn’t make sense to make the column big enough to fit every single method call. Therefore the column is wide enough to fit most of the items in the column. When the method calls are too big to fit in the column a purple capital “P” will appear just to the right of the method call. The “P” indicates appear in its own column called “Text Past.” “Text Past” is written vertically (as opposed to horizontally). Clicking in the “class items” field will cause all the text to be displayed. Clicking anywhere but the “class items” field will cause the field to go back to its normal size.

Added a feature so when the “Item List” window is first opened the “Notes” field is automatically selected. This will make the scroll bar in the notes field visible so the user can tell if there is any unseen information in the notes field (i.e. there is text not scrolled into view). If their is some unseen information in the field the scroll bar thumb will be visible.

Added “zoom in” and “zoom out” buttons to the “Item List” window in the top left of the window. They look like magnifying classes with either a plus or minus signs in them. A a “Set window zoom” popup menu was also added to the left left of the “zoom in” and “zoom out” buttons. Either of these can be used to control the window zoom.

There are 8 zoom settings ranging from 25% to 400% which should provide a more than adequate zoom range, even in extreme cases. Both the “Less compact window” and “More compact window” can be zoomed in and out. This will provide a good fit for a far bigger range of screen sizes.

The old window size popup has been replaced with with a “Window format” popup. The old “2560 X 1440 (big text)” setting is the same layout as the new “Less compact window” in the new popup. The old “1280 X 735” is the same layout as the “More compact window” in the new popup. The major difference in these window layouts is how closely things are pushed together in the window layout, and the “More compact window” window size has smaller field widths. The top of the “Item Window” is the same for both window formats, and the scrolling list are the same for both window styles. Only the bottom part of the window changes when the window style is changed.

Added a “Find constants and enums for select words” menu command to the “ASObj-C” menu. Selecting the enum or constant in the text and selecting the menu item will cause a search to be performed to find where the selected item is defined. Since all the constant, enums and other such things are defined in the “Constants and Symbols” entries in the “Item” widow that is where the search is performed. If the search is successful a window containing the item with the definition will be opened and the word being searched will highlighted. Currently if the word appears in more then 1 item in the database it errors. But this does not happen very often. This something I’ll look into later. This same search can also be done manually by typing the constant or enum name into the “Note Live search” field. All of the constants, enums and other such things are defined in the “Notes” field of some item in the “Item List” window.

Added 4 menu items to the ASObj-C menu.

  • Find All Instance Methods - List all instance methods in the database.
  • Find All Properties - List all properties in the database.
  • New Database Window Showing Pipes - Displays all “class items” that require pipes.
  • List of items with pipes - Displays all “class items” that require pipes in text format.

When the database is large enough I will work on figuring out key words so the database cab be searched by keywords.

Bill Kopp

2 Likes

Can I suggest that you include a Read Me file with full instructions for a new installation and for the current update?

I can’t run it here. When I try to open it I get a message that “Untitled” can’t be opened. I try to change my security settings, and tell it to open anyway but no joy. The PDF for installation isn’t much help.

Ed,

I tried downloading the all the files from the discourse site (FileMaker Pro runtime.app, ASObj-C Database.fmpur and “Extensions” folder) then run it and it worked for me no problem.

What is the system level on your Mac?

Does the old “Database.fmpur” file still work on the Mac that you had trouble with.

As far how the files should be on the disk, all 3 items listed below must be in the same folder.
• ASObj-C Database.fmpur
• FileMaker Pro runtime.app
• “Extensions” folder

The “FileMaker Pro runtime.app” should be clicked to open the database or it causes problems.

I can’t get it to fail here.

Bill

Has anyone besides me downloaded the new file and had it work for them?

Also I am running Sierra on both my Macs.

Bill

Bill,

Let me take this opportunity to encourage you (again) to use all of the great info you have to setup a wiki, that could be maintained by everyone, or just those that you give permissions to. I’m sure with your database and scripting skills you could use your existing DB to initialize a wiki.

###Why Use a Wiki?

  • They are very easy to use and search
    • Takes almost no training (unlike any DB app).
  • No downloads required
  • Available to any device that can run a web browser
  • Biggest Benefit: Much Easier to Maintain
    • As I said, can be maintained by everyone, or just those you approve
    • You can update the wiki in just a few minutes, and it is instantly available to everyone
    • While some topic might be clear to you (and other very knowledgable users, it may not to others. When someone runs across this, they can make updates to clarify to a wider range of users/reader.
    • Most wikis have a built-in “what’s new/changed”, and of course you can have your own wiki page to highlight/explain any changes
    • All wikis have a built-in revision compare, and roll-back (if desired)
  • It is easy to link to a wiki page/section on any html-based page (forums, web sites, emails, etc)

For a great example of a wiki maintained by many people, take a look at:
Official Keyboard Maestro Wiki

We use it many times a day to explain to KM users how to do things.

I know you hate the thought of changing systems at this stage, but you might want to give it some thought, and discuss with others.


@alldritt and @ShaneStanley:  If you guys happen to be following this discussion, you might also want to consider using the SD Help files to create a SD Wiki -- for all the same reasons I stated above.

Jim,

Well this discussion has come up before. So I will try to explain it more precisely.

I looked at the sample you posted. That is something that uses a lot of links. There isn’t any kind of relational database involved. I don’t just have information. I have a lot of database fields with calculated values, a number of relations I use very heavily. Using a text and link based system would be a lot more trouble to achieve the same effect assuming such a thing could even be done. If I wanted to take things to the internet I would just set up a FileMaker server and give people access to the server. That would take little work but I would have to pay for such service, buy a FileMaker Pro server, set up an internet server and I don’t want to do that.

I have a lot of control over how things look and work with a database. With the Wiki stuff I have to change to how I format text to what it will allow me to do. How would a Wiki handle relational searches, how would it mimic the live searches in the database?

If you are talking about just removing the text and putting it into a wiki that step alone is a lot of work. I don’t have text in one place. It is scattered around and some of it is calculated. I would have to recombine the text and then split it up in way that breaks the text down to work with links. That is a lot of work.

A wiki can be searched with google using advanced google searches but it would never be as good as searches in a database. Everything in my datebase is broken down the smallest parts and recombined upon demand. This allows a lot of specilization in how I can generate informational text.

As I said before my goal was not to write a book. My goal is empower people to use ASObj-C more effectivily. A wiki is a book with links that can only be accessed via the internet. To me books and links are an old paradigm. The internet is loaded with them. But you have to sit down and read to find something. Which is fine if I were teaching ASObj-C, but I am not. Shane is probably one the most qualified people in the world to teach this stuff. He has been doing a great job of that with his books.

My database automatically knows many things and has a low level semantic awareness of the things it works with i.e. it knows how to use its data to find other data, and then use that data to find different data, … To do that you need data structures to be designed and implemented. Text based things only have text mixed with some meta data. I’ve never seen anything with text and metadata that even comes close to the power of a relational database.

The kind of book the database is most like is a “reference manual.” Reference manuals" usually don’t have to be read in any particular order, make it easy to find the information being looked for, and often assume some level of pre-knowledge. A lot of the books today are just pain manuals with no emphasis on reference, or some kind of mix between “reference manuals” and regular manuals.

My goal is pretty simple to make information more easily and quickly accessible.

With that thanks for the suggestion. I know you trying to be helpful and I appreciate that :slight_smile:

Bill

I finally figured out where the bug came from in the database. Users would never run into the problem. It was from creating a new record to enter new information into the database. Everything the user does is checked and if the record count is affected the record status is updated. But I used a FileMaker Pro command, and not a command from my database, to create the record so the database never knew it needed to refresh the record status. That was a pretty silly mistake :slight_smile:

Bill

Did you every get the new database to work?

Bill

After downloading A19.0 and opening it FMP-RT I check the “About ASObj-C…” menu and it says version A16.

How can I be sure the correct, most recent version is running?

(I’m looking through the data base to find information on Data Detectors, and it’s pretty frustrating. I can find them in the inheritance path, but can’t find any information.)

Nevermind, figured it out.

But still having trouble getting any useful information about Data Detectors. I find a single example of finding dates (which is useful!) but nothing at all about any other kinds of data detectors can find. Specifically emails.

dataDetectorWithTypes:NSTextCheckingTypes --> NSDataDetector

Sorry Ed. I have not been on the site for a long time. Version 19 is the latest version released. I have added a number of new entries since that version but I haven’t released a newer version yet. There is 2 data detector entries in the data base from the end of in 2017. I don’t have anything else on that subject.

I didn’t do anything spectacular in my example in the database. I just used it to decode some English language examples into something a script can work with. The examples can be used to create a script that runs recognition on all the text. Some parts would not have anything to recognized and other parts might find something that is recognized and the script could act on what is recognized.

Bill

1 Like

Updated version??

Also I see no notice as what can be done with the code.
Can it be uploaded here or anywhere and used freely?