![]() The error I get with this exact code is something like Sql = "select ID,parentID,name from table_tags"ĭ.Value("ID") = rs.Field("ID").IntegerValueĭ.Value("parentID") = rs.Field("parentID").IntegerValueĭ.Value("name") = rs.Field("name").StringValueįor each element as dictionary in tagArray Can you help me maybe? static tagArray(-1) as dictionary //ID, parentID, name, desc, ordername, level So good so far, this is the point were I keep getting errors and dont really know what to do… certainly a beginners mistake, but I cant get around it using google and the documentation. I figured the “for each” function would be the way to go. The Next step is to show these items from the array in a listbox. I’m not really sure, but I think it worked so far. After spending some time on google I found the suggestion of an array of dictionaries, which I then tried to follow. I read that there is no way to do an “Array of Arrays”, as I did before. In the DB, there are items with 5 properties, like ID, parentID, name, etc. I am trying to do the following: I want to read from the database and populate an array with the information. Have fun writing your script for your application.Hello guys, I’m new to xojo, but have some basic programming knowledge mainly from web languages. and click on the Browse button at the bottom, find your application and open its dictionary. You should now be able to launch AppleScript Editor, go to File -> Open Dictionary. double click in its value area and enter the name of your sdef file. You should now see a list of property names, scroll down until you see Scripting definition file name and select it. if you hover your cursor over the last item in the Information Property List (Minimum system version below) you will see a grey + and - appear where the little up and down triangles were. you will get a XML editor window with your ist file. If it doesn’t, right click on ist and select Open with. Put you saved sdef file in the Resources folder. After clicking the disclosure triangle on the Resources folder you should see something similar to the picture with the two red arrows. ![]() ![]() Lastly, after your function is complete it can return a parameter back to your AppleScript (violet arrow).Īfter building your XOJO application, right click on it and select Show Package Contents. Your application can pick up a parameter (blue arrow). These four character codes are sent to your AppleEventHandler (yellow and green arrows) within your XOJO application. Both the four character application code and the command code is entered in the sdef file, this allows the sdef file to act as the dictionary of your XOJO application (orange arrow). The actual AppleEvents use four character codes between applications. It must be entered into the scripting definition, sdef, file using Sdef Editor. The AppleScript command text, OpenSequenceFile, is chosen (red arrow). You will also need Xcode to edit the ist file so you can add your sdef file into ist.īelow is a diagram that shows the flow of information from a line of AppleScript, through the sdef file, to XOJO and back. I use Sdef Editor from to create the scripting definitions file. The obvious tools are used for AppleScript and XOJO, AppleScript Editor and the XOJO IDE. I am not knowledgable enough to call this a tutorial, but you are welcome to use what I have learned. This page is a quick story of how I made my programmable power supply controller AppleScript scriptable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |