Weird table view issue on app launch

All,
I have an app which stores the last viewed record in a plist file when it terminates. When the app launches again, I fetch the data for the last viewed record and fill my app’s form. All form fields barring a single column table view get populated with the data pertaining to the last viewed record when the App launches. I’m at my wits end because of this. In the plist file, I store Car names as records and their information. The Car Names are displayed in a combo box, which the user selects and the relevant info is displayed.

The surprising thing is that on launch aCarFeatureTable rows aren’t selected, but if I changes the combo box values, the rows get selected.
Here is my code:



property aCarFeatureTable: missing value -- The Single Column table
property aCarFeatureList :{"Feature1","Feature2","Feature3"}-- The feature list, displayed in the single column table
property theArrayController : missing value -- connected in Interface Builder
property theData : {} -- the table data
property aCarName : missing value


on applicationWillFinishLaunching_(aNotification)
        tell current application's NSArray to set theArray to arrayWithArray_(aCarFeatureList)
		-- set our property to sorted list
		tell theArray to set my theData to sortedArrayUsingSelector_("localizedStandardCompare:")
        
		-- Insert code here to initialize your application before any files are opened 
end applicationWillFinishLaunching_

on awakeFromNib()  

       set plistFileString to (path to preferences as string) &  "myCarData.plist"
        set PLIST_PATH to POSIX path of plistFileString
        try
            set thePlistData to NSMutableDictionary's alloc()'s initWithContentsOfFile_(PLIST_PATH)
        on error errMsg
            aErrorMsg's setStringValue_(errMsg)
            return
        end try
    
       my populate_Combobox() --populate the Combo Box 
end awakeFromNib

on populate_Combobox()
        set last_viewedcar to ""
        set tempKeys to thePlistData's allKeys() --find all keys
        set myList to {}
        repeat with oneKey in tempKeys 
            try  
                if oneKey as string is not equal to "Last_Car" then
                 set end of myList to (oneKey as string)
                end if    
            end try
        end repeat
        aCarName's removeAllItems() -- clear content of combo box
        try --see what car was the last used when the app was run
            set last_viewedCar to (thePlistData's valueForKey_("Last_Car")) as string
        end try
        
        if myList is not equal to {} then --if the list is not empty
            repeat with oneList in myList --repopulate combo box
                aCarName's addItemWithObjectValue_(oneList)
            end repeat
                aCarName's setStringValue_(last_viewedCar)
                aCarName's selectItemWithObjectValue_(last_viewedCar)
                my fillForm(last_viewedCar) 
        end if
    end populate_Combobox


my fillForm(carVal)
-- Fetch data from plist file for the car value and populate the form fields:
     set theDict to thePlistData's valueForKey_(carVal)
     set rowStr to (theDict's valueForKey_("theCarFeatures")) as string
     -- rowStr will contain values like "1,2,14" which are the row numbers corresponding to the features, the user          selected
     my selectRowIndexes(rowStr,aCarFeatureTable)

end fillForm

on selectRowIndexes(val,obj)
        if val is equal to "" or val is equal to missing value or val is equal to "missing value" then
            tell theArrayController to setSelectionIndex_(0) # Select row 0
        else    
            set {myTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {","}}
            set selRowsList to text items of val 
            set AppleScript's text item delimiters to myTID -- It's considered good practice to return the TID's to their original state
            set theSet to current application's NSMutableIndexSet's alloc()'s init()
            repeat with i in selRowsList
                theSet's addIndex_(i as integer)
            end repeat  
        obj's selectRowIndexes_byExtendingSelection_(theSet, false)
        end if    
    end selectRowIndexes 


Fixed. Moved the my populate_Combobox() call to applicationWillFinishLaunching_