Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline View Text Invisible.



Hi,

I had  the same issue, but found out my modified code was wrong. I could send you some working example code I'm using now, though is not documented at all. Also it uses a data source set up in IB. But maybe it helps - let me know.

Andreas


On 02.06.2006, at 20:28, Phillip Apley wrote:

I used the example code from the applescript studio reference (url and text below) to make a sample outline in Xcode. In interface builder I create a window with an outline view. All I change from default is window names, and I attach the ‘on launched’ method. When I run the code from the example as the ‘on launched’ method of the application. I get a couple of triangles that open and close, demonstrating that the sample outline structure is there, but there’s no text displayed for the outline items or column names. I had run a similar example using a more complicated example and got the same result, which led me to try the simple example in the documentation.

http://developer.apple.com/documentation/AppleScript/Reference/StudioReference/index.html?http://developer.apple.com/documentation/AppleScript/Reference/StudioReference/sr6_data_suite/chapter_6_section_8.html#//apple_ref/doc/uid/20011220-ASKDataViewSuite.Classes.ASKDataItem

I’ve been trying to fix this for a couple of days. I’ve examined the object structure using script debugger 4 looking for visibility flags, though I may have missed something there. I suspect the problem is a regression ina recent version of something: perhaps Xcode 2.2.1, latest Applescript, OS 10.4.6.

Does anyone have any ideas for me? If anyone else could confirm they get the same problem that would be great.

Here’s the actual code I’m running, changed only to reflect the names of the windows:

--  Created by Phillip Apley on 6/2/06.
--  Copyright 2006 __MyCompanyName__. All rights reserved.

on launched theObject
   tell application "outlinetest"
        -- Create the data source; this places it in the application
       --  object’s data source elements. (Assign it to outline view  below.)
       set dataSource to make new data source at end of data sources with properties {name:"tasks"}
        -- Create the data columns
       tell dataSource
           make new data column at end of data columns with properties {name:"task"}
            make new data column at end of data columns with properties {name:"completed"}
            
        end tell
       
        -- Create the top-level parent data item "Things to do"
       
        set parentItem to make new data item at end of data items of dataSource
       
        set contents of data cell "task" of parentItem to "Things to do"
        
        set contents of data cell "completed" of parentItem to "--"
        
        -- Create the first child data item "Work on outline example",  which
       
        --  will have its own children
       
        set childItem to make new data item at end of data items of parentItem
       
        set contents of data cell "task" of childItem to "Work on outline example"
        
        set contents of data cell "completed" of childItem to "Yes"
        
        -- Create first child data item of "Work on outline example"
       
        set childChildItem to make new data item at end of data items of childItem
       
        set contents of data cell "task" of childChildItem to "Make it plain and simple"
        
        set contents of data cell "completed" of childChildItem to "Yes"
        
        -- Create second child data item of "Work on outline example"
       
        set childChildItem to make new data item at end of data items of childItem
       
        set contents of data cell "task" of childChildItem to "Put it all in a \"launched\" event handler"
        
        set contents of data cell "completed" of childChildItem to "Yes"
        
        -- Create the second child data item of "Things to do"
       
        set childItem to make new data item at end of data items of parentItem
       
        set contents of data cell "task" of childItem to "Put it in my iDisk when done"
        
        set contents of data cell "completed" of childItem to "No"
        
        -- Assign the data source to the outline view
       set data source of outline view "outlineview" of scroll view "tasks" of window "outlinetest" to dataSource
       -- this doesn’t help
        -- tell outline view "outlineview" of scroll view "tasks" of window "outlinetest" to update
       
    end tell
end
launched


--
Phillip G. Apley
Critical Engineering Associates
34 Ridgemont Street
Allston, MA 02134
cel: 617-283-1717
pga@alum dot mit dot edu

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Outline View Text Invisible. (From: Phillip Apley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.