How can I create a Table View in Cocoa Applescript?

This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
Perhaps something like:
myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
I would appretiate any responses and brief descriptions on the matter.

You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
Apple_For_The_Win wrote:
At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
open the applescript app delegate and add a new property called "tableController"
select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
select the array controller in the object list
rename the array controller "table data"
open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
select the table view in the object list again, then go down a level and select each column in turn
for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
back in the applescript app delegate, add code like the following:
  -- create a list of records, where each record represents a row and the column name is the record key
  set myData to {{column_1_name:"hello"}}
  -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
  set my tableController to NSArray's arrayWithArray:myData
  -- may or may not be needed
  myTableView's reloadData()
That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

Similar Messages

  • How Can I create plan Table

    Dear Experts,
    How Can I create plan Table.
    How can i read it?

    check this link for detailed information

  • How can I create a new Numbers Document through AppleScript?

    How can I create a new Numbers Document through AppleScript?
    I try this:
    tell application "Numbers"
    make new document with properties {template name:"blank"}
    end tell
    But don't work.
    Where can I find documentation about it?

    If you try to invent your own syntax, you are starting on very wrong basis.
    The required syntax is defined by the Numbers AppleScript's dictionary.
    This one doesn't know what is a template.
    This is why, in the link posted by badunit, I use an other scheme to create a new document.
    I know that it's awful but it's the only one available at this time.
    Yvan KOENIG (VALLAURIS, France) samedi 4 juin 2011 11:25:25
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How can we create a table with more than 64 fields in the default DB?

    Dear sirs,
    I am taking part in the process of migrating a J2ee application from JBoss to SAP Server. I have imported the ejb project.
    I have an entity bean with 79 CMP fields. i have created the bean and created the table for the same also. but when i tried to build the dictionary, i am getting an error message as given below,
    "Dictionary Generation: DB2:checkNumberOfColumns (primary key of table IMP_MANDANT): number of columns (79) greater than allowed maximum (64) IMP_MANDANT.dtdbtable MyAtlasDictionary/src/packages"
    Is it mean that we can not create tables with fields more than 64?
    How can i create tables with more than 64 fields?
    Kindly help,

      I found a link in the help site which says its 1024 (without key 1023).
      Not sure about any limit of 64 columns.

  • How can i create a Matrix View or Matrix Report in JDeveloper

    Dear All
    I'm tring to creat an updatable view display (items , customer , quantity)
    The customer must be Distinct
    , And the view column are not fixed (Like the Matrix Reports)
    dan_________________5_______________10_____________15 -----------
    sara________________12_______________7______________3 -----------
    How can i display that in ADF table ?
    It's Possible to make that view updateable
    Ahmed Galal

    May I suggest that you ask this question in the customer forums in the Business Center at [|]
    Best regards, Christian

  • How can i create a table which name is dynamic and not static?

    i have a question to ask. normaly if i want to create a table, i must provid a name for the table. for example, create table tt (id number(5)). But now in my application, I need to control the table name with params through function, how can i do?

    First thank you to reply so fast!
    But I met problem according to your instructive. The following is my code:
    m varchar(5);
    execute immediate 'create table'|| m ||'(id number(5),name varchar(5))';
    The SQL*Plus tell me the command create is invalid. My oracle is Maybe I miss something so that I can not get correct result. Wish your further help.
    yours sincerely
    zhou jinguang

  • How can I create a table in other's schema?

    I have two users say 'user1' and 'sanju' along with other users in the database.Both the users are granted a connect role. I have connected as a 'sanju' user. Now I want to create a table in schema 'user1'.
    Please note that user 'sanju' should not be allowed to create table in any other user's schema.
    I have set the current schema of 'sanju' as 'user1'.
    I know that 'grant create ANY table to sanju' will allow 'sanju' to create table in all the schema. I dont want that. Is there any way to create a table in any other's schema?
    Please answer ASAP

    This is not directly possible, but you can use following workaround:
    connect user1/passwd
    create or replace procedure testCreateTable as
    execute immediate 'create table user1.testTable(c char)';
    end test;
    grant execute on testCreateTable to sanju;
    connect sanju/passwd
    execute testCreateTable
    Of course, you can make this procedure more generic by specifying the necessary parameter.
    Please not that this procedure only works, if user1 was granted the create table privilege directly, and not through a role (e.g. dba), because roles are disabled when executing

  • How can I create a table in form central

    Miles Driven
    Auto Mileage Expense ($.565 per mile)
    (Room & Tax Only)
    Air Travel
    Airport Shuttle, Taxi or Parking
    Total Expenses
    Daily Meal Total
    (daily maximum of $42.00)
    Mon., Oct. 13
    $                 -  
    $                     -  
    $                     -  
    l Expense Re
    $                 -  
    $                     -  
    $                     -  
    Wed., Oct. 15
    $                 -  
    $                     -  
    $                     -  
    Thu., Oct. 16
    $                 -  
    $                     -  
    $                     -  
    Fri., Oct. 17
    $                 -  
    $                     -  
    $                     -  
    $                 -  
    $                  -  
    $ -  
    $ -  
    $ -  
    $ -  
    $ -  
    $                     -  
    $                     -  

    Hi create a table,
    Currently we do not have the facility to create a table in FormsCentral.
    Vikrantt Singh

  • How can I create a materialized view based on hierarchical cube query?

    database version 10gR2.
    When i try to create MV for sql below, i got error .
    I tried creating MV log in several ways, but still, keep getting the same error.
    SQL Error: ORA-12015: cannot create a fast refresh materialized view from a complex query
    12015. 00000 -  "cannot create a fast refresh materialized view from a complex query"
    *Cause:    Neither ROWIDs and nor primary key constraints are supported for
               complex queries.
    *Action:   Reissue the command with the REFRESH FORCE or REFRESH COMPLETE
               option or create a simple materialized view.So, I wonder if it is possible to create MV based on sql below?
    if yes, how should I do it?
    if no, what is the alternative?
          coalesce(UP_ORG_ID_6, UP_ORG_ID_5, UP_ORG_ID_4, UP_ORG_ID_3, UP_ORG_ID_2, UP_ORG_ID_1) as ORG_ID,
          a.day_id as day_id,     
          coalesce(UP_CODE_6, UP_CODE_5, UP_CODE_4, UP_CODE_3, UP_CODE_2, UP_CODE_1) as product_id,
          A.SOURCE_ID as SOURCE_ID,
          SUM(SALE_COST) as SALE_COST,
          SUM(TRADE_COUNT) as TRADE_COUNT     
    where a.ORG_ID=B.ORG_ID
          and a.PRODUCT_ID=D.CODE
          and a.day_id=20110201
    group by rollup(UP_ORG_ID_1, UP_ORG_ID_2, UP_ORG_ID_3, UP_ORG_ID_4, UP_ORG_ID_5, UP_ORG_ID_6),
          rollup(UP_CODE_1, UP_CODE_2, UP_CODE_3, UP_CODE_4, UP_CODE_5, UP_CODE_6),
          a.SOURCE_ID;Thanks in advance.

    Rob vanWjik has an excellent series of fast refresh materialized views starting here:
    Part three specifically on aggregate MVs is here:

  • How can I create only SPRO view role?

    On my production server I want to create a role for SPRO view. How it is possible?
    Please help me

    Hello Kariyath,
    Please check this thread for this purpose:
    Re: Transaction List in SPRO
    This thread allows you to have all transactions in SPRO in a role.
    Next you need to change activities to 03. Make sure you remove authorization objects like s_admi_fcd,s_btch_nam,s_cts_admi etc from this role.

  • How can you create a table in a proccess on a page?

    I am trying to create a new table from an existing table called ICT_PROTIME. The new table needs to be named as the value of a text box on the page called P10_TABLE. If i create a process and use the plsql statement below when i hit the save button i get the error:
    ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
    My code:
    I have also tried putting begin befor this line and that doesn't work either?
    what am i doing wrong?

    Hi LT,
    You will need to use the EXECUTE IMMEDIATE command and build the DDL dynamically.
    Hope this helps.

  • How can we create EDITABLE TABLE in JSP

    I want to have a table in jsp where data r been retrived from oracle db.
    I want a screen where table has got edit, delete, save buttons with changes updated in database please can any one help me with the code????
    I am using Apache 5.2 / JDK 5 / oracle 9i
    Please guide me....

    Same topic Discuss in another thread..

  • How can I view my photos in "Events" like in iPhoto? How can I create events?  I have 55,000 photos and 1700 events so the only way I can possibly manage my photos is using events that are one slide in size.

    I have 55,000 images organized into about 1700 events. The only reasonable way to view my library is using events in iPhoto where each event has one image That still leaves 1700 images to sort through but that is a lot easier than 55,000 images.  In the side bar is a folder with "iPhoto Events" but those views still show all of the slides.  How can I create events and view my photos as events as in iPhoto?  Events are critical for large libraries and has been my primary way to sort images.

    I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) .  I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
    Haha!  I should have paid attention and read between the lines!  My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do!  I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy.  I am now going through Photos and making Albums (of what used to be in my Events)  ... maybe I'll get this finished before they do another non user friendly update!

  • How can i create tables ?

    how can i create a table from two string arrays (of equal length)?
    I haven't found much in the documentation.

    Thank you for your post.
    Please have a check on the below links  and check if it helps you
    This link describes how to migrate a relational database to Microsoft Azure SQL Database

  • How can I create a query with tables in INFOSET?

    Dear Gurus,
    How can I create a query with tables in INFOSET?
    Just tables and fields INFOSET?
    Kind Regards,

    Check following SCN Article for your understanding/reference:
    - [Using Infoset Query ,SAP Query and Quick Viewer|]

Maybe you are looking for

  • Replication of BP and Sales order from CRM to R/3

    Hello everyone, I have a peculiar condition in my hands.The requirement is to replicate 10 business partners from crm to R/3 ,then the next 4 Business partners need not be replicated and then the next three replicated..How do we do this kind of repli

  • Special characters in  a href

    Hi,I generate a html using JAXPs xslt transformer. One of the consists of Western european special characters(where pHREF is a xsl variable/param). while text printing, the special characters(�) are printed as they are, but are distorted when I want

  • How to transform data received from file adapter

    hi', I am reading the data from XML file using file adapter, now I want to write the same contents which I have read from this file to a different/new XML file, the issue is I am unable to perform a transform here, when I use a transform with source

  • What are the specs for iPod video

    i wish to manually convert .mov (video with audio) to vPod format. anyone know where there is a list of the specs required, movie size, format, audio format? i'm trying to figure out the following: i have two movies of like nature. i drop ,them both

  • My kindle books suddenly won't open in ipad

    I have been using my iPad to read kindle books. Downloaded a new book and now none of my kindle books will open