Database & Ed's project

Ed,

What did you think of the database? Right now it only have 82 entries but it will end up with a lot more. The database was tedious to work with as it was, so I created a live search where it homes in on what’s being looked for as the user types. It does a new search each time the search field being typed into changes and finds all matches in the database, matches in the middle, beginning or end of the database text. Now when I can only remember a part of a method name I can find it :slight_smile:

I finished adding descriptions for all the entries in the database and simplified the original descriptions. I added more to the glossary and help. I implemented a live search on the class items layout, class layout and the framework layout. The buttons that show information when clicked are now dimmed when there is nothing to show.

Here’s a link to to the old drop box with the newest version:


All you have to do is replace the old .fmpur file with the new one. Do to an error on my part the .fmpur is still called “ASObj-Ca1” instead of “a2” but the correct version comes up in the about box and in the spotlight comments for the file get info.

Now all I have left to do is enter hundreds and hundreds methods, functions, properties, … :slight_smile:

Hows your project going? I thought you were going to post your syncing script on the site. I was curious about how it was done.

Bill

Haven’t had much Scripting time this week. The Synching script and your database are on my list for the weekend and next week!

Ed,

It appears you 're the only one interested in the database I’m working on. So I’m really interested in what you think of it and any suggestions you have. I don’t think anyone else thinks an ASObj-C database makes sense. People seem to prefer books. But I think the 2 work well together. The objective documentation is so big it makes information revival for the reader very tough. That is my big goal with the database, to make it easy to find information, and not so much teach.

I uploaded a new version to dropbox today, it’s ASObj-C a3. As before the file says a1 but the version is actually a3. Unfortunately I can’t stop sending files named a1 without redoing the big huge file you downloaded earlier. I’m assuming you don’t want to download that thing again. I’m up to 94 entries in the database. I wish I could work on it full time. It would go so much quicker. But angry customers are not a good thing.

Here is the link to the new version:

After using the database for a while I can see that the database will not work well with the tradition enter a search then read method. I remembered Chris talking about live searches so I tried it. It is a lot better. There is 1 such search in version a2 for finding method names, functions, constants, properties, … but I kept wishing I had a live search for for the samples in the database. But I didn’t want to give up the other so now there are 2 just under the big list with a previous and next button between them so I can easily go forward or backward a record. But then I kept having times I wanted to see everything I had a particular class. So now there is a popup that displays all the names of the classes I have entered. When I pick one I get all the stuff that goes with that particular class.

After all this I had the problem of which search method would overrule other search methods and other nasty stuff like that. In the end I went with the last search method used to do a search wipes out the previous search results. So far that has worked well for me.

I kept wanting to see how many records I have entered, how many matched a particular search, or the record number I am on, so along the top, about in the middle, is a place where all that is displayed. Unfortunately I forgot to update the help file on the latest version I uploaded to dropbox today so I’m telling you about all the new things.

This the way I’m figuring out what the database needs to do. I just use it, figure out what’s missing and add it. I designed the data structures and relationships before I started and I’m figuring out the rest (mostly UI stuff) as I go along. So if you have any ideas, complaints, desired features, … feel free to pass them along.

I scrapped my other plan of doing low level AppleScript wrappers for a different idea. Right after school I worked with an object orientated structure that was already assembled and running and my work involved making the needed changes to get it to do new and needed things. It got me thinking about making a basic application that is easily modifiable with some decent documentation. Then people could modify it and do some really amazing things from AppleScript. Sortof like Shane’s dialog tool kit but on a bigger level.

I am determined to help get AppleScript to some place Apple can’t so easily dismiss it.

Well, good luck on your adventures this weekend.

Bill

So I downloaded this and when I tried to open it I was asked what application to open it in. Is it supposed to be a standalone? (I don’t have filemaker on this mac.)

Same here. I couldn’t open the previous version either.

Ed & Shane,

I did the files all over again with better names and included some pictures with this post.

The files for the data base are now in 2 zip files. One holds the actual database file and the other archive holds the rest of the files.

The archive named “FileMaker Pro files minus database file.zip” contains all the files to run the database except the actual database file. These files never change and only need to be dowloaded once. The link to download the archive is:

The database file is stored in an archive file called “ASObj-C Database.fmpur.zip” The link to download the archive is:

Decompress the 2 archives and put the database file “ASObj-C Database.fmpur” it into the same folder as the other files that were decompressed. This should be a folder named “FileMaker Pro files minus database file.” After that the installation process is complete and the folder that holds all the files can be renamed to anything you want.

The enclosed image “Screen Shot of what files look like after installed” shows what the files should look like after they are installed.

It is important that the file “ASObj-C Database.fmpur” never gets renamed. If it does the application will no longer work with the file until it is renamed back to the original name.

The first time the application is run it should come up with a dialog saying the application is from an unidentified developer. Just select the application file in Finder, do a control click and when the menu appears select open. After that the OS will trust the application.

Here is the part I suspect is being done wrong. Theoretically you should be able to double click the database file and the “FileMaker Pro runtime” application should launch and open the file. But this doesn’t work, I am using FileMaker 14 and the current FileMaker version is 15 so the FileMaker people don’t care about that problem anymore.

The way around this problem is to drag the “ASObj-C Database.fmpur” file on top of “FileMaker Pro runtime” application and release the mouse to open the database file.

Once the database opens it displays the “sign in” dialog shown in the “Dialog to open database” picture. Just select guest account and click ok and the database window should come up.

You don’t need the “FMP Acknowledgements” file for anything but the company requires it be in any runtime solutions.

Shane, Ed

Does the new database stuff work?

Bill

Finally worked. I was about to give up installing. Kept getting Filemaker Runtime is not from a known developer message opening with your control-click method from the finder. I went to prefs and clicked Open Anyway, same thing.

I changed the setting to let it Open Any, and same thing.

I moved the folder to the application folder and same thing.

I double clicked on the database file and it opened.

Go figure.

First bit of feedback it looks like the layout is designed for a much bigger screen than I have on my laptop. That’s pretty inconvenient.

This gives a good overview of the names and basic descriptions of the various aspects, and I see a potential for a lot more.

Specifically I’d like to see actual working appleScript examples that you could click to open in a SD window and start stepping through.

(Keep in mind that I’m rather intimidated by too much ASOBJC stuff, and only use bits and pieces when it really helps and I always hide them in a handler.)

Shane may have a better perspective.

Ed,

The window can be resized by clicking the the bottom right of the window and dragging. But I can add an option for different window sizes. I have a 27 inch iMac. In FileMaker I can just create a new layout and move things around, and if necessary remove things to make a layout for a smaller screen size. I have no access to a laptop. But if you are willing to try some different smaller layouts I’m sure it can be worked out.

It sound like I definitely need a that allows the layout sizes to be changed. I could use your help as far as figuring out how the new screen should be rearranged since there are conventions used on a laptop I’m not familiar with. Everything in the window can be moved. Nearly everything can be resized. Things can be removed from the layout, others can be added in and individual things can be redesigned so they take up less space but are still usable.

I do have actual code that opens the FileMaker sample code in Script Debugger but it hasn’t been tested yet. That is a coming feature. I’ve been concentrating on inputing data. But I can stop for a bit and get the “open in script debugger” feature implemented.

The fact you’re intimidated by ASObj-C makes you a perfect tester. It’s the people who are intimidated that need this the most. I think with some work that ASObj-C can be accessible to people with no understanding of Apple Programming other then AppleScript. Unfortunately Apple made no effort to document ASObj-C beyond a few tech notes. My plan for the database is make people comfortable with using ASObj-C. The language does have rules, but they are different then AppleScripts rules so it isn’t surprising scripters have trouble with it.

ASObj-C involves learning a significant portions of a new programming language that is completely different then AppleScript. The idea of the database is to make working with that “significant amount of a new programming language” a lot easier to work with.

Shane’s Everyday ASObj-C explain the basic of how ASObj-C works and this database just make it easier to find information and the documentation is in a language an scripter can understand.

I didn’t have as much trouble getting the OS to trust the new Application. Perhaps different OS have different difficulties levels. I’ll have to check into that. My OS 10.11.16, El Capitan.

Bill

That definitely needs work. To I resize the window I have to move the whole window to the left to see the bottom right corner, then after I resize it and reposition it I still have to scroll to see all the buttons and fields on the right-third of the screen.

I think there only a few standard sizes for laptops, so you could probably get away with three or four layouts. Large; macbook; Air. Maybe a small one too. (I imagine there would be times on both my laptop and my big screen at work I’d prefer a smaller version.

The script below (from Shane, of course) will tell you the screen size at runtime, which may allow FM to automatically select the layout.

The best way I’ve found for learning AppleScript in general and ASObj-C as well is to put a script, like the one below, in SD, and step through it, and then tweak the variables and see what breaks it and what makes it do exactly what I want. So I’d be a big advocate of buttons that would open stoppable script in SD that would illustrate each command’s options.

use AppleScript version "2.4"
use framework "Foundation"
use framework "AppKit"
use scripting additions
on screenSize()
	set theScreen to current application's NSScreen's mainScreen()
	set theFrame to theScreen's visibleFrame()
	return {width of |size| of theFrame, height of |size| of theFrame}
end screenSize
screenSize()
-- my MacBook Pro screen size{1280.0, 735.0}
1 Like

OK here’s the kind of thing I’d like to learn from your database.
What is NSScreen?
It seems to have a "mainScreen()"
What else does it have, and how could I see what else it has?
What is it’s mainscreen()? What does it have besides a visibleFrame?

Is there a way to get those answers from a script? Something akin to “properties of x”?

If not (and even if so) then being able to search your database and get useful answers to those questions, with executable appleScript examples would be good.

Ed,

I can research window sizes. Since the upper left of the window is the most reliable part of the window to appear when the window is too big for the screen I’ll put a popup with window size selections in the upper left. Adding the popup is easy but I might have to rearrange the window items to fit in a smaller window. Sometimes that can take a while.

One thing I would like to know is once you reduced the size of the window did the layout of the window still work ok or were things smashed too close together to use easily. If it’s just a matter of changing the window size that is quick and easy.

I’m using a shorter development cycle with the database because I want to get something useable as soon as possible. I’ll add what’s needed or would make it better but I haven’t done a lot of research on what exactly is needed for this type of solution in various configurations. I have a lot of ideas in my head but with less research I’ll miss things that other people will notice with different environments, different Macs or different operating systems. So feel free to tell me the problems.

Thanks for the ASObj-C code. But FileMaker can do that as well. FileMaker is run on a lot of Lap tops and this size adjustment is a common operation. FileMaker even runs on iPhone under the name FileMaker Go. I have the development tools for all these.

I’m Booked for the weekend with another project I’m working on but I can work on the window size issue and open in SD on Monday.

Bill

have a look.

Bill,

A couple of things. I don’t think your description of how to open it allows for the fact that it will be quarantined on other users’ Macs. I suspect the easiest method is to control-click on the runtime and choose Open, and then choose the database file in the dialog that comes up. At least, that worked here.

The other thing I’d really to see changed is the method and function names so that they include any required colons and or parentheses, so they appear as they would used where possible. At the moment there’s no real indication that firstObject requires parentheses whereas indexOfObject requires a colon.

But excuse me if I limit my feedback; I suspect comments from those unfamiliar with ASObjC will be more useful generally.

I’m not sure why it is so much easier to run it on my Mac. I would guess it is because it was created on my Mac. Probably the FileMaker Pro advanced 15 has something to better deal with that. I’m still on El Capitan. That could also be why it is easier for me to run. But I will pass on your suggestion.

I started to get lazy entering methods and started to skip colons at the end, but you’re right if I don’t enter what the user is required to enter I am defeating my own purpose. Properties work with and without parenthesis and I’ve been leaving them off. But there’s not that many entered yet. I could add the colons and parenthesis and add them in the examples as well.

You’ve been working with ASObj-C longer then me and you have taught it in books and helped a lot of people with it. You are by far the expert when it comes to what will help scripters to get an handle on ASObj-C. I’m interested in anything you have to say. There no room for pride on my part. I’ll take any and all help. I really believe in doing this. I think it can make a big difference. ASObj-C is so powerful and it drive me crazy so many scripters can’t take advantage of that power.

If you are worried it might confuse scripters talking about other things you can email comments to me. But however you pass on your comments feel free to tell me if I don’t know what I’m doing. I’ve documented a lot of things in my time but with ASObj-C I know the least about what I am documenting.

There will be a lot of interface issues to work out with the database. A lot when it comes to matters of opinions to to sort through, figuring how far the database should go, what direction it should go, what the defining purpose of the database is, … I’ve been though a lot of this before documenting stuff, working as a research assistant, … but the more input I have the better the database will turn out, and your input, while different then others, has great value.

Bill

It’s because they only get quarantined when downloaded – you never download them, so you don’t see the problem.

I strongly suggest you add them. They mostly work without them, but not always – and often the issue is a subtle one that people unfamiliar with Objective-C won’t catch.

I’m passing on a suggestion Shane made to me about opening the FileMaker runtime application.

“I suspect the easiest method is to control-click on the runtime and choose Open, and then choose the database file in the dialog that comes up. At least, that worked here.”

Sometime when I tried it this way I got the sign-in dialog after which I selected the guest account and it worked fine. All the other times it came up with an open file dialog and I selected the database file and it worked fine after that.

Part of the difficulty is the FileMaker Pro runtime wasn’t designed to keep making new versions. It works best when its installed once. But it’s the only way I can share the database without everyone having to get a copy of FileMaker Pro.

Bill

Ed,

It looks like you posted a video for me to look at but I could never get to display. But your post implied it was not a good thing. So I made a quicky change to the database to add a window size popup. After I uploaded it to drop box I noticed the popup don’t have a title. But it’s the only popup in the upper left corner of the window. The popup has 2 values right now. One is “Small” and the other is “Big”. When running on you laptop you should be able to use it better with “Small” selected. People with iMac screens use the “Big”. Right now it only works with the class items but that’s the one with all the useful stuff on the window. It should be good enough to make your laptop usable. But it still needs some work. I just a quicky for you to use until I get to getting it done right.

The link to download it is:

This one is version a4. The zip file says a4 but the expanded file will still be named “ASObj-C Database.fmpur” since the file name has to be the same to use the same dictionary. Let me know how this version works.

Bill

Shane,

I had planed on do the changes after you mentioned it the first time.

Bill