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?

    run UTLXPLAN.SQL
    under
    $ORACLE_HOME/rdbms/admin/
    check this link for detailed information
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/ex_plan.htm#i19260

  • 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?
    Thanks

    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,
    Thankyou,
    Sudheesh...

    Hi,
      I found a link in the help site which says its 1024 (without key 1023).
    http://help.sap.com/saphelp_nw04s/helpdata/en/f6/069940ccd42a54e10000000a1550b0/content.htm
      Not sure about any limit of 64 columns.
    Regards,
    S.Divakar

  • 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)
    Example
    customers___________item01___________item02___________item03----------item_N
    dan_________________5_______________10_____________15 -----------
    sara________________12_______________7______________3 -----------
    How can i display that in ADF table ?
    It's Possible to make that view updateable
    Thanks
    Ahmed Galal

    May I suggest that you ask this question in the customer forums in the Business Center at [http://sme.sap.com|http://sme.sap.com]
    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?
    thx

    First thank you to reply so fast!
    But I met problem according to your instructive. The following is my code:
    declare
    m varchar(5);
    begin
    m:='hello';
    execute immediate 'create table'|| m ||'(id number(5),name varchar(5))';
    commit;
    end;
    The SQL*Plus tell me the command create is invalid. My oracle is 8.1.7.0.0. 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'.
    ALTER SESSION SET CURRENT_SCHEMA=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
    begin
    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

    DATE
    Miles Driven
    Auto Mileage Expense ($.565 per mile)
    Hotel
    (Room & Tax Only)
    Air Travel
    Airport Shuttle, Taxi or Parking
    Meals
    Total Expenses
    2012
    Breakfast
    Lunch
    Dinner
    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.
    Thanks,
    Vikrantt Singh

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

    Hi,
    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?
    select
          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,     
          a.TRADE_TYPE_ID as TRADE_TYPE_ID,
          a.CUST_ID,
          coalesce(UP_CODE_6, UP_CODE_5, UP_CODE_4, UP_CODE_3, UP_CODE_2, UP_CODE_1) as product_id,
          QUANTITY_UNIT,
          COST_UNIT,
          A.SOURCE_ID as SOURCE_ID,
          SUM(CONTRACT_AMOUNT) as CONTRACT_AMOUNT,
          SUM(CONTRACT_COST) as CONTRACT_COST,
          SUM(SALE_AMOUNT) as SALE_AMOUNT,
          SUM(SALE_COST) as SALE_COST,
          SUM(ACTUAL_AMOUNT) as ACTUAL_AMOUNT,
          SUM(ACTUAL_COST) as ACTUAL_COST,
          SUM(TRADE_COUNT) as TRADE_COUNT     
    from DM_F_LO_SALE_DAY a, DM_D_ALL_ORG_FLAT B, DM_D_ALL_PROD_FLAT D
    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),
          a.TRADE_TYPE_ID,
             a.day_id,
          A.CUST_ID,
          rollup(UP_CODE_1, UP_CODE_2, UP_CODE_3, UP_CODE_4, UP_CODE_5, UP_CODE_6),
          a.QUANTITY_UNIT,
          a.COST_UNIT,
          a.SOURCE_ID;Thanks in advance.

    Rob vanWjik has an excellent series of fast refresh materialized views starting here:
    http://rwijk.blogspot.com/2009/05/fast-refreshable-materialized-view.html
    Part three specifically on aggregate MVs is here:
    http://rwijk.blogspot.com/2009/06/fast-refreshable-materialized-view.html

  • How can I create only SPRO view role?

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

    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.
    regards.
    ruchit.

  • 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:
    CREATE TABLE &P10_TABLE. as * from ICT_PROTIME;
    I have also tried putting begin befor this line and that doesn't work either?
    what am i doing wrong?
    Thanks
    LT

    Hi LT,
    You will need to use the EXECUTE IMMEDIATE command and build the DDL dynamically.
    eg.
    begin
         EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)';
         end;
    Hope this helps.
    Tony.

  • How can we create EDITABLE TABLE in JSP

    Hi!
    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....
    Thanks.

    hi,
    Same topic Discuss in another thread..
    http://forum.java.sun.com/thread.jspa?threadID=627472&tstart=15

  • 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.
    Thanks!

    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.
    thanks
    null

    Hi,
    Thank you for your post.
    Please have a check on the below links  and check if it helps you
    https://msdn.microsoft.com/en-us/library/dn305849.aspx
    http://azure.microsoft.com/en-in/documentation/articles/sql-database-get-started/
    This link describes how to migrate a relational database to Microsoft Azure SQL Database 
    https://msdn.microsoft.com/library/azure/ee730904.aspx
    Regards,
    Mekh.
        

  • 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,

    Hello
    Check following SCN Article for your understanding/reference:
    - [Using Infoset Query ,SAP Query and Quick Viewer|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10eab7af-0e54-2c10-28a5-87b47adbe1a5]
    Regards
    JP

Maybe you are looking for

  • Help with the spry horizontal menu bar

    I am pretty new at this. I want to change the back ground color of the bar. I did get one of the menu to change background color. The other would not change color when I change them using the CSS panel. Am I missing some SW or is there something spec

  • How to get the desired result

    hi friends i have a field having name value in table which when order by a datetime field named change_date give me the result like shown below a b value * * 3 * * 5 * * -1 * * 8 * * 13 * * 19 * * 21 * * -1 * * 6 now i want a query that will give res

  • Ignoring empty select-option inputs

    Hi all, Have 3 input select options as follows: select-options: so_retnr for vbak-vbeln. select-options: so_matnr for mara-matnr. select-options: so_bstnr for vbak-bstnk. Iam using the above 3 select options in the following select. Now the user can

  • My apple id disabled. offered to help

    my apple id disabled, I 've done to reset the password in https://iforgot.apple.com. I chose the method to restore the password by email. website information report sent to restore my mail address. But when I checked the inbox does not have any infor

  • Change Schedule Lines values for Each Item for a Scheduling Agreement ?

    Hii     I want to change the Schedule Line Schedule Qty for Each Line item for a Scheduling Agreement . I cannot use BAPI_PO_CHANGE as this is for PO only and gives error for a scheduling agreement. I am on 4.6c so i SAP does not have BAPI_AGREEMENT_